![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/268020/image.png)
Getting Spots in banana
1 回表示 (過去 30 日間)
古いコメントを表示
Allan III T. Condiman
2020 年 1 月 22 日
コメント済み: Allan III T. Condiman
2020 年 1 月 28 日
How to detect blacked spots or disease in banana and draw an color red in spots
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/265432/image.jpeg)
0 件のコメント
採用された回答
KALYAN ACHARJYA
2020 年 1 月 24 日
編集済み: KALYAN ACHARJYA
2020 年 1 月 24 日
rgbImage=imread('ban.jpeg');
subplot(121),imshow(rgbImage);
grayImage=rgb2gray(rgbImage);
[segment,blackSpots]=bwlabel(~im2bw(grayImage,0.7));
% Choose the threshold as per requirements
total_bk_spots=blackSpots-1
%................^ minus 1 for ignoring largest blobbs
subplot(122),imshow(segment);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/268020/image.png)
If not, then do the color thresholding.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!