Our main idea is to place a limited number of rectangles of various
sizes in an image (more precisely in each of the two images that will
be compared), then to compute the average color of each rectangle in
CIE XYZ color space, and finally to convert the average color to the
CIE LUV space and compute the color difference using the CIE LUV
color difference formula:

Color differences will be weighted according to the rectangle size
and the contrast sensitivity function. In this way the differences
that are more visible to us will be weighted stronger, and they will
contribute more to the final distance. CIE LUV space was chosen as
it is perceptually more uniform than CIE XYZ. If there is some noise
in the image, it will automatically be neglected by the contrast
sensitivity function, unless it is visible and significantly
influences our vision. Actually, more visible differences will
contribute to the error more significantly.
As the number of all possible rectangles of various sizes in an image is huge we are going to use only a subset of all rectangles. We will not allow very thin rectangles, as we do not think they are so important in the image comparison. Positions and orientation of rectangles will be chosen quasi randomly, which makes the metric deterministic.