- 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
1 次查看(过去 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!