문제

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:

Need such distortion

도움이 되었습니까?

해결책

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.

다른 팁

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:

  1. 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)
    ...                ...
    
  2. 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top