Using Shepard Distortion
Using Shepard Distortion
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Using Shepard Distortion
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
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Using Shepard Distortion
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.
*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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Using Shepard Distortion
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!
One is a array of floating point (double) values. The other the number of values in that array!
Simple as that!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/