How to apply morphological operations like clearing border and removing small objects using matlab for color image?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a color image obtained after using k-means cluster and I want to apply morphological operations like cleaning border,filling holes and remove small object using matlab but thsese operation works only on grayscale or binar image in matlab! Any suggestions please!
0 件のコメント
回答 (1 件)
Image Analyst
2018 年 8 月 16 日
Since you seem to have a masked image, since large parts are perfectly black, you must already have a binary image mask. So just use it on that mask before applying the mask to the color image.
4 件のコメント
Image Analyst
2018 年 8 月 21 日
If you'd rather, then you can use the kmeans indexes and reshape to get the mask. See my attached demo.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!