필터 지우기
필터 지우기

How can I get the outer most contour of the syntax (contour)?

조회 수: 2 (최근 30일)
Shahin Safazadeh
Shahin Safazadeh 2018년 2월 26일
댓글: Shahin Safazadeh 2018년 2월 26일
Using the syntax (contour), I will have 10 contours for a binary image!! and when I assign 1 in the syntax, I will get the inner most contour. How can I get the outer most contour only?
  댓글 수: 4
Image Analyst
Image Analyst 2018년 2월 26일
편집: Image Analyst 2018년 2월 26일
Please attach your binary image and tell us what you want. I think you can get what you want without using contour, such as by hole filling with imfill(), or by using bwperim(), bwconvhull(), or bwboundaries() or something. It really doesn't make much sense to use contour on a binary image if you think about it.
Shahin Safazadeh
Shahin Safazadeh 2018년 2월 26일
Basically, my mask is in gray scale (256). However, I converted it to binary in order to get the contour. However, I think bwperim() might works here. (I didn't know this syntax) Anyway, I attached the mask file. Please let me know how to get the largest contour instead of the perimeter pixels (if it is possible)
Thank you very much

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

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by