How to remove small connected parts in the image without smoothing the others?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I would like to remove the "triangle protuberance" in the belowing image, but I don't want to change the other part of the image. As the "triangle protuberance" is connected to the main "ellispe" like part, I could not use "bwareopen" function to remove it. I have tried the " watershed", but don't have a good output. Besides, I also have tried "imclose" and "imopen" combination, it smoothed the other part unintendly. I need some suggestion in how to deal with this problem. Any advise in processing procedure, matlab function or algorithm will be appreciated. Thank you.
The original image has been attached.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224335/image.bmp)
답변 (1개)
KSSV
2019년 6월 13일
- Read the image
- Get the locations of black pixels
- Fit the ellipse for the data
- Plot the ellipse on the image
- Use inpolygon and remove the unwanted points.
Check in fileexchange for fitellipse functions. Read about inpolygon.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!