How to remove unwanted objects of smaller than a certain threshold area from a grayscale image?
2 ビュー (過去 30 日間)
古いコメントを表示
My algorithm is as follows :- - convert entire image to binary form - remove the objects of the area smaller than required. My problem is to how to work on the object of larger area in its gray scale form. Please suggest any other method if better
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 3 月 12 日
See bwareaopen() but notice that it works on black and white images. So you could convert your grayscale to B&W, run the area open, then use the resulting B&W image as a mask on your grayscale.
2 件のコメント
Image Analyst
2013 年 3 月 12 日
編集済み: Image Analyst
2013 年 3 月 12 日
To mask (one way of doing it):
grayImage(~binaryImage) = 0; % Set background to zero.
P.S. Richa, you might be interested in my tutorial: http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial-blobsdemo
参考
カテゴリ
Help Center および File Exchange で Image Filtering and Enhancement についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!