Fix cascade step.

* Assumed window width == height.
This commit is contained in:
iabdalkader 2017-02-28 17:51:03 +02:00
parent c3a75a515b
commit a054b5faab

View File

@ -94,9 +94,9 @@ array_t *imlib_detect_objects(image_t *image, cascade_t *cascade, rectangle_t *r
// Start with a step of 5% of the image width and reduce at each scaling step
cascade->step = (roi->w*50)/1000;
// Make sure step is less than feature height + 1
if (cascade->step > cascade->window.w) {
cascade->step = cascade->window.w;
// Make sure step is less than window height + 1
if (cascade->step > cascade->window.h) {
cascade->step = cascade->window.h;
}
// Allocate integral images