Reputation: 115
I have a like-black-box program (compiled code), which generates such images from text. My goal is to recreate such algorithm in my program. Problem is I need exactly the same algorithm. I tried sin-wave along x-axe, results are quite similar, but really not the same.
Can anybody tells me what image distortion filter is used, and maybe where to read about its algorithm/implementation. Thanks.
Image with desired results here:
Upvotes: 5
Views: 847
Reputation: 12592
In older times I have done this on an Atari ST. The algorithm I used was p(x,y) = p(sin(x)), (sin(y)) but on y-axis you need to add or double the pixels or the lines. This trick makes the special look like a fluid water effect. In fact it was an error and I forgot to delete the pixels in y-axis.
Upvotes: 2
Reputation: 4487
I don't think it's possible to reverse engineering the exactly same algorithm, because they might just add a little random salt preventing you from that. You might want to get a same-enough algorithm instead of an exactly same one.
If I were you, I will:
Treat this algorithm as a pixel-mapping function, which means that looks like:
New picture Raw picture
(0,0) (0,0)
(0,1) (0,0)
(0,2) (1,2)
(0,3) (1,3)
... ...
Decide that to which raw pixel a new pixel should map. I would like to just initialize the mapping function by a no-changed function, and then apply a Monte Carlo based algorithm (like Genetic Algorithm) to train the function. In each iteration, randomly move or copy a small group of pixels to a neighbor location. Finally you will get an ideal function after enough iterations.
Upvotes: 1