I’m performing pedestrian detection on a video stream using haar cascadeclassifiers and I am trying to optimize the code by reducing the scale range of detection thanks to parameters minSize and maxSize in the detectMutliScale function:
fullbodyCascade.detectMultiScale(image, found_pedestrian, 1.1, 3, 0, Size(20,60), Size(50,100));
It seems that the minSize parameter is the only one taken into account while objects with greater size than maxSize are still being detected.
Has anyone encountered this issue ?
Thanks in advance for your help
Ilou
The haar cascadeclassifier I am using is an old format file and the functions associated to this format do not seem to take maxSize into account. Therfore, I modified haar.cpp by adding :
right before lig. 1202 :
There was probably a more clever way to fix this (using flags…?) but anyways,it works fine now.