<p>I am unsure exactly about your white pixel filling criterion. However, I will offer a solution.</p>
<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2022-07-10T12:47:23.670Z
Or compare a fourier distribution.
joojaa
CC BY-SA 4.0
2022-06-09T17:14:05.633Z
2022-06-09T17:14:05.633Z
Gabriel Rohweder
<p>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.</p>
<p>What is the algorithm for finding such two pictures?</p>

CC BY-SA 4.0
2022-11-08T11:26:41.630Z
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.
pmw1234
<image-processing><image><raster-image>
How to identify images with similar content?
user309485
# How to identify images with similar content?

(Asked by: username_0 on 2022-06-01)

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?

**Tags:** image-processing, image, raster-image

> **Comments:**
> **username_1**: 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.  

---

## 1 answers

### Answer by username_2 on 2022-06-09. Score: 1

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.

> **Comments:**
> **username_3**: Or compare a fourier distribution.  

---

