ImageEn, unit ievision

TIEVisionObjectTracker


Declaration

TIEVisionObjectTracker = interface(TIEVisionBase)


Description

An interface to track an object based on its initial position.
Tracking is performed using the Camshift algorithm.




Demo

Demo  Demos\IEVision\TrackObjects\TrackObjects.dpr


Methods and Properties

Public Method  locateNewPosition
Public Method  setInitialPosition


Example

// Create our tracking object
m_objectTracker := IEVisionLib.createObjectTracker();

// Specify the object to track
ImageEnView1.IEBitmap.Origin := ieboTOPLEFT;
image := IEVisionLib.createImage(ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height, ievUINT8, 3, ImageEnView1.IEBitmap.Rowlen, ImageEnView1.IEBitmap.ScanLine[0]);
with ImageEnView1 do
  m_objectTracker.setInitialPosition(image, IEVisionRect(SelX1, SelY1, SelX2 - SelX1, SelY2 - SelY1));

// As video frame changes, locate new position of the object
rotRect := m_objectTracker.locateNewPosition(ImageEnView1.IEBitmap.GetIEVisionImage().flip(ievY_AXIS), backProj);
... Show rotRect, e.g. with a rectangular shape layer


See Also

createObjectTracker