필터 지우기
필터 지우기

How to obtain the segmented object from the binary segmented output?

조회 수: 2 (최근 30일)
Nazneen
Nazneen 2015년 10월 24일
댓글: Nazneen 2015년 10월 24일
I am doing my project in image processing to detect plant pathology, I have to segment the image for the same. I have used otsu's segmentation and got the binary output. How to get the leaf object from the binary output. '.*' is not working, I am getting an error which says ??? Error using ==> times Integers can only be combined with integers of the same class, or scalar doubles.
Error in ==> review_first at 76 seg{i}=I{i}.*bw{i}
where I{i}&bw{i} are the first input image and binary output respectively.

채택된 답변

Image Analyst
Image Analyst 2015년 10월 24일
If the I variable is uint8 or uint16, then bw must be also if you are to multiply them. bw is probably logical. Try casting bw to the same integer class.
seg{i}=I{i} .* uint8(bw{i});
  댓글 수: 1
Nazneen
Nazneen 2015년 10월 24일
??? Error using ==> times Matrix dimensions must agree.
Error in ==> review_first at 77 seg{i}=I{i} .* uint8(bw{i});
Now I am getting this error. I have resized my image to [128 * 128]. Can you please help me with this.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by