Connected Components
lastmod 2022-07-12created 2022-07-127 edits
It doesn't just find edges and fill them in; it separates and recognizes each object.
object detection using connected component
Connected_components_example_1.png
In cases like this, where the original foreground comes out as edges only, and so on
Connected_components_example_2.png
Contours are clearly found and separated like this.
Connected_components_example_3.png
In other words, it doesn't just find edges and fill them in; it separates out each object.
For the OpenCV API, use the following:
CVAPI(CvSeq*) cvSegmentFGMask( CvArr *fgmask, int poly1Hull0 CV_DEFAULT(1),
float perimScale CV_DEFAULT(4.f),
CvMemStorage* storage CV_DEFAULT(0),
CvPoint offset CV_DEFAULT(cvPoint(0,0)));
See also
Favorite site
- OpenCV , find connected component 1
- QUICK AND EASY CONNECTED COMPONENT (BLOB) USING OPENCV
- OpenCV cv::connectedComponents method reference
- openCV labeling example (connectedComponentsWithStats)
- OpenCV #7-4 Example (extracting component contours)
References
-
OpenCV_-_find_connected_component.pdf ↩