FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   comparing images?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: comparing images?  (Read 2625 times)
Ethan

thanton3 WWW
comparing images?
« on: Apr 8th, 2005, 2:32am »

Given two jpgs for example, how would you determine how similar they are? I'm just thinking that there must be algorithms for this sort of thing, but I'm not even sure what to search for.
 
Left to my own devices, I guess I would start with the edge detection example, or value comparisons to try and find composition similarities.... and then compare colors within matching value areas...  
 
Any suggestions on what to research?
 
Thanks
 
cello

marcello3d WWW
Re: comparing images?
« Reply #1 on: Apr 8th, 2005, 5:11am »

Depends if you want a pixelwise comparison or imagewise comparison.
 
Pixelwise would only help if the images are perfectly aligned and derivative in some method.
 
Otherwise you may want to look into fourier transforms and wavelets as to alternative ways of looking at images.  These topics are both very mathematical and complex, so prepared for some nasty shiz.  (Currently studying these myself at school, and currently very confused.)
 
Marcello
 
Fish-face

308232952308232952thedemonsheep WWW Email
Re: comparing images?
« Reply #2 on: Apr 9th, 2005, 3:26pm »

I don't know much on this, but with my limited knowledge, any suggestion I make shouldn't be too difficult!
 
I'd try subtracting one image from the other, and seeing what the resulting image is. If each image is identical, then the result would be completely black. This works pixel-by-pixel, though, so perhaps not a good idea.
Better would be to take a blurred version of each image, and subtract them. This would make black blobs where the images are similar, and white blobs where they're different.
 

--

The C@ S@ on the M@
=Fish-Face=
~#Chris#~
TomC

WWW
Re: comparing images?
« Reply #3 on: Apr 9th, 2005, 3:52pm »

Have a look at www.generation5.org, which has some sample code for Kohonen networks which do what you want.
 
They are pretty complex though.
 
kevinP

Email
Re: comparing images?
« Reply #4 on: Apr 9th, 2005, 9:34pm »

on Apr 9th, 2005, 3:26pm, Fish-face wrote:
I'd try subtracting one image from the other, and seeing what the resulting image is. If each image is identical, then the result would be completely black. This works pixel-by-pixel, though, so perhaps not a good idea.
Better would be to take a blurred version of each image, and subtract them. This would make black blobs where the images are similar, and white blobs where they're different.

 
This is similar to the principle behind "unsharp masking", an image manipulation process that goes back to film. It's always surprising to realize that many techniques that we think of as digital image processing (mattes, outlines, unsharp masking, etc.) originated as film-based techniques. I guess this is due to their analogue nature.
 
-K
 

Kevin Pfeiffer
Pages: 1 

« Previous topic | Next topic »