selectROI method

Rect selectROI(
  1. Mat img
)

SelectROI selects a Region Of Interest (ROI) on the given image. It creates a window and allows user to select a ROI cvRunArena mouse.

Controls: use space or enter to finish selection, use key c to cancel selection (function will return a zero Rect).

For further details, please see: https://docs.opencv.org/master/d7/dfc/group__highgui.html#ga8daf4730d3adf7035b6de9be4c469af5

Implementation

Rect selectROI(Mat img) {
  final result = calloc<chighgui.Rect>();
  final cname = name.toNativeUtf8().cast<ffi.Char>();
  cvRun(() => chighgui.Window_SelectROI(cname, img.ref, result));
  calloc.free(cname);
  return Rect.fromPointer(result);
}