Finding a picture in a picture with java?

Posted by tarrasch on Stack Overflow See other posts from Stack Overflow or by tarrasch
Published on 2012-09-26T09:39:45Z Indexed on 2012/10/02 9:38 UTC
Read the original article Hit count: 334

Filed under:
|
|

what i want to to is analyse input from screen in form of pictures. I want to be able to identify a part of an image in a bigger image and get its coordinates within the bigger picture. Example:

box

would have to be located in

big picture

And the result would be the upper right corner of the picture in the big picture and the lower left of the part in the big picture. As you can see, the white part of the picture is irrelevant, what i basically need is just the green frame. Is there a library that can do something like this for me? Runtime is not really an issue.

What i want to do with this is just generating a few random pixel coordinates and recognize the color in the big picture at that position, to recognize the green box fast later. And how would it decrease performance, if the white box in the middle is transparent?

The question has been asked several times on SO as it seems without a single answer. I found i found a solution at http://werner.yellowcouch.org/Papers/subimg/index.html . Unfortunately its in C++ and i do not understand a thing. Would be nice to have a Java implementation on SO.

© Stack Overflow or respective owner

Related posts about java

Related posts about picture