The matching was done against this target image:
Here are the resulting layers:
Now we want to blend these layers together. Perhaps the aspects of the tiles that match the original will interfere positively, and the irrelevant ones will wash out.
Here's a straightforward average of the tile layers:
This is less griddy than one might expect. To de-emphasize the tile edges further, in this rev, the layers are weighted with sine^2waves across the image in the x and y directions, at the appropriate frequencies such that the weights for a layer go to zero where tile edges appear. Here is one with that done (sin^4, in this case) in one direction:
and one with sin^2(x)*sin^2(y):
The target image is not all clear in the siney set. (That pooch face in the corner is there because a differently-cropped version of that image was one of the tiles, and it still matched adequately shifted by a chunk.)
Perhaps the tile weights should perhaps depend more on (the numbers that were calculated in finding the best matches, in "sneetch.c"): first, the weight is the score itself, then score^2 (pitching it even more toward the best matches, but with almost the same result). The target is becoming readable, but the tile images are disappearing (except for that damned "NASA").
Using a combination of (a gentler, never-zero) squared sine and squared score:
And a harsher sine^2 (some future rev should calm this down for hi-freq piece; it's spotty):
It would be nice if the user could define what parts of the image were foreground to be true to and which were background where more of the tile content could be allowed to leak through: emphasize the score in the foreground, and focus on smoothing in the background. Since this image's foreground is strongly brighter than its background, this can be simulated without writing a little paint program by referring to the value of the original when balancing the sine and score parts of the weighting. For example, use the log of the value (or just R from RGB space just this once; it's almost grayscale and almost dawn) for the exponent on the score. And try a smaller amplitude on the sine (next time, maybe a function of foregroundness).
The score doesn't seem to be making a big difference, so perhaps the
sine amplitude should be the function of luminance
foregroundness. Here it's clear that this is happening, since the
highest-frequency modulation is most noticeable in the "foreground."
Here's one with the sin amplitude ramping up for the layers of smaller tiles:
and the opposite:
We haven't seen much that looked a whole lot like the original yet. Now I'm curious just how much information from it has survived. Here's what you get if, for each pixel in the final image, you take the pixel from the tiles-layer that best matches that pixel in the original with regard to luminance:
That's good to see, though it might be informative to check if a stack of seven random images would do as well. In any case, there should be some compromise that balances between readable target content and readable tile content. As soon as results are available for the CWM rev, they will appear here. In the meantime, here's some fun:
Enough of the arctic fox. No halftoning project would be complete without these test targets: one's NMM professor and Lena, the halftoning goddess (muse?).
ebeth@media.mit.edu