:effects - ImageMagick Image Effects Methods>/


NAME



+effects - ImageMagick Image Effects Methods






(

SYNOPSIS



SImage * AddNoiseImage( Image *image, const NoiseType noise_type );



HImage * BlurImage( Image *image, const double factor );



pImage * ColorizeImage( Image *image, const char *opacity, const char *pen_color );



EImage * DespeckleImage( Image *image );



HImage * EdgeImage( Image *image, const double factor );



BImage * EmbossImage( Image *image );



CImage * EnhanceImage( Image *image );



KImage * ImplodeImage( Image *image, const double factor );



VImage * MedianFilterImage( Image *image, const unsigned int radius );



XImage * MorphImages( Image *images, const unsigned int number_frames );



RImage * OilPaintImage( Image *image, const unsigned int radius );



qunsigned int PlasmaImage( Image *image, const SegmentInfo *segment, int attenuate, int depth );



GImage * ReduceNoiseImage( Image *image );



kImage * ShadeImage( Image *image, const unsigned int color_shading, double azimuth, double elevation );



KImage * SharpenImage( Image *image, const double factor );



Jvoid SolarizeImage( Image *image, const double factor );



PImage * SpreadImage( Image *image, const unsigned int amount );



UImage * SteganoImage( Image *image, Image *watermark );



[Image * StereoImage( Image *left_image, Image *right_image );



DImage * SwirlImage( Image *image, double degrees );



Nvoid ThresholdImage( Image *image, const double threshold );



dImage * WaveImage( Image *image, const double amplitude, const double wavelength );






B

FUNCTION DESCRIPTIONS






2

AddNoiseImage



JMethod AddNoiseImage creates a new image that is a copy of an existing oneEwith noise added. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.



*The format of the AddNoiseImage method is:

Image *AddNoiseImage ( Image *image, const NoiseType noise_type );


=A description of each parameter follows:


=

noisy_image:


QMethod AddNoiseImage returns a pointer to the image after the noise is minified. LA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

'

noise_type:


IThe type of noise: Gaussian, multiplicative Gaussian, impulse, laplacian, or Poisson.






*

BlurImage



KMethod BlurImage creates a new image that is a copy of an existing one withGthe pixels blurred. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.



CBlurImage convolves the pixel neighborhood with this blurring mask:





   1  2  1
   2  W  2
   1  2  1




KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.



&The format of the BlurImage method is:

Image *BlurImage ( Image *image, const double factor );


=A description of each parameter follows:


'

blur_image:


EMethod BlurImage returns a pointer to the image after it is blurred. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

factor:


IAn double value reflecting the percent weight to give to the center pixelof the neighborhood.






2

ColorizeImage



JMethod ColorizeImage creates a new image that is a copy of an existing oneHwith the image pixels colorized. The colorization is controlled with the!pen color and the opacity levels.



*The format of the ColorizeImage method is:

Image *ColorizeImage ( Image *image, const char *opacity, const char *pen_color );


=A description of each parameter follows:


"

image:


BThe address of a structure of type Image; returned from ReadImage.

$

opacity:


JA character string indicating the level of opacity asa percentage (0-100).



#

    pen_color: A color string.=head2 DespeckleImage




Method DespeckleImage creates a new image that is a copy of an existing one with the speckle noise minified. It uses the eight hull algorithm described in Applied Optics, Vol. 24, No. 10, 15 May 1985, ``Geometric filter for Speckle Reduction'', by Thomas R Crimmins. Each pixel in the image is replaced by one of its eight of its surrounding pixels using a polarity and negative hull function. DespeckleImage allocates the memory necessary for the new Image structure and returns a pointer to the new image.



+The format of the DespeckleImage method is:


Image *DespeckleImage ( Image *image );


=A description of each parameter follows:


,

despeckle_image:


MMethod DespeckleImage returns a pointer to the image after it is despeckled. LA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.






*

EdgeImage



KMethod EdgeImage creates a new image that is a copy of an existing one withJthe edges highlighted. It allocates the memory necessary for the new Image1structure and returns a pointer to the new image.



IEdgeImage convolves the pixel neighborhood with this edge detection mask:





  -1 -1 -1
  -1  W -1
  -1 -1 -1




KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.



&The format of the EdgeImage method is:

Image *EdgeImage ( Image *image, const double factor );


=A description of each parameter follows:


'

edge_image:


BMethod EdgeImage returns a pointer to the image after it is edge. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

factor:


IAn double value reflecting the percent weight to give to the center pixelof the neighborhood.






.

EmbossImage



HMethod EmbossImage creates a new image that is a copy of an existing oneHwith the edge highlighted. It allocates the memory necessary for the new7Image structure and returns a pointer to the new image.



KEmbossImage convolves the pixel neighborhood with this edge detection mask:





  -1 -2  0
  -2  0  2
   0  2  1




KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.



(The format of the EmbossImage method is:

|
Image *EmbossImage ( Image *image );


=A description of each parameter follows:


)

emboss_image:


HMethod EmbossImage returns a pointer to the image after it is embossed. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.






0

EnhanceImage



IMethod EnhanceImage creates a new image that is a copy of an existing oneFwith the noise minified. It allocates the memory necessary for the new7Image structure and returns a pointer to the new image.



EnhanceImage does a weighted average of pixels in a 5x5 cell around each target pixel. Only pixels in the 5x5 cell that are within a MRGB distance threshold of the target pixel are averaged.



DWeights assume that the importance of neighboring pixels is negatelyCproportional to the square of their distance from the target pixel.



KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.



)The format of the EnhanceImage method is:

}
Image *EnhanceImage ( Image *image );


=A description of each parameter follows:


*

enhance_image:


IMethod EnhanceImage returns a pointer to the image after it is enhanced. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.






0

ImplodeImage



IMethod ImplodeImage creates a new image that is a copy of an existing oneKwith the image pixels ``implode'' by the specified percentage. It allocatesIthe memory necessary for the new Image structure and returns a pointer tothe new image.



)The format of the ImplodeImage method is:

Image *ImplodeImage ( Image *image, const double factor );


=A description of each parameter follows:


*

implode_image:


HMethod ImplodeImage returns a pointer to the image after it is implode. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

factor:


BA double value that defines the extent of the implosion.






:

MedianFilterImage



JMethod MedianFilterImage creates a new image that is a copy of an existingJone with each pixel component replaced with the median color in a circular neighborhood.



.The format of the MedianFilterImage method is:

Image *MedianFilterImage ( Image *image, const unsigned int radius );


=A description of each parameter follows:


)

median_image:


PMethod MedianFilterImage returns a pointer to the image after it is `filtered'. LA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

radius:


@An unsigned int that is the radius of the circular neighborhood.






.

MorphImages



IMethod MorphImages morphs a set of images. Both the image pixels and sizeIare linearly interpolated to give the appearance of a meta-morphosis fromone image to the next.



'The format of the MorphImage method is:

Image *MorphImages ( Image *images, const unsigned int number_frames );


=A description of each parameter follows:


*

morphed_image:


KMethod MorphImages returns an image sequence that has linearly interpolated)pixels and size between two input images.

#

images:


BThe address of a structure of type Image; returned from ReadImage.

*

number_frames:


KThis unsigned integer reflects the number of in-between images to generate.3The more in-between frames, the smoother the morph.






2

OilPaintImage



JMethod OilPaintImage creates a new image that is a copy of an existing oneJwith each pixel component replaced with the color of greatest frequency ina circular neighborhood.



*The format of the OilPaintImage method is:

Image *OilPaintImage ( Image *image, const unsigned int radius );


=A description of each parameter follows:


(

paint_image:


KMethod OilPaintImage returns a pointer to the image after it is `painted'. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

radius:


@An unsigned int that is the radius of the circular neighborhood.






.

PlasmaImage



GMethod PlasmaImage initializes an image with plasma fractal values. TheKimage must be initialized with a base color and the random number generator$seeded before this method is called.



(The format of the PlasmaImage method is:

unsigned int PlasmaImage ( Image *image, const SegmentInfo *segment, int attenuate, int depth );


=A description of each parameter follows:


#

status:


EMethod PlasmaImage returns True when the fractal process is complete.Otherwise False is returned.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

$

segment:


Hspecifies a structure of type SegmentInfo that defines the boundaries of/the area where the plasma fractals are applied.

&

attenuate:


(specifies the plasma attenuation factor.

"

depth:


6this integer values define the plasma recursion depth.






8

ReduceNoiseImage



IMethod ReduceNoiseImage creates a new image that is a copy of an existingDone with the noise minified with a noise peak elimination filter. ItHallocates the memory necessary for the new Image structure and returns apointer to the new image.



EThe principal function of noise peak elimination filter is to smooth the objects within an image without losing edge information and without creating undesired structures. The central idea of the algorithm is to replace a pixel with its next neighbor in value within a 3 x 3 window, if this pixel has been found to be noise. {A pixel is defined as noise if and only if this pixel is a maximum or minimum within the 3 x 3 window.



-The format of the ReduceNoiseImage method is:

Image *ReduceNoiseImage ( Image *image );


=A description of each parameter follows:


(

noisy_image:


TMethod ReduceNoiseImage returns a pointer to the image after the noise is minified. LA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.






,

ShadeImage



GMethod ShadeImage creates a new image that is a copy of an existing oneHwith the image pixels shaded using a distance light source. It allocatesIthe memory necessary for the new Image structure and returns a pointer tothe new image.



'The format of the ShadeImage method is:

Image *ShadeImage ( Image *image, const unsigned int color_shading, double azimuth, double elevation );


=A description of each parameter follows:


(

shade_image:


EMethod ShadeImage returns a pointer to the image after it is shaded. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

*

color_shading:


GA value other than zero shades the red, green, andblue components of the image.

/

azimuth, elevation:


CA double value that indicates the light source direction.






0

SharpenImage



IMethod SharpenImage creates a new image that is a copy of an existing oneHwith the pixels sharpened. It allocates the memory necessary for the new7Image structure and returns a pointer to the new image.



HSharpenImage convolves the pixel neighborhood with this sharpening mask:





  -1 -2 -1
  -2  W -2
  -1 -2 -1




KThe scan only processes pixels that have a full set of neighbors. Pixels inKthe top, bottom, left, and right pairs of rows and columns are omitted from the scan.



)The format of the SharpenImage method is:

Image *SharpenImage ( Image *image, const double factor );


=A description of each parameter follows:


*

sharpen_image:


JMethod SharpenImage returns a pointer to the image after it is sharpened. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

factor:


IAn double value reflecting the percent weight to give to the center pixelof the neighborhood.






2

SolarizeImage



JMethod SolarizeImage produces a 'solarization' effect seen when exposing a:photographic film to light during the development process.



*The format of the SolarizeImage method is:

r
void SolarizeImage ( Image *image, const double factor );


=A description of each parameter follows:


"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

factor:


<An double value that defines the extent of the solarization.






.

SpreadImage



HMethod SpreadImage creates a new image that is a copy of an existing oneKwith the image pixels randomly displaced. It allocates the memory necessaryCfor the new Image structure and returns a pointer to the new image.



(The format of the SpreadImage method is:

Image *SpreadImage ( Image *image, const unsigned int amount );


=A description of each parameter follows:


)

spread_image:


FMethod SpreadImage returns a pointer to the image after it is spread. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

#

amount:


KAn unsigned value constraining the ``vicinity'' for choosing a random pixelto swap.






0

SteganoImage



?Method SteganoImage hides a digital watermark within the image.



)The format of the SteganoImage method is:

Image *SteganoImage ( Image *image, Image *watermark );


=A description of each parameter follows:


*

stegano_image:


]Method SteganoImage returns a pointer to the steganographic image with the watermark hidden. LA null image is returned if there is a memory shortage.

"

image:


)The address of a structure of type Image.

&

watermark:


)The address of a structure of type Image.






.

StereoImage



JMethod StereoImage combines two images and produces a single image that isKthe composite of a left and right image of a stereo pair. The left image isKconverted to gray scale and written to the red channel of the stereo image.JThe right image is converted to gray scale and written to the blue channelFof the stereo image. View the composite image with red-blue glasses tocreate a stereo effect.



(The format of the StereoImage method is:

Image *StereoImage ( Image *left_image, Image *right_image );


=A description of each parameter follows:


)

stereo_image:


:Method StereoImage returns a pointer to the stereo image. BA null image is returned if there is a memory shortage.

'

left_image:


)The address of a structure of type Image.

(

right_image:


)The address of a structure of type Image.






,

SwirlImage



GMethod SwirlImage creates a new image that is a copy of an existing oneFwith the image pixels ``swirl'' at a specified angle. It allocates theImemory necessary for the new Image structure and returns a pointer to the new image.



'The format of the SwirlImage method is:

Image *SwirlImage ( Image *image, double degrees );


=A description of each parameter follows:


(

swirl_image:


DMethod SwirlImage returns a pointer to the image after it is swirl. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

$

degrees:


;An double value that defines the tightness of the swirling.






4

ThresholdImage



5Method ThresholdImage thresholds the reference image.



+The format of the ThresholdImage method is:

v
void ThresholdImage ( Image *image, const double threshold );


=A description of each parameter follows:


"

image:


BThe address of a structure of type Image; returned from ReadImage.

&

threshold:


=A double indicating the threshold value.






*

WaveImage



KMethod WaveImage creates a new image that is a copy of an existing one withCthe image pixels altered along a sine wave. It allocates the memoryFnecessary for the new Image structure and returns a pointer to the newimage.



&The format of the WaveImage method is:

Image *WaveImage ( Image *image, const double amplitude, const double wavelength );


=A description of each parameter follows:


(

shade_image:


DMethod WaveImage returns a pointer to the image after it is shaded. BA null image is returned if there is a memory shortage.

"

image:


BThe address of a structure of type Image; returned from ReadImage.

1

amplitude, frequency:


DA double value that indicates the amplitude andwavelength of the sine wave.