图像畸变算法

发布于 2024-09-25 04:19:02 字数 214 浏览 1 评论 0原文

我正在尝试想出一种扭曲图像的方法,类似于此处的示例: http://tinypic.com/r/16gn60o/7

这个想法是删除任何硬线在原始图像中。我希望原始图像“大致相同”,而不是您在某些屏幕保护程序或类似内容中看到的硬漩涡效果。

任何指示或想法都会很棒!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静谧 2024-10-02 04:19:02

您可以制作一个“图章”,将像素径向推出。也就是说,预先计算一个映射(对于比图像小的面片),该映射将像素从面片中心到稍远一点的点,并使该位移从中心的零开始,随着半径增长,然后当您接近补丁的边界时,它会变小,以便在边缘处为零。然后在图像周围的随机点应用此变形,直到覆盖整个图像。

请注意,这实际上会稍微锐化边缘,但会使它们不直,就像您的示例图像一样。请注意,在示例中,边缘实际上更加锋利和清晰(例如,参见狗右耳的边缘),但只是不直,所以我假设这就是您所说的“硬”的意思。

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".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文