ImageEn, unit ievision

TIEVisionOCR.getBoxes

TIEVisionOCR.getBoxes


Declaration

function getBoxes(): TIEVisionVectorOCRBox; safecall;


Description

Returns a rectangle position and size for each recognized character.


Example

// Draw rectangles around recognized characters
procedure TMainForm.Button2Click(Sender: TObject);
var
  boxes: TIEVisionVectorOCRBox;
  i: integer;
begin
  ImageEnView1.IEBitmap.Canvas.Pen.Color := clRed;
  ImageEnView1.IEBitmap.Canvas.Brush.Style := bsClear;

  boxes := m_OCR.getBoxes();
  for i := 0 to boxes.size()-1 do
    with boxes.getOCRBox(i) do
      ImageEnView1.IEBitmap.Canvas.Rectangle(rect.x, rect.y, rect.x+rect.width, rect.y+rect.height);

  ImageEnView1.Update();
end;