3

I am trying to develop automation program to capture two images and then compare those images to see if they are similar or not.

I am using Windows 7 and Eclipse IDE (JAVA) with Selenium web-driver.

I have done my research and found JMagick would be the best fit for me but i have been unsuccessful making it work with eclipse. I have installed JMagick, ImageMagick and have added the local libraries to the eclipse.

The problem is that i can not find any guides or helpful links that can help me understand the following problems. How do i automate JMagick to take screenshot? How do i save those taken screenshots? And how do i compare those taken screenshots pixel by pixel? All of these using JMagick and at the end how do i display the diff image?

If anyone has any ideas or know of any guides please provide them! Any help is greatly appreciated.

Thanks!

Andrea
  • 11,801
  • 17
  • 65
  • 72

1 Answers1

0

Why don't you use OpenCV instead? JMagick is not enough documented. You have to look at the ImageMagick documentation.

However, if I were you, I would write a script to be called from your code.

To take a screenshot:

import -window root screen.jpeg

Also, to compare two images, you can read this guide

I hope this help you!

Luca Davanzo
  • 21,000
  • 15
  • 120
  • 146
  • Thanks for this! But i was looking for more code specific answers. If you can provide that as well it will be great! So far this is what i kinda have. – soocker1player Dec 07 '12 at 16:48