ImageEn, unit ievision

TIEVisionVectorKeyPoint


Declaration

TIEVisionVectorKeyPoint = interface(TIEVisionBaseVector)


Description

An interface object that stores a vector (list) of TIEVisionKeyPoint records (inherited from TIEVisionBase).


Methods and Properties

Public Method  getKeyPoint
Public Method  push_back
Public Method  setKeyPoint

Note: You can draw the points to a canvas using DrawRects


Example

// Draw points onto image
var
  i: Integer;
  kp: TIEVisionKeyPoint;
  x1, y1, x2, y2: double;
begin
  for i := 0 to keyPoints.size() - 1 do
  begin
    kp := keyPoints.getKeyPoint(i);

    // Draw onto bitmap
    with ImageEnView1.IEBitmap.Canvas do
    begin
      Pen.Color := clRed;
      Pen.Width := 4;
      Brush.Style := bsClear;
      x1 := kp.pt.x - kp.size / 2;
      y1 := kp.pt.y - kp.size / 2;
      x2 := kp.pt.x + kp.size / 2;
      y2 := kp.pt.y + kp.size / 2;
      Ellipse( Round(x1), Round(y1), Round(x2), Round(y2));
    end;
  end;
  ImageEnView1.Proc.TextOut( Align_Text_Near_Left, Align_Text_Near_Top, Format( 'Found: %d', [ lines.size ]), 'Arial', 12, clYellow, [fsBold] );
  ImageEnView1.Update();
end;