简体   繁体   English

适当的轮廓断裂

[英]Proper contour break

I want to analyse object geometry in images with the help of contours. 我想借助轮廓分析图像中的对象几何。 This way parameters like angle and distance can be determined: 这样可以确定角度和距离等参数:

在此输入图像描述

But some images look like this: 但有些图像看起来像这样:

在此输入图像描述 在此输入图像描述 在此输入图像描述 在此输入图像描述

I am trying to make a contour break in between both objects, problem is that the objects have not a fixed size. 我试图在两个对象之间做一个轮廓断裂,问题是对象没有固定的大小。 They can change their length and shape. 他们可以改变他们的长度和形状。 As a result the contour break is done at wrong positions, so that no proper analysis is possible. 结果,轮廓断裂在错误的位置完成,因此不可能进行适当的分析。 Right now the contour break is coupled with the size of the lower object. 现在,轮廓断裂与下部物体的尺寸相结合。 This is how a correct break should look like: 这是正确的休息应该是这样的:

在此输入图像描述

Any idea how to solve this? 不知道怎么解决这个问题?

Edit: 编辑:

Folder with Input Images: https://ufile.io/v6fqs 带输入图像的文件夹: https//ufile.io/v6fqs

Example: 例:

在此输入图像描述 在此输入图像描述 在此输入图像描述

Thanks for the examples and the well framed question. 感谢您的示例和精心设计的问题。

That's a big issue indeed, even more considering medical imaging. 这确实是一个大问题,甚至更多考虑医学成像。 Seems to me that the answer lies in a blob detection and separation method. 在我看来,答案在于blob检测和分离方法。

A good method for that would be to do some binarization, morphological transforms and search for convexity defects ( https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gada4437098113fd8683c932e0567f47ba ). 一个好的方法是进行一些二值化,形态变换和搜索凸性缺陷( https://docs.opencv.org/master/d3/dc0/group__imgproc__shape.html#gada4437098113fd8683c932e0567f47ba )。

convexityDefects =  cv.convexityDefects(contour, convexhull[, convexityDefects] )

And I also think this thread can help you as well: 我也认为这个主题也可以帮到你:

http://answers.opencv.org/question/71691/single-blob-multiple-objects-ideas-on-how-to-separate-objects/ http://answers.opencv.org/question/71691/single-blob-multiple-objects-ideas-on-how-to-separate-objects/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM