What software can compare the difference between two images?

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
I remember some websites were doing this around the time nVidia was accused of cheating because of their optimizations for 3DMark. The same stuff would be shown black, and differences between the images would show up as dots and lines through the black background. Anyone know what software was used to do that?
 

gsaldivar

Diamond Member
Apr 30, 2001
8,691
1
81
Probably just Photoshop.

Put the two images you wish to compare in separate layers, and have the overlying layer perform a subtractive/difference effect on the underlying layer.

The resulting image which emphasizes the "differences" between the two images can be used by itself, or superimposed back on top of one of the original images - made partially visible or tinted for ease of viewing.
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
Not to hijack this thread, but does anyone know of an algorithm to quickly count major differences in pixels in the two images? Photoshop will highlight differences by making those areas more visible. I want to be able to count those pixels. Preferably in C.
 

neit

Senior member
Dec 6, 2001
353
0
0
igowerf,

Its been a while since i've actually programmed something, but here's a guess as to how you could do it. With some sort of image library (gd? i dunno exactly how they work) open up the 2 pictures and store their pixel values as arrays. something like this:

create 3 arrays a1, a2, a3
a1 and a2 are the pictures
a3 is an array of booleans

if( (a1[n] -a2[n]) > threshold)
a3[n] = true


That method would hold on to which pixels didn't fall in the threshold. you could alternatively just use a counter instead of a third array.

Its a slow method it seems, but that was what i got from the top of my head
 

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
Originally posted by: gsaldivar
Probably just Photoshop.

Put the two images you wish to compare in separate layers, and have the overlying layer perform a subtractive/difference effect on the underlying layer.

The resulting image which emphasizes the "differences" between the two images can be used by itself, or superimposed back on top of one of the original images - made partially visible or tinted for ease of viewing.

I can't figure out how to do that :confused:
 

gsaldivar

Diamond Member
Apr 30, 2001
8,691
1
81
Here's a quick & dirty example:

Original Image #1:
http://s120394954.onlinehome.us/personal/1.bmp

Original Image #2:
http://s120394954.onlinehome.us/personal/2.bmp

#1 and #2 combined in Photoshop, the overlying layer performing a difference effect on the underlying layer:
http://s120394954.onlinehome.us/personal/differences.psd

The resulting differences have been flattened and superimposed on top of #2, which has been tinted in order to make the differences clearer to the viewer:
http://s120394954.onlinehome.us/personal/emphasis.psd
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
Originally posted by: igowerf
Not to hijack this thread, but does anyone know of an algorithm to quickly count major differences in pixels in the two images? Photoshop will highlight differences by making those areas more visible. I want to be able to count those pixels. Preferably in C.

Should be able to subtract those images, and then perform a color histogram analysis on the resulting image.
 

Jeff7181

Lifer
Aug 21, 2002
18,368
11
81
Yeah, I realize what you're saying, gsaldivar. I just can't figure out how to do it.
 

mysticfm

Member
Jun 21, 2004
137
0
0
Paint Shop Pro can be used to show the differences between two images using its "Image Arithmetic" feature.
 

gsaldivar

Diamond Member
Apr 30, 2001
8,691
1
81
Free feel to PM me if you have any questions about this Photoshop technique Jeff.
 

igowerf

Diamond Member
Jun 27, 2000
7,697
1
76
Originally posted by: VirtualLarry
Originally posted by: igowerf
Not to hijack this thread, but does anyone know of an algorithm to quickly count major differences in pixels in the two images? Photoshop will highlight differences by making those areas more visible. I want to be able to count those pixels. Preferably in C.

Should be able to subtract those images, and then perform a color histogram analysis on the resulting image.

Could you elaborate please? Would I need special libraries? I'd like to avoid doing the O(m*n) method of going through pixel by pixel if possible.