How to Update Image with Maximum Connected Component of pixel?
2 views (last 30 days)
Show older comments
Nadim Kaysar
on 15 Mar 2019
Commented: Image Analyst
on 16 Mar 2019
Step 1: Extract Conncted Component, CC.
Step 2: Idx=max(CC)
Step3: I=I(Idx) / Update Image with Maximum Connected Component of pixel
Please anyone help me, I can't understant this.
0 Comments
Accepted Answer
Image Analyst
on 16 Mar 2019
This does not make any practical sense. You wouldn't want to label the image (give an ID number to every blob) and then take the ID number that is greatest. Yes, you could do it, and it would take (roughly) the right-most, bottom-most blob, but that is not the correct way to get that blob. Blob are labeled in a top/down, left-to-right fashion as they are encountered by scanning the image in function bwlabel() or bwconcomp().
On the other hand, if you're trying to get the blob with the max area, instead of the max label (ID number), then you'd want bwareafilt():
largestBlobOnly = bwareafilt(binaryImage, 1); % Extract largest blob.
Explain in more detail what you want to do so I can know how to answer you.
2 Comments
Image Analyst
on 16 Mar 2019
Not sure what steps 2 and 3 mean but I suspect it's to extract the largest blob, but maybe it means the dilation (local max, done by imdilate() function). Read the rest of the paper or ask the author to determine exactly what those steps mean.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!