ImageEn, unit ievision

TIEVisionVectorKeyPoint.getKeyPoint

TIEVisionVectorKeyPoint.getKeyPoint


Declaration

function getKeyPoint(pos: int32_t): TIEVisionKeyPoint; safecall;


Description

Returns the keypoint at specified index.

Parameter Description
pos KeyPoint index


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;