Filling regon
Mostra commenti meno recenti
Hi. I need ideas on How to fill the dark regions that have white regions inside, to make them completely white. I don't need implementation just ideas of what algorithms or methods I can use to do that. Thanks in advance.
Risposte (2)
Sean de Wolski
il 4 Mag 2011
If it would be filled by an:
imfill(X,'holes');
AND is white in the original image; then it might be (Where X has the darker values as true.
It's hard to understand what you mean from that image. Is dark the middle color (grayish) or is it black or is it both?
1 Commento
Jason
il 4 Mag 2011
Sean de Wolski
il 4 Mag 2011
0 voti
Steps:
- Do a connected components analysis (bwconncomp) on a logical image of anything you want.
- Find the linear indeces of all white pixels
- Use cellfun and ismember to see if, in each connected component there is white (CC.PixelIdxList)
- if there is, set that entire cell's set of linear indeces to white - else do nothing
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!