elucideye / acf

Aggregated Channel Feature object detection in C++ and OpenGL ES 2.0 based on https://github.com/pdollar/toolbox
BSD 3-Clause "New" or "Revised" License
49 stars 20 forks source link

acf::Detector can return cv::Rect with slighlty out of bounds pixels #57

Open headupinclouds opened 6 years ago

headupinclouds commented 6 years ago

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.