形态学操作改善分割图像的形状 [英] Morphological operation to improve the shape of segmented image
问题描述
我在图像中有一个椭圆。分割后,我得到一个破碎的椭圆,如图所示。使用形态学操作得到完美的椭圆
I have an ellipse in the image.After segmentation i got a broken ellipse as shown .which morphological operation is used to get the perfect ellipse
实际输入文件为
Actual input file is
获得的输出是
output obtained is
我试过imopen,但我会失去较低的椭圆状结构。如何关闭上部椭圆状结构而不会丢失较低的
i tried imopen ,but i will lose lower ellipse like structure .how to close the upper ellipse like structure without losing lower ones
我创建的面具是
Mask i created is
我想将椭圆分割成类似结构。但是有些这些结构与矩形体相连。如何将它分开。 erode将消除小椭圆
i want to segment the ellipse like structure.but some of these structures are connected with rectangular like bodies.how to separate it. erode will eliminate small ellipses
推荐答案
如果你想用数学形态学算子重新连接某些东西,不要使用开口(它会增加差距),但结束(imclose)!这些名称是明确的。
If you want to reconnect something with a mathematical morphology operator, do not use an opening (it increases the gap), but a closing (imclose)! The names are explicits.
在这种情况下,你想重新连接垂直切割的东西,所以使用水平结构元素(类型段)。
In you case, you want to reconnect something vertically cut, so use a horizontal structuring element (type segment).
是的,你必须反转你的图像,黑色像素表示没有信息。
And yes, you have to invert your image, black pixels representing the absence of information.
这篇关于形态学操作改善分割图像的形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!