- An averaging operation of all these images assuming white is intensity 255 and black is intensity 0 will lead to an image with a gradient with the ellipse being mostly white and the surroundings being less than 255. If you threshold this averaged result with a high threshold you will get an image which is mostly an ellipse.
- If you perform an AND operation of several images, only the white pixels common to all the images should remain. There will be some extraneous smaller patches of white left which you can remove using morphology operations.
Image segmentation: I want to get rid of ugly "branches" of a binary image
조회 수: 2 (최근 30일)
이전 댓글 표시
See attached photo. I want to keep the ellipse in the blue while getting rid of the roots that stick out. there are thousands of images with different such branches but the same shaped reoccuring ellipse in the centre.
Morphology does not work, there are big holes in the ellipses sometimes so I cant erode, and the roots sometimes touch the ellipse twice making "imfill" impractical.
would active contours or some kind of shape fitting work? a point in the right direction would be great!
댓글 수: 0
답변 (2개)
Gautham Sholingar
2017년 7월 17일
There are a few ways to approach this issue:
1) Considering that you have several images where the ellipse is the one common theme between all of these images, you can essentially combine these images in some form of averaging/logical AND operation to remove all the roots and extraneous elements which will differ from one image to the next.
2) It is useful to play around with the image segmenter app to identify ways to segment the image using active contours.
The following documentation link explains this in detail: http://www.mathworks.com/help/images/ref/imagesegmenter-app.html
댓글 수: 0
Walter Roberson
2017년 7월 17일
imerode(), bwareaopen() to get the largest object, imdilate by the amount you eroded, find boundaries, use boundaries to extract everything inside the original ellipse
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!