如何删除凸性缺陷中不需要的点 [英] How to remove unwanted points in convexity Defects

查看:107
本文介绍了如何删除凸性缺陷中不需要的点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的程序中,我能够使用ConvexHull()和cvConvexityDefects()检测指尖和谷值。但每个指尖都有超过1个圆圈。现在我想删除不需要的圆圈,每个指尖只画一个圆圈。我可以这样做吗?我希望我的问题很明确:-) Thanx提前

Hi, in my program i was able to detect finger tips and valleys using ConvexHull() and cvConvexityDefects(). But there are more than 1 circles in each finger tip. now i want to remove unwanted circles and draw only one circle for each finger tip.how can i do that? i hope my question is clear :-) Thanx in advance

推荐答案

我认为你在指尖上观察到的圆圈都是相互嵌套的。而且我认为你只想拥有外部嵌套圈,删除所有内部圈。如果是这样,你可以开发一个简单的算法:找到每个圆的凸包。比如说,收集所有船体点并选择每个圆圈的最左侧和最右侧点,并在这些最小/最大x值之间创建这样的x间隔。如果我没有太多错误,内圈将始终具有与外圈相比的嵌套间隔。通过这种方式,您将能够找到最外层的圆圈。



-SA
I think that your circles you observe on the finger tip are all nested in each other. And I think that you want to have only the outer nested circle, remove all inner ones. If this so, you can develop a simple algorithm: find a convex hull of each "circle". Say, collect all hull points and choose the "leftmost" and "rightmost" point of each "circle" and create such an x-interval between those minimal/maximum x values. If I''m not much mistaken, the inner circle will always have the nested interval compared to an outer one. This way, you will be able to find out the most outer "circle".

—SA


这篇关于如何删除凸性缺陷中不需要的点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆