HomeSort by relevance Sort by last modified time
    Searched defs:contours (Results 1 - 25 of 43) sorted by null

1 2

  /external/opencv3/samples/python2/
contours.py 5 The original image is put up along with the image of drawn contours.
8 contours.py
50 contours = [cv2.approxPolyDP(cnt, 3, True) for cnt in contours0] variable
55 cv2.drawContours( vis, contours, (-1, 3)[levels <= 0], (128,255,255),
57 cv2.imshow('contours', vis)
59 cv2.createTrackbar( "levels+3", "contours", 3, 7, update )
  /external/opencv3/samples/cpp/tutorial_code/ShapeDescriptors/
pointPolygonTest_demo.cpp 39 /// Get the contours
40 vector<vector<Point> > contours; vector<Vec4i> hierarchy; local
43 findContours( src_copy, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE);
50 { raw_dist.at<float>(j,i) = (float)pointPolygonTest( contours[0], Point2f((float)i,(float)j), true ); }
findContours_demo.cpp 3 * @brief Demo code to find contours in an image
60 vector<vector<Point> > contours; local
65 /// Find contours
66 findContours( canny_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0) );
68 /// Draw contours
70 for( size_t i = 0; i< contours.size(); i++ )
73 drawContours( drawing, contours, (int)i, color, 2, 8, hierarchy, 0, Point() );
77 namedWindow( "Contours", WINDOW_AUTOSIZE );
78 imshow( "Contours", drawing );
generalContours_demo1.cpp 3 * @brief Demo code to find contours in an image
55 vector<vector<Point> > contours; local
60 /// Find contours
61 findContours( threshold_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0) );
63 /// Approximate contours to polygons + get bounding rects and circles
64 vector<vector<Point> > contours_poly( contours.size() );
65 vector<Rect> boundRect( contours.size() );
66 vector<Point2f>center( contours.size() );
67 vector<float>radius( contours.size() );
69 for( size_t i = 0; i < contours.size(); i++
    [all...]
generalContours_demo2.cpp 3 * @brief Demo code to obtain ellipses and rotated rectangles that contain detected contours
55 vector<vector<Point> > contours; local
60 /// Find contours
61 findContours( threshold_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0) );
64 vector<RotatedRect> minRect( contours.size() );
65 vector<RotatedRect> minEllipse( contours.size() );
67 for( size_t i = 0; i < contours.size(); i++ )
68 { minRect[i] = minAreaRect( Mat(contours[i]) );
69 if( contours[i].size() > 5 )
70 { minEllipse[i] = fitEllipse( Mat(contours[i]) );
    [all...]
hull_demo.cpp 3 * @brief Demo code to find contours in an image
56 vector<vector<Point> > contours; local
62 /// Find contours
63 findContours( threshold_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE, Point(0, 0) );
66 vector<vector<Point> >hull( contours.size() );
67 for( size_t i = 0; i < contours.size(); i++ )
68 { convexHull( Mat(contours[i]), hull[i], false ); }
70 /// Draw contours + hull results
72 for( size_t i = 0; i< contours.size(); i++ )
75 drawContours( drawing, contours, (int)i, color, 1, 8, vector<Vec4i>(), 0, Point() )
    [all...]
moments_demo.cpp 55 vector<vector<Point> > contours; local
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++
    [all...]
  /external/opencv/cvaux/src/
cvbgfg_common.cpp 77 CvSeq *contours, *c; local
85 // find contours around only bigger regions
106 contours = cvEndFindContours( &scanner );
110 for( c=contours; c != 0; c = c->h_next )
117 contours = 0;
120 return contours;
extendededges.cpp 50 //create lists of segments of all contours from image
55 CvSeq* contours = 0; local
56 cvFindContours( image, tmp_storage, &contours, sizeof(CvContour), CV_RETR_LIST, CV_CHAIN_APPROX_NONE );
59 //iterate through contours
61 CvSeq* current = contours;
114 //free temporary memstorage with initial contours
123 //iplSet(image, 0 ); // this can cause double edges if two contours have common edge
  /external/opencv3/samples/cpp/
fitellipse.cpp 5 * contours and approximate it by ellipses.
9 * White lines is contours. Red lines is fitting ellipses.
28 // "contours and approximate it by ellipses.\n"
61 // Define trackbar callback functon. This function find contours,
65 vector<vector<Point> > contours; local
68 findContours(bimage, contours, RETR_LIST, CHAIN_APPROX_NONE);
72 for(size_t i = 0; i < contours.size(); i++)
74 size_t count = contours[i].size();
79 Mat(contours[i]).convertTo(pointsf, CV_32F);
84 drawContours(cimage, contours, (int)i, Scalar::all(255), 1, 8)
    [all...]
contours2.cpp 13 << "The original image is put up along with the image of drawn contours\n"
23 vector<vector<Point> > contours; variable
30 drawContours( cnt_img, contours, _levels <= 0 ? 3 : -1, Scalar(128,255,255),
33 imshow("contours", cnt_img);
79 //Extract the contours so that
83 contours.resize(contours0.size());
85 approxPolyDP(Mat(contours0[k]), contours[k], 3, true); local
87 namedWindow( "contours", 1 );
88 createTrackbar( "levels+3", "contours", &levels, 7, on_trackbar );
segment_objects.cpp 25 vector<vector<Point> > contours; local
34 findContours( temp, contours, hierarchy, RETR_CCOMP, CHAIN_APPROX_SIMPLE );
38 if( contours.size() == 0 )
41 // iterate through all the top-level contours,
48 const vector<Point>& c = contours[idx];
57 drawContours( dst, contours, largestComp, color, FILLED, LINE_8, hierarchy );
squares.cpp 20 "\nA program using pyramid scaling, Canny, contours, contour simpification and\n"
57 vector<vector<Point> > contours; local
86 // find contours and store them all as a list
87 findContours(gray, contours, RETR_LIST, CHAIN_APPROX_SIMPLE);
92 for( size_t i = 0; i < contours.size(); i++ )
96 approxPolyDP(Mat(contours[i]), approx, arcLength(Mat(contours[i]), true)*0.02, true);
98 // square contours should have 4 vertices after approximation
99 // relatively large area (to filter out noisy contours)
watershed.cpp 86 vector<vector<Point> > contours; local
89 findContours(markerMask, contours, hierarchy, RETR_CCOMP, CHAIN_APPROX_SIMPLE);
91 if( contours.empty() )
97 drawContours(markers, contours, idx, Scalar::all(compCount+1), -1, 8, hierarchy, INT_MAX);
  /external/opencv3/samples/cpp/tutorial_code/ImgTrans/
imageSegmentation.cpp 110 vector<vector<Point> > contours; local
111 findContours(dist_8u, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE);
117 for (size_t i = 0; i < contours.size(); i++)
118 drawContours(markers, contours, static_cast<int>(i), Scalar::all(static_cast<int>(i)+1), -1);
137 for (size_t i = 0; i < contours.size(); i++)
155 if (index > 0 && index <= static_cast<int>(contours.size()))
  /external/opencv3/samples/cpp/tutorial_code/ml/introduction_to_pca/
introduction_to_pca.cpp 122 //! [contours]
123 // Find all the contours in the thresholded image
125 vector<vector<Point> > contours; local
126 findContours(bw, contours, hierarchy, CV_RETR_LIST, CV_CHAIN_APPROX_NONE);
128 for (size_t i = 0; i < contours.size(); ++i)
131 double area = contourArea(contours[i]);
132 // Ignore contours that are too small or too large
136 drawContours(src, contours, static_cast<int>(i), Scalar(0, 0, 255), 2, 8, hierarchy, 0);
138 getOrientation(contours[i], src);
140 //! [contours]
    [all...]
  /external/opencv3/samples/tapi/
squares.cpp 43 vector<vector<Point> > contours; local
72 // find contours and store them all as a list
73 findContours(gray, contours, RETR_LIST, CHAIN_APPROX_SIMPLE);
78 for( size_t i = 0; i < contours.size(); i++ )
83 approxPolyDP(Mat(contours[i]), approx, arcLength(Mat(contours[i]), true)*0.02, true);
85 // square contours should have 4 vertices after approximation
86 // relatively large area (to filter out noisy contours)
  /external/opencv3/modules/features2d/src/
blobdetector.cpp 196 std::vector < std::vector<Point> > contours; local
198 findContours(tmpBinaryImage, contours, RETR_LIST, CHAIN_APPROX_NONE);
206 // drawContours( contoursImage, contours, -1, Scalar(0,255,0) );
207 // imshow("contours", contoursImage );
210 for (size_t contourIdx = 0; contourIdx < contours.size(); contourIdx++)
214 Moments moms = moments(Mat(contours[contourIdx]));
225 double perimeter = arcLength(Mat(contours[contourIdx]), true);
261 convexHull(Mat(contours[contourIdx]), hull);
262 double area = contourArea(Mat(contours[contourIdx]));
282 for (size_t pointIdx = 0; pointIdx < contours[contourIdx].size(); pointIdx++
    [all...]
  /external/opencv3/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/
ColorBlobDetector.java 18 // Minimum contour area in percent for contours filtering
79 List<MatOfPoint> contours = new ArrayList<MatOfPoint>(); local
81 Imgproc.findContours(mDilatedMask, contours, mHierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);
85 Iterator<MatOfPoint> each = contours.iterator();
93 // Filter contours by area and resize to fit the original image size
95 each = contours.iterator();
ColorBlobDetectionActivity.java 175 List<MatOfPoint> contours = mDetector.getContours(); local
176 Log.e(TAG, "Contours count: " + contours.size());
177 Imgproc.drawContours(mRgba, contours, -1, CONTOUR_COLOR);
  /external/opencv3/modules/imgproc/test/
test_contours.cpp 73 CvSeq *contours, *contours2, *chain; member in class:CV_FindContourTest
245 contours = contours2 = chain = 0;
246 count = cvFindContours( img[2], storage, &contours, sizeof(CvContour), retr_mode, approx_method );
250 if( contours && retr_mode != CV_RETR_EXTERNAL && approx_method < CV_CHAIN_APPROX_TC89_L1 )
251 cvDrawContours( img[3], contours, cvScalar(255), cvScalar(255), INT_MAX, -1 );
262 if( contours && retr_mode != CV_RETR_EXTERNAL && approx_method < CV_CHAIN_APPROX_TC89_L1 )
276 ts->printf( cvtest::TS::LOG, "The number of contours retrieved with different "
289 code = cvtest::cmpEps2(ts, _img[0], _img[3], 0, true, "Comparing original image with the map of filled contours" );
301 if( contours )
310 cvInitTreeNodeIterator( &iterator, i == 0 ? contours : contours2, INT_MAX )
481 vector<vector<Point> > contours; local
    [all...]
  /external/freetype/src/autofit/
afhints.h 332 #define AF_CONTOURS_EMBEDDED 8 /* number of embedded contours */
348 FT_Int max_contours; /* number of allocated contours */
349 FT_Int num_contours; /* number of used contours */
350 AF_Point* contours; /* contours array */ member in struct:AF_GlyphHintsRec_
366 AF_Point contours[AF_CONTOURS_EMBEDDED]; member in struct:AF_GlyphHintsRec_::__anon11252
  /external/libgdx/extensions/gdx-freetype/jni/freetype-2.6.2/src/autofit/
afhints.h 330 #define AF_CONTOURS_EMBEDDED 8 /* number of embedded contours */
346 FT_Int max_contours; /* number of allocated contours */
347 FT_Int num_contours; /* number of used contours */
348 AF_Point* contours; /* contours array */ member in struct:AF_GlyphHintsRec_
364 AF_Point contours[AF_CONTOURS_EMBEDDED]; member in struct:AF_GlyphHintsRec_::__anon14928
  /external/opencv/cv/src/
cvdistransform.cpp 828 CvSeq *contours = 0; local
835 cvFindContours( src_copy, st, &contours, sizeof(CvContour),
838 for( label = 1; contours != 0; contours = contours->h_next, label++ )
841 cvDrawContours( labels, contours, area_color, area_color, -255, -1, 8 );
  /external/freetype/include/freetype/
ftimage.h 293 /* n_contours :: The number of contours in the outline. */
318 /* contours :: An array of `n_contours' shorts, giving the end */
321 /* `0' to `contours[0]', the second one is defined by */
322 /* the points `contours[0]+1' to `contours[1]', etc. */
336 short n_contours; /* number of contours in glyph */
341 short* contours; /* the contour end points */ member in struct:FT_Outline_
370 /* (i.e., `points', `flags', and `contours') are `owned' by the */
379 /* By default, outside contours of an outline are oriented in */
    [all...]

Completed in 3356 milliseconds

1 2