0
$\begingroup$

There's a set of pictures that if you take them literally, they're different. That is, there can be two images of the same thing among them, only in different hue. In addition, among these two, there is a difference in the white pixel filling. That is, there are several pixels that do not match the criterion: white or non-white.

What is the algorithm for finding such two pictures?

$\endgroup$
1
  • $\begingroup$ Two images that are only differ by a constant value, whether that value is related by luminance, gamut, or some combination, will have a constant difference in the distance between texels. One way to measure that is by computing the distance between both texels then comparing. There will be some minor variance resulting from precision so a delta should be accepted. $\endgroup$
    – pmw1234
    Commented Nov 8, 2022 at 11:26

1 Answer 1

1
$\begingroup$

I am unsure exactly about your white pixel filling criterion. However, I will offer a solution.

Create a histogram for each image and compare histograms. If for instance there are 800 red pixels in image A and 800 blue pixels in image B we can make an assumption that there exists a mapping from red to blue across images. There could be some mapping subtleties, for instance there could be 800 red and 800 yellow pixels in image A, then we would need to do a little work to determine which color maps to which color in image B, but that is a workable edge case.

Now (and this is assuming I understand your white filling problem) start with the image with the most white in its histogram and compare pixel for pixel both images. We do not need to compare the white pixels, because we already know there is not a 1:1 mapping between images. If all of the other pixels map correctly, then we know the image fits our idea of equality.

$\endgroup$
1
  • 1
    $\begingroup$ Or compare a fourier distribution. $\endgroup$
    – joojaa
    Commented Jul 10, 2022 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.