Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    San Francisco, CA

    Red face Unanswered: what's the way to compare two images?

    Can anybody tell me how to compare images?
    I think there is an algorithm for it.Please tell me if anybody knows somethign about this subject?
    I want to know the mechanism to compare an image with the images kept in the database.Just like the criminal tracking system..

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    The short, simple answer is to load two images into memory, then compare each pixel in the two images to each other. Keep a running total of the number of differences, and a sum total ff the deltas. (probably a square-root of the sum of squares delta for R, G, and B)

    After the images are compared, use the above to determine of you have a "match"

    However, there are some chalenges that you'll need to address.

    to name one,
    Scale of the images. How do you handle it of one image is of a different size than another? What if you take an image, crop it, then strech it so that it's again the same size? What if one image is rotated a bit?

    to name another, brightness/contrast of images. You'll need to adjust the images so as to get an approximate duplicate of a brightness histogram.
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts