Mapping an image onto a set of coordinates

泄露秘密 提交于 2019-12-01 11:13:29

I have some examples of the distort operators on my site ( http://www.rubblewebs.co.uk/imagemagick/operators/distort.php ) - using php but you will get the idea.

You probably want the shepards method.

$cmd = "$input -matte -virtual-pixel transparent".  
" -distort Shepards \"0,0 0,0  0,100 20,100 0,200".  
" 0,200 133,200 133,180 266,200 266,200 266,100".  
" 246,100 266,0 266,0 133,0 133,20\" ";  
exec("convert $cmd shepards.png");

Look into ImageMagick's Freeform Distorts.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!