what is the algorithm of bwconncomp?
Show older comments
Anyone know the algorithm of bwconncomp? and how do they work to generate a pixel index list output from a binary image?
Answers (1)
Walter Roberson
on 28 Nov 2019
0 votes
Algorithms
The basic steps in finding the connected components are:
- Search for the next unlabeled pixel, p.
- Use a flood-fill algorithm to label all the pixels in the connected component containing p.
- Repeat steps 1 and 2 until all the pixels are labeled.
2 Comments
Image Analyst
on 28 Nov 2019
Searching starts at the top left pixel and goes down rows in the left-most (first) column, then moves to the next column to the right going down rows looking for unlabeled pixels, and continues until all columns have been checked.
Walter Roberson
on 13 Mar 2023
The documentation no longer has an Algorithms section; the last version this was documented is https://www.mathworks.com/help/releases/R2021b/images/ref/bwconncomp.html#bu2xdbl-6
Categories
Find more on Region and Image Properties in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!