How should find range of disease area in mango image?

1 view (last 30 days)
I m working on color classification project in which i want to find color range of disease area in Lab color model.But problem is to use only a and b channel for finding range of disease area..How to find threshold from histogram of a and b channel?
if true
no_of_up=1;
for i=1:area
if(a_ch(i)>=110 && a_ch(i)<=125)
no_of_up = no_of_up + 1;
end
end
Unripe_per = (no_of_up.* 100)./ area;
%%percentage of ripeness
no_of_rp=1;
for i=1:area
if(a_ch(i)>=120 && a_ch(i)<=139)
no_of_rp = no_of_rp + 1;
end
end
ripe_per = (no_of_rp.* 100)./ area;
%%percentage of diseased
no_of_dp=1;
for i=1:area
if(a_ch(i)>=135 && a_ch(i)<=140)
no_of_dp = no_of_dp + 1;
end
end
Diseased_per = (no_of_dp.* 100)./ area;
end

Accepted Answer

Image Analyst
Image Analyst on 29 Mar 2014
Here is your gamut of all your images:
and here it is looking down the L axis onto the a-b plane:
Can you tell me where you'd like to set up dividing lines in the ab plane to set up a box that describes ripe, non-ripe, and diseased areas?
  5 Comments
Image Analyst
Image Analyst on 29 Mar 2014
I can't just give you the code . If this is for your university, then I'm sure your project does not say "Find someone on the internet to solve your problem for you, and give you code that works, then turn in their code."
I've already spent a lot of time for you and given you code to mask out the mangos. And I've given you demos (in my File Exchange ) that show you how to convert the image into different color spaces and segment out areas based on color ranges such as thresholding in rgb, lab, or hsv color spaces, or by finding radii in lab color space (the delta E demo). All you have to do is to use them to find out what the range or mean value is for the 4 regions (background, ripe, non-ripe, diseased) and determine which region (class) every pixel should be assigned to.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!