PlaneMylinder中有一个选项可以扭曲imageMagick来制作像下面的图像吗? [英] Is there a options in Plane2Cylinder distort of imageMagick to make a Image like bellow?

查看:184
本文介绍了PlaneMylinder中有一个选项可以扭曲imageMagick来制作像下面的图像吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Plane2Cylinder失真时,我得到了如下图像。但我希望效果像第二张图像。请仔细阅读我的代码。

When I used Plane2Cylinder distortion I got Image like below. But I want the effect like second image. Please go through my code.

local nelem = 1 -- number of args
local arg = ffi.new("const double[?]", nelem, {100})
-- local methos = ffi.new("const int", 15)
return handle_result(self, lib.MagickDistortImage(self.wand,13, nelem, arg, 1))

ffi.cdef([[  typedef void MagickWand;
typedef void PixelWand;
MagickBooleanType MagickDistortImage(MagickWand *wand, DistortMethod method, const size_t, const double *args, const MagickBooleanType bestfit);


更新:
for fred's脚本我用下面的命令

UPDATE: for fred's script I used below command

bash -x ./cylinderize.sh -m vertical -r 366.34955984688 -l 188.179 -w 16.6667 -p 23.428692808745 -n 96.097053534591 -e 1.75 -a 0 -v background -b none -f none -o -86-80.8315 single_color.png single_color.j.png

以下是我修改过的图片。

Below is my modified image.

推荐答案

更多评论而不是答案。


  1. 看起来失真参数只有视野值设置(100),但缺少中心X& Y值。

  1. Looks like the distortion arguments only has field-of-view value set (100), but is missing the center X & Y values.

Plane2Cylinder只是所需失真的一半。主题(马克杯)不是一个完美的圆柱体,因此需要应用额外的轻微失真(可能是透视)以匹配足够的音高。

Plane2Cylinder is only half of the distortion needed. The subject (mug) is not a perfect cylinder, so an additional slight-distortion (perhaps Perspective) will need to be applied to match the suffice pitch.

这篇关于PlaneMylinder中有一个选项可以扭曲imageMagick来制作像下面的图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆