ImageEn, unit ievision

TIEVisionPeopleDetector.detect

TIEVisionPeopleDetector.detect


Declaration

function detect(image: TIEVisionImage): TIEVisionVectorRect; safecall;


Description

Find all people's bodies in the specified image.
Returns a list of rectangles for each body found.



Parameter Description
image Image where to search for bodies

Note:
 You can draw the rects to a canvas using DrawRects
 A shortcut method for this is available: DetectPeople


Example

detector := IEVisionLib.createPeopleDetector();
foundRects := detector.detect( ImageEnView1.IEBitmap.GetIEVisionImage() );
for i := 0 to foundRects.size()-1 do
  with foundRects.getRect(i) do
  begin
    ImageEnView1.IEBitmap.Canvas.Brush.Style := bsClear;
    ImageEnView1.IEBitmap.Canvas.Pen.Color := clRed;
    ImageEnView1.IEBitmap.Canvas.Rectangle(x, y, x+width, y+height);
  end;
ImageEnView1.Update();