ImageEn, unit ievision

TIEVisionObjectTracker.setInitialPosition

TIEVisionObjectTracker.setInitialPosition


Declaration

procedure setInitialPosition(image: TIEVisionImage; const window: TIEVisionRect); safecall;


Description

Set the initial object position.

Parameter Description
image Source image (where the object stays)
window Coordinates of rectangle containing the object


Demo

Demo  Demos\IEVision\TrackObjects\TrackObjects.dpr


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

locateNewPosition