Getting Spots in banana

1 次查看(过去 30 天)
How to detect blacked spots or disease in banana and draw an color red in spots

采纳的回答

KALYAN ACHARJYA
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);
If not, then do the color thresholding.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by