get the inner white circle
조회 수: 1 (최근 30일)
이전 댓글 표시
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153730/image.png)
i wanted to get the inner white circle and blacken all the remaining portions....
please can someone help me solve this...
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153731/image.png)
i am trying to get such an image.... but not getting... please help...
댓글 수: 0
채택된 답변
Walter Roberson
2016년 2월 1일
regionprops() 'BoundingBox' would give you the bounding box without any problems. You could also request the 'Eccentricity' and use that to choose between the two output regions. You might also want the 'Image' property.
댓글 수: 2
Walter Roberson
2016년 2월 1일
regionprops() is going to give you a structure array of length 2. You can examine the properties returned to decide which of the two each one refers to.
If you have a newer version of MATLAB, R2014b or later, you can use bwareafilt() and ask to keep the 1 'smallest'
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Denoising and Compression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!