[Image-SIG] quick pixelwise euclidean difference

Lauri Love (nsh) lauri.love at gmail.com
Sat Dec 5 20:56:57 CET 2009

i'm coding a project which requires quick comparison of two images per pixel
by colorspace (distance is the sum of the squares of the differences of RGB
values over the pixels of the images), as a fitness function (i am trying to
recreate/extend roger alsing's genetic mona lisa code in python).

creating an absolute difference image takes about 1/100th of a second on my
(eeepc) hardware, but i can't figure out a way to reduce the difference
image to an integer of float value quickly. it takes about the order of 5
seconds to iterate through all the pixels and sum the RGB values to get the
manhattan distance. "manually" calculating the manhattan or euclidean
distances between the two images is even slower.

can anyone suggest a way to quickly get either distance from two images?

sincerely and gratefully,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20091205/ecf450cc/attachment-0001.htm>

More information about the Image-SIG mailing list