17Tracking

The tracking algorithm has the ability to identify an object in video images and follow the object in subsequent sequential video frames. This is in order to track the object's trajectory, measure the speed, and/or to investigate the object's interaction with other objects.

Other algorithms such as pattern matching could be used for tracking objects, but they will tend to fail to track the object in the presence of other objects that are too similar. The tracking algorithm used in LabVIEW is based on a mean shift method, which is effective in tracking target objects acquired in sequential images even in the presence of similar other objects.

The current location is searched based on the histogram of the object in the previous image frame and uses the mean shift of the result to find the peak of a confidence map (probability density function) near the object's old position. For this to work correctly, the initial location of the target object needs to be correctly determined. As the video images progress sequentially in time, the target object is searched while ignoring many other similar shaped objects.

You can find the NI-supplied tracking example VI in the following folder: C:\Program Files\National Instruments\LabVIEW 2013\Examples\Vision\Tracking, as seen in Figure 17.1. By running example VI, you will see a target object (a car with rectangle overlay) being tracked throughout the video.

Figure 17.1 Example VI for tracking.

17.1 Tracking with the Use of Vision ...

Get Practical Guide to Machine Vision Software: An Introduction with LabVIEW now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.