MATLAB Answers

Getting Spots in banana

7 views (last 30 days)
How to detect blacked spots or disease in banana and draw an color red in spots

  0 Comments

Sign in to comment.

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 24 Jan 2020
Edited: KALYAN ACHARJYA on 24 Jan 2020
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.

  1 Comment

Allan Condiman
Allan Condiman on 28 Jan 2020
Thank you very much sir.! ^_^

Sign in to comment.

More Answers (0)

Sign in to answer this question.