开发者

Image distortion algorithm

I'm trying to come up with a way to distort an image similar to the example here: http://tinypic.com/r/16gn60o/7

The idea is to remove any hard 开发者_如何学编程lines in the original image. I would like the original image to be "about the same" not a hard swirl effect you see in some screensavers or anything like that.

Any pointers or idea would be great!


You could make a "stamp" that pushes pixels out radially. That is, precalculate a mapping (for a patch smaller than your image) that takes pixels from the center of the patch to a point a little further out, and have this displacement start at zero in the center, grow with the radius, but then get smaller as you approach the boundary of the patch so that it's zero at the edges. Then apply this deformation at random points around your image until you've covered the whole image.

Note that this will will actually sharpen the edges a bit, but make them not straight, like your example image. Note that in the example, the edges are actually more sharp and defined (see the edge of the dog's right ear for example), but just not straight, so I'm assuming this is what you mean by "hard".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜