필터 지우기
필터 지우기

How do i get both healthy and unhealthy portion of an image segmented?

조회 수: 1 (최근 30일)
Nazneen
Nazneen 2015년 10월 25일
댓글: Nazneen 2015년 10월 25일
I am doing a image processing based project to detect plant pathology. I have written a code and the segmented output that i have got contains only the healthy portion of the leaf. I guess the problem is with the thresholding . How do i get the proper segmented output. I have attached the code and sample image.

채택된 답변

Image Analyst
Image Analyst 2015년 10월 25일
You need to get the background. Then the diseased part is just
diseasedMask = ~(healthLeafMask | backgroundMask);
Use color segmentation to get the background, just like you already did to get the healthy part, except that you want white instead of green.
Why are you so in love with cell arrays? You are using them for no reason and just making your code more complicated. Plus there are too many loops. There is no reason to use cell arrays to store those images.
  댓글 수: 3
Image Analyst
Image Analyst 2015년 10월 25일
No, that's not correct. There is no need to use cell arrays in your situation. You can have a single loop and just read in and process the image all in that one loop. No need to save each image in a cell array unless you need to call it later in your program, which you don't.
See the FAQ for preferred methods:

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Agriculture에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by