In some cases the acf::Detector can return a cv::Rect with out of bounds pixels. This could be happening in the scaling from the detection resolution back to the full resolution image. Enforcing (detection_roi & frame_roi).area() == detection_roi.area() is a reasonable post condition for the main API calls. A near term workaround is simply to clip the output detection rectangles before any cropping is performed.
In some cases the acf::Detector can return a cv::Rect with out of bounds pixels. This could be happening in the scaling from the detection resolution back to the full resolution image. Enforcing
(detection_roi & frame_roi).area() == detection_roi.area()
is a reasonable post condition for the main API calls. A near term workaround is simply to clip the output detection rectangles before any cropping is performed.