From ed2103f12e314ef1a9bf3de901d54613d275d5c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?llu=C3=ADs=20g=C3=B3mez=20i=20bigord=C3=A0?= Date: Sat, 26 Feb 2011 20:17:50 +0000 Subject: solved a bug in contour id matching algo code by ydegoyon from the exile svn path=/trunk/externals/pdp_opencv/; revision=14972 --- pdp_opencv_contours_boundingrect.cc | 10 +++++----- 1 file 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 ) -- cgit v1.2.1