Initialize random allRGB permutation, and randomly pick pairs of pixels to swap, if the resulting sum of squares of distances from the target pixels becomes smaller. Distances are calculated in the Lab colorspace, using the metric from: https://www.compuphase.com/cmetric.htm
In the allRGB image to get the source pixel to compare, pixels are averaged from a 3x3 area, in the Lab colorspace, with an approximate gaussian weighting: weight 4 for the center, 2 for the edges, and 1 for the corners. And then I ran this for a couple days, and it did 6.95 billion iterations. 0.9% of the iterations resulted in swaps, for a total of 62,338,350 swapped pixels.
Date | |
---|---|
Colors | 16,777,216 |
Pixels | 16,777,216 |
Dimensions | 4,096 × 4,096 |
Bytes | 50,414,497 |