1
当我使用Plane2Cylinder失真时,我得到如下图像。但我想要像第二个图像的效果。请通过我的代码。在ImageMagick的Plane2Cylinder变形中是否有一个选项可以使图像像波纹管一样?
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);
UPDATE: 对弗雷德的剧本我用下面的命令
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
下面是我修改后的图像。
其实我只对那个黑色标识应用了变形,然后放在了马克杯上。第二张图片是弗雷德剧本的结果。抱歉,我不完全理解它,但我想知道是否有可能使用Plane2Cylinder失真获得第二张图像的结果? – Rahul
您是否可以使用用于实现Fred脚本+源图像结果的参数来更新问题?可能会帮助 – emcconville
我更新了我的问题。 – Rahul