selectROIs function

VecRect selectROIs(
  1. String winName,
  2. Mat img, {
  3. bool showCrosshair = true,
  4. bool fromCenter = false,
  5. bool printNotice = true,
})

SelectROIs selects multiple Regions Of Interest (ROI) on the given image. It creates a window and allows user to select ROIs cvRunArena mouse.

Controls: use space or enter to finish current selection and start a new one use esc to terminate multiple ROI selection process

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

Implementation

VecRect selectROIs(
  String winName,
  Mat img, {
  bool showCrosshair = true,
  bool fromCenter = false,
  bool printNotice = true,
}) {
  final p = calloc<cvg.VecRect>();
  final cWinName = winName.toNativeUtf8().cast<ffi.Char>();
  cvRun(() => chighgui.cv_selectROIs(cWinName, img.ref, p, showCrosshair, fromCenter, printNotice));
  calloc.free(cWinName);
  return VecRect.fromPointer(p);
}