ImageEn, unit ievision

TIEVisionLibrary.createGrabCut

TIEVisionLibrary.createGrabCut


Declaration

function createGrabCut(): TIEVisionGrabCut; safecall;


Description

Create a TIEVisionGrabCut object.


Video

Demo  youtu.be/H9N94bHOdew


Demo

Demo  Demos\IEVision\GrabCutSelection\GrabCutSelection.dpr


Example

var
  gc: TIEVisionGrabCut;
begin
  gc := IEVisionLib().createGrabCut();
  gc.setInputImage(ImageEnView1.IEBitmap.GetIEVisionImage());
  gc.setForegroundRect(IEVisionRect(ImageEnView1.SelectedRect));
  gc.run(5);
  ImageEnView1.Deselect;
  gc.getSelectionMask(ImageEnView1.SelectionMask);
  ImageEnView1.SelectCustom();
end;