ImageEn, unit ievision

TIEVisionGrabCut


Declaration

TIEVisionGrabCut = interface(TIEVisionBase)


Description

Automatically selects a region.




Video

Demo  https://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;


Methods and Properties

Public Method  getSelectionMask
Public Method  setForegroundRect
Public Method  setInputImage
Public Method  setSelectionMask
Public Method  run


See Also

Public Method  createGrabCut