]> rtime.felk.cvut.cz Git - opencv.git/commitdiff
a couple of small bugs have been fixed (thanks to Sergey Molinov)
authorvp153 <vp153@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 22 Dec 2004 13:26:24 +0000 (13:26 +0000)
committervp153 <vp153@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Wed, 22 Dec 2004 13:26:24 +0000 (13:26 +0000)
git-svn-id: https://code.ros.org/svn/opencv/trunk@93 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08

opencv/src/cv/cvhaar.cpp

index 28659f12898762cf018a16898d926a646d34c750..82e2bd06369a129dcf4606890272e51734649402 100644 (file)
@@ -827,7 +827,7 @@ cvHaarDetectObjects( const CvArr* _img,
         int *p0 = 0, *p1 = 0, *p2 = 0, *p3 = 0;
         int *pq0 = 0, *pq1 = 0, *pq2 = 0, *pq3 = 0;
         int pass, stage_offset = 0;
-        int stop_height = cvRound((img->rows - win_size.height - ystep) / ystep);
+        int stop_height = cvRound((img->rows - win_size.height) / ystep);
 
         if( win_size.width < min_size.width || win_size.height < min_size.height )
             continue;
@@ -869,7 +869,7 @@ cvHaarDetectObjects( const CvArr* _img,
             {
                 int iy = cvRound(_iy*ystep);
                 int _ix, _xstep = 1;
-                int stop_width = cvRound((img->cols - win_size.width - 2*ystep) / ystep);
+                int stop_width = cvRound((img->cols - win_size.width) / ystep);
                 uchar* mask_row = temp->data.ptr + temp->step * iy;
 
                 for( _ix = 0; _ix < stop_width; _ix += _xstep )