ImageEn, unit ievision

TIEVisionVectorScalarInt32.getScalarInt32

TIEVisionVectorScalarInt32.getScalarInt32


Declaration

function getScalarInt32(pos: int32_t): TIEVisionScalarInt32; safecall;


Description

Returns the four integers scalar at the specified index.

Parameter Description
pos Item index to retrieve


Example

// Draw lines onto image
var
  i: Integer;
  sc: TIEVisionScalarInt32;
begin
  ImageEnView1.IO.LoadFromFile( edtInputFilename.Text );   // Reload full color image
  for i := 0 to lines.size() - 1 do
  begin
    sc := lines.getScalarInt32(i);

    with ImageEnView1.IEBitmap.Canvas do
    begin
      Pen.Width := 2;
      Pen.Color := clRed;
      MoveTo( sc.val[0], sc.val[1] );
      LineTo( sc.val[2], sc.val[3] );
    end;
  end;
  ImageEnView1.Proc.TextOut( Align_Text_Near_Left, Align_Text_Near_Top, Format( 'Lines: %d', [ lines.size ]), 'Arial', 12, clYellow, [fsBold] );
  ImageEnView1.Update();
end;