Page 1 of 1
Using Shepard Distortion
Posted: 2011-04-20T06:01:46-07:00
by Anand
Hello i want to use shepard distortion of image magic in Iphone,but how to use it means how to pass the parameters to the distortion method .kindly suggest me.
Re: Using Shepard Distortion
Posted: 2011-04-20T20:18:00-07:00
by anthony
The parameters are straight forward, a string of a pairs of coodinate pairs. That is 4 numbers for every point you want to move (or not move).
NOTE that moving only one point moves the whole image. As such you may want to fix the image corners.
See IM examples
http://www.imagemagick.org/Usage/distorts/#shepards
Re: Using Shepard Distortion
Posted: 2011-04-20T21:45:19-07:00
by Anand
extern MagickExport Image
*DistortImage(const Image *,const DistortImageMethod,const size_t,
const double *,MagickBooleanType,ExceptionInfo *exception)
this is the method through which we can distort image defined in distort.h of IM.
Mine Code --->>>>
final = DistortImage(images, ShepardsDistortion , ? , ?, 1, exception);
images is my image to be distorted,method of distortion is ShepardsDistortion, at first ? we have to give number of arguments according to documentation,and at second ? we have to give an array. So i want this solution for iphone.
Re: Using Shepard Distortion
Posted: 2011-04-22T23:08:46-07:00
by anthony
On in a MagickCore function call..
One is a array of floating point (double) values. The other the number of values in that array!
Simple as that!