falsetto
falsetto

Reputation: 789

How to scan and compare images in Java

I'm wondering if there is any possibility to compare images from my local disc with images placed in flash application located on a website. There is no possibility to get direct link to those images from the website, so I need method to scan image situated on exact coordinates. It would be great if it works fine with Robot class because I need to move mouse pointer remotely after this comparision.

Upvotes: 1

Views: 353

Answers (1)

Konstantin Pribluda
Konstantin Pribluda

Reputation: 12367

It is possible, but there are a lot of methods to compare images, depending on what result do you need.

  • do you need exact comparison? ( then compute hash over all the pixels )
  • do you need some dergee of similarity (compute invariant moments and calculate distance)

For the invariant moments you may use our pure java ocr library:

http://sourceforge.net/projects/javaocr/

( tricky part is choice of proper set of moments )

Upvotes: 1

Related Questions