Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shape recognition algorithms/code for 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!

like image 412
Jordi Cabot Avatar asked Mar 14 '26 01:03

Jordi Cabot


2 Answers

Have you taken a look at OpenCV? I believe there are Java wrappers for it. What exactly are you trying to accomplish?

like image 116
Ronald Avatar answered Mar 15 '26 16:03

Ronald


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 and false 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.

like image 29
MircoProgram Avatar answered Mar 15 '26 15:03

MircoProgram