How should find range of disease area in mango image?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Image Analyst
2014년 3월 29일
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
Image Analyst
2014년 3월 29일
What link? Here's a link with a good collection of color sites: http://www.efg2.com/Lab/Library/Color/index.html
Image Analyst
2014년 3월 29일
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.
추가 답변 (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!