Java中一组点的简单形状识别
我在坐标系中有一组随机分布的点,我有兴趣识别其中一些点是否形成任何几何图形,如正方形、圆形、平行四边形或简单的直线。
是否存在用于识别模式的库或算法? 或者也许有一些关于如何编程类似的东西的技巧?
I have a set of randomly distributed point in a coordinate system and I'm interested in recognising if some of the points form any geometric figures like a square, circle, parallelogram or simple lines.
Do exists any libaries or algorithms for recognising patterns?
Or maybe some tipps how to program something like that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Haar 和 HOG 是标准算法。
一个很好的图像识别库 - 诚然更多的是用于面部和车辆等,而不是几何图形,但这只是一个训练问题 - 是 OpenCV,如果您挖掘得足够多,它具有 Java 绑定。
Haar and HOG are the standard algorithms.
A good library for image recognition - admittedly more for faces and vehicles and such, rather than geometry but that's just a question of training - is OpenCV, which has Java bindings if you dig enough.
这是一个相当复杂的问题。您可能想阅读的众多工具之一是霍夫变换,它主要用于检测线,但可以适应其他形状。
It's quite a complex issue. One of the many tools you might want to read about is the Hough transform, it's used mainly to detect lines but can be adapted to other shapes.