comparing 2 images

Bengt Richter bokr at oz.net
Thu May 15 12:25:12 EDT 2003


On 14 May 2003 23:41:37 -0700, the_3_project at yahoo.com (Joe Green) wrote:

>Hello,
>
>I would like to take 2 images (scanned) and compare them to see if
>they are similar. An example (but not limited to), would be 2
>signatures.
>
>What would be the most suitable library/module to use for this (if
>any). I have been looking through the PIL documentation (yet to look
>into ImageMagick). Am I knocking down the wrong doors? Is this even
>do-able in Python (I need to maintain portability)?
>
>Any hints/guides/references would also be greatly appreciated.
>
IWT the first thing would be to define terms. I.e., you say the "images"
to be compared are scanned, so maybe we can presume that they are scanned
on the same scanner with the same settings, but what about the images
themselves? Are they scanned with identical orientation? Are the margins
around the ares of interest identical? Are the areas _not_ of interest
simple uniform background? Are the images from photographs, which could
be scaled differently, not to mention differences for 3D objects viewed
differently, lit differently, with different focus/depth of field, etc.
Is the image data pre-processed, e.g., for anti-aliased display, or
pre-converted to black and white? Do you trust the software that came
with the scanner to do that, if color is not of direct interest?

What aspects of the images to you want to ignore? Color? Scale? Rotation?
Other distortion? Careful: E vs 3, x vs +, etc. IOW, what does "similar"
really mean for your problem domain?

Regards,
Bengt Richter




More information about the Python-list mailing list