aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlluís gómez i bigordà <lluisbigorda@users.sourceforge.net>2011-02-26 20:17:50 +0000
committerlluís gómez i bigordà <lluisbigorda@users.sourceforge.net>2011-02-26 20:17:50 +0000
commited2103f12e314ef1a9bf3de901d54613d275d5c9 (patch)
treead0460b2836883626cd8f98a3be4f22d0bb076fd
parent57bdf706b8eabe39866b6d798c0837ae3ead4941 (diff)
solved a bug in contour id matching algo
code by ydegoyon from the exile svn path=/trunk/externals/pdp_opencv/; revision=14972
-rwxr-xr-xpdp_opencv_contours_boundingrect.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/pdp_opencv_contours_boundingrect.cc b/pdp_opencv_contours_boundingrect.cc
index ee4f57b..2ad7b45 100755
--- a/pdp_opencv_contours_boundingrect.cc
+++ b/pdp_opencv_contours_boundingrect.cc
@@ -229,11 +229,6 @@ static void pdp_opencv_contours_boundingrect_process_rgb(t_pdp_opencv_contours_b
if ( odist < dist )
{
oi=im;
- x->x_xmark[oi] = (float)(rect.x+rect.width/2);
- x->x_ymark[oi] = (float)(rect.y+rect.height/2);
- x->x_wmark[oi] = (int)rect.width;
- x->x_hmark[oi] = (int)rect.height;
- x->x_found[oi] = x->x_ftolerance;
dist=odist;
}
}
@@ -247,6 +242,11 @@ static void pdp_opencv_contours_boundingrect_process_rgb(t_pdp_opencv_contours_b
else
{
// post( "contour found : %d", oi );
+ x->x_xmark[oi] = (float)(rect.x+rect.width/2);
+ x->x_ymark[oi] = (float)(rect.y+rect.height/2);
+ x->x_wmark[oi] = (int)rect.width;
+ x->x_hmark[oi] = (int)rect.height;
+ x->x_found[oi] = x->x_ftolerance;
}
if ( x->x_draw )