From 3d39ff29ac1c8d625acce6372551b8e6ae853e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?llu=C3=ADs=20g=C3=B3mez=20i=20bigord=C3=A0?= Date: Thu, 21 May 2009 12:49:46 +0000 Subject: pdp_opencv_histo added and two bug fixes svn path=/trunk/externals/pdp_opencv/; revision=11472 --- pdp_opencv_contours_boundingrect.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pdp_opencv_contours_boundingrect.c') diff --git a/pdp_opencv_contours_boundingrect.c b/pdp_opencv_contours_boundingrect.c index 7523153..748507e 100644 --- a/pdp_opencv_contours_boundingrect.c +++ b/pdp_opencv_contours_boundingrect.c @@ -41,6 +41,7 @@ typedef struct pdp_opencv_contours_boundingrect_struct t_outlet *x_outlet0; t_outlet *x_dataout; + t_outlet *x_countout; int x_packet0; int x_packet1; int x_dropped; @@ -138,9 +139,9 @@ static void pdp_opencv_contours_boundingrect_process_rgb(t_pdp_opencv_contours_b //cvZero( x->cnt_img ); + int i = 0; // Indicator of cycles. for( ; contours != 0; contours = contours->h_next ) { - int i = 0; // Indicator of cycles. int count = contours->total; // This is number point in contour CvRect rect; @@ -158,6 +159,7 @@ static void pdp_opencv_contours_boundingrect_process_rgb(t_pdp_opencv_contours_b outlet_list( x->x_dataout, 0, 5, rlist ); i++; } + outlet_float( x->x_countout, i ); } @@ -269,6 +271,7 @@ void *pdp_opencv_contours_boundingrect_new(t_floatarg f) x->x_outlet0 = outlet_new(&x->x_obj, &s_anything); x->x_dataout = outlet_new(&x->x_obj, &s_anything); + x->x_countout = outlet_new(&x->x_obj, &s_float); x->x_packet0 = -1; x->x_packet1 = -1; -- cgit v1.2.1