detect method

(VecRect, VecF64) detect(
  1. Mat img
)

Detect objects on image using WaldBoost detector.

img Input image for detection

return:

bboxes Bounding boxes coordinates output vector

confidences Confidence values for bounding boxes output vector

https://docs.opencv.org/4.x/de/d0e/classcv_1_1xobjdetect_1_1WBDetector.html#ad19680e6545f49a9ca42dfc3457319e2

Implementation

(VecRect bboxes, VecF64 confidences) detect(Mat img) {
  final bboxesPtr = calloc<cvg.VecRect>();
  final confidencesPtr = calloc<cvg.VecF64>();
  cvRun(() => ccontrib.cv_xobjdetect_WBDetector_detect(ref, img.ref, bboxesPtr, confidencesPtr));
  return (VecRect.fromPointer(bboxesPtr), VecF64.fromPointer(confidencesPtr));
}