From 92d443d724514ce6da4a87317fa7af405131c017 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Fri, 11 Sep 2009 04:34:34 +0000 Subject: numbering little fix svn path=/trunk/externals/pdp_opencv/; revision=12305 --- pdp_opencv_motempl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pdp_opencv_motempl.c b/pdp_opencv_motempl.c index e9989c0..79fca42 100644 --- a/pdp_opencv_motempl.c +++ b/pdp_opencv_motempl.c @@ -89,7 +89,7 @@ void pdp_opencv_motempl_update_mhi( t_pdp_opencv_motempl *x, IplImage* img, Ipl { double timestamp = (double)clock()/CLOCKS_PER_SEC; // get current time in seconds CvSize size = cvSize(img->width,img->height); // get current frame size - int i, idx1 = x->last, idx2; + int i, j, idx1 = x->last, idx2; IplImage* silh; CvSeq* seq; CvRect comp_rect; @@ -155,6 +155,7 @@ void pdp_opencv_motempl_update_mhi( t_pdp_opencv_motempl *x, IplImage* img, Ipl // iterate through the motion components, // One more iteration (i == -1) corresponds to the whole image (global motion) + j=0; for( i = -1; i < seq->total; i++ ) { if( i < 0 ) { // case of the whole image @@ -200,7 +201,7 @@ void pdp_opencv_motempl_update_mhi( t_pdp_opencv_motempl *x, IplImage* img, Ipl cvRound( center.y - magnitude*sin(angle*CV_PI/180))), color, 3, CV_AA, 0 ); - SETFLOAT(&x->rlist[0], i); + SETFLOAT(&x->rlist[0], j++); SETFLOAT(&x->rlist[1], center.x); SETFLOAT(&x->rlist[2], center.y); SETFLOAT(&x->rlist[3], comp_rect.width); -- cgit v1.2.1