aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <sevyves@users.sourceforge.net>2009-09-11 04:34:34 +0000
committerN.N. <sevyves@users.sourceforge.net>2009-09-11 04:34:34 +0000
commit92d443d724514ce6da4a87317fa7af405131c017 (patch)
tree421dd9000da3fc2f39de189d8ed45f61b26e3df9
parent6de5de96d8e90ba70a67c61945f59bc33c0c2ce2 (diff)
numbering little fix
svn path=/trunk/externals/pdp_opencv/; revision=12305
-rw-r--r--pdp_opencv_motempl.c5
1 files 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);