title: How to compare images for similarity using java
body: <p>Recently I got an opportunity to work with Image Processing Technologies as a part of one of my projects and my task was to find matching images from an image store when a new image is given. I started my project with googling "How to compare images using java" and I got some good articles on finding the similarity of two images. Almost all of them were based on four basic steps, they are:</p>
  
  <pre><code>1.Locating the Region of Interest (Where the Objects appear in the given image),
  2.Re-sizing the ROIs in to a common size,
  3.Substracting ROIs,
  4.Calculating the Black and White Ratio of the resultant image after subtraction.
  </code></pre>
  
  <p>Though this sounds as a good algorithm to compare images, it takes a considerable amount of time after implementing it using <strong>JAI</strong> in my project. Therefore I have to find an alternate method of doing it.</p>
  
  <p>Any suggestions?</p>