Documentation Center

  • Trial Software
  • Product Updates

Contents

initializeObject

System object: vision.HistogramBasedTracker
Package: vision

Set object to track

Syntax

initializeObject(H,I,R)

Description

Use the initializeObject method to set the object to track, and to set the initial search window. Use this method before calling the step method.

initializeObject(H,I,R) sets the object to track by extracting it from the [x y width height] region R located in the 2-D input image, I. The input image, I, can be any 2-D feature map that distinguishes the object from the background. For example, the image can be a hue channel of the HSV color space. Typically, I will be the first frame in which the object appears. The region, R, is also used for the initial search window, in the next call to the step method. For best results, the object must occupy the majority of the region, R.

initializeObject(H,I,R,N) additionally, lets you specify N, the number of histogram bins. By default, N is set to 16. Increasing N enhances the ability of the tracker to discriminate the object. However, this approach also narrows the range of changes to the object's visual characteristics that the tracker can accommodate. Consequently, this narrow range increases the likelihood of losing track.

Was this topic helpful?