Lines Matching defs:contours
55 vector<vector<Point> > contours;
60 /// Find contours
61 findContours( canny_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0) );
64 vector<Moments> mu(contours.size() );
65 for( size_t i = 0; i < contours.size(); i++ )
66 { mu[i] = moments( contours[i], false ); }
69 vector<Point2f> mc( contours.size() );
70 for( size_t i = 0; i < contours.size(); i++ )
73 /// Draw contours
75 for( size_t i = 0; i< contours.size(); i++ )
78 drawContours( drawing, contours, (int)i, color, 2, 8, hierarchy, 0, Point() );
83 namedWindow( "Contours", WINDOW_AUTOSIZE );
84 imshow( "Contours", drawing );
88 for( size_t i = 0; i< contours.size(); i++ )
90 printf(" * Contour[%d] - Area (M_00) = %.2f - Area OpenCV: %.2f - Length: %.2f \n", (int)i, mu[i].m00, contourArea(contours[i]), arcLength( contours[i], true ) );
92 drawContours( drawing, contours, (int)i, color, 2, 8, hierarchy, 0, Point() );