Texture Synthesis from Example

Been wanting to get into texture synthesis from example for a while now :3this one quite old-school and is generated pixel by pixel with Markov Random Fields. Did both Houdini and Python implementations. Was quite fun! And it's just the beginning :D

(left column is generated, right is an example)

Based on this paper :)

Before, there were already ideas of “texture synthesis in a statistical setting as a problem of sampling from a probability distribution”. What the authors did different though is that instead of modeling the whole probability distribution, they ‘grow’ the texture pixel by pixel, every time constructing a unique PMF (probability mass function) for each new pixel. Ultimately, that changes the PMFs of the neighboring pixels, since conditioning has changed. But overall it seems not matter too much. Yet because of this property of ‘making a final decision right away from the available information’ you can observe quite a bit of noise in places of high uncertainty. (just let me bathe in the proud of that I can use these terms now, as I’ve been binging probability and statistics lectures for the past 2 weeks… it’s paying off!).

I used truncation of the PMF to filter out unlikely samples (but there is a balance of how ‘strict’ vs ‘creative’ you want the output; unlikely samples can really surprise you!). Then I was chasing nans… but then it worked! And I was jumping around the apartment :D

Recent Posts