Java 形状识别算法/代码
我正在寻找 Java 的形状识别工具。特别是,我想找到一个 Java 库,它给定一个图像文件(jpeg、bmp、gif 或任何常见的图像文件格式),为我提供有关在图片及其坐标。
在之前关于此主题的问题中,我看到了针对 C# 的建议,但我无法找到 Java 中的任何实现。
希望有人能帮助我!
I'm looking for a shape recognition tool for Java. In particular, I'd like to find a Java library that given an image file (in jpeg, bmp, gif or any common image file format) gives me information about the regular shapes (rectangles, lines, ...) found in the picture and their coordinates.
In previous questions on this topic I've seen recommendations for C# but I'm unable to find any implementation in Java.
Hope somebody can help me!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你看过 OpenCV 吗?我相信有 Java 包装器。您到底想实现什么目标?
Have you taken a look at OpenCV? I believe there are Java wrappers for it. What exactly are you trying to accomplish?
如果你想识别人类绘制的二维形状,我建议你更具体地研究神经网络, kohonen 网络或自组织地图 该网络通常提供一个 2d 布尔数组,指定用户绘制的内容如果像素是前景色,则形状标记为
true
;如果像素是背景颜色,则标记为false
。 Jeff Heaton 撰写了多本有关 kohonen 网络的书籍,并提供了一个有效的 OCR 示例,该示例根据向网络教授的一组预定义样本(形状)来识别用户绘制的字符。您可以在此处找到源代码和一个小程序此处。我相信 Encog 框架 就是您正在寻找的。
if you want to recognise human drawn 2d shapes I would recommend you to look into neural networks more specific, kohonen networks or self organizing maps this network is usually fed a 2d boolean array specifying the user drawn shape marking
true
if the pixel is the foreground color andfalse
if the pixel is a background color. Jeff Heaton has written several books on kohonen networks and has provided a working OCR example recognizing user drawn characters based on a set of predefines samples (shapes) being taught to the network. You can find the source code here and an applet here.I believe the Encog framework is what you're looking for.