dqwh1203 2010-12-19 05:13
浏览 166
已采纳

波纹图像扭曲效果UV翻译算法,采用PHP或C风格的语言,类似于GIMP中的一种

I've been working on a UV to XY coordinate space translation algorithm for applying image distortions based on simple equations, in PHP.

My algorithm uses four point bi linear interpolation.

And calculates the position in the original XY space for every point in the UV space.

I've tried to get a Ripple effect like the one seen in The GIMP. I used the translations x = u+2*sin(u/5), and y = v+2*sin(v/5).

however instead of a smooth ripple effect as seen when using the gimp, I get a highly blurred effect (must more than I expected to get).

Can any one point me towards a better way to achieve this effect.

Or free easy to follow preexisting algorithms in either PHP or another language with C-like syntax.

So far all I've been able to with with Google is ready made algorithms that are part of a library that for sale.

  • 写回答

1条回答 默认 最新

  • dtoq41429 2010-12-28 00:55
    关注

    I've tried to get a Ripple effect like the one seen in The GIMP. I used the translations x = u+2*sin(u/5), and y = v+2*sin(v/5).

    I needed to use x = u+2*sin(v/5), and y = v+2*sin(u/5) to get the expected effect.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)