OpenCV: counting bounding box in a video


Staff member
I have some videos that are to be considered as ground truths for people detection: <a href="" rel="nofollow noreferrer">this is an example</a>.

I also have the staple video (without any detections) and I have to run my people detector algorithm on it and compare my results with the ground truth video.

The problem is that I would like to have not only a <em>qualitative</em> comparison, but also a <em>quantitative</em>. So, as far as I am able to count the number of detections in my personal algorithm, I must find a reliable way to <strong>count the number of bounding boxes that appear in the ground truth video</strong> for each frame.

I have taken into account <a href="" rel="nofollow noreferrer">this link</a> and <a href="" rel="nofollow noreferrer">this one either</a>, but they are meant to find the contours of a shape, not a bounding box. I know it could sound non-sense to detect the number of detections, but this is the only way I have to get a numerical ground truth.