Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why does Haar cascade classifier performance change when I crop an image?

I have an image which contains several (10-20) objects. The objects are typically small (50x10px) compared to the overall image (2500x2000px).

I can run detectMultiScale and get good results on the entire image. However, I know that the objects are contained in a certain area, so I decided to select a sub image and run detectMultiScale in order to reduce processing time.

I was surprised to find that detectMultiScale returned slightly different results when performed on the sub image. In some cases, it missed some of the objects that it could find on the full image.

I'm using a scale factor = 1.05, minNumNeighbours = 3, HaarDetectionType = FindBiggestObject, and identical min/max sizes each time.

Can anyone help me understand why I would be getting different results? Are there any tricks I can apply to make this more consistent?

Thanks!

Dave