i&#39;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&#39;s genetic mona lisa code in python).<div>
<br></div><div>creating an absolute difference image takes about 1/100th of a second on my (eeepc) hardware, but i can&#39;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. &quot;manually&quot; calculating the manhattan or euclidean distances between the two images is even slower. </div>
<div><br></div><div>can anyone suggest a way to quickly get either distance from two images?</div><div><br></div><div>sincerely and gratefully, </div><div><br></div><div>-nsh</div>