8 effects - ImageMagick Image Effects Routines�� �  0 




NAME

,effects - ImageMagick Image Effects Routines








SYNOPSIS

<noisy_image=AddNoiseImage(image,noise_type)

6blurred_image=BlurImage(image,factor)

7despeckled_image=DespeckleImage(image)

4edged_image=EdgeImage(image,factor)

2embossed_image=EmbossImage(image)

3enhanced_image=EnhanceImage(image)

:imploded_image=ImplodeImage(image,factor)

:painted_image=OilPaintImage(image,radius)

Gstatus=PlasmaImage(image,segment_info,attenuate,depth)

4RaiseImage(image,raise_info,raised)

4noisy_image=ReduceNoiseImage(image)

Oshaded_image=ShadeImage(image,color_shading,azimuth,elevation)

;sharpened_image=SharpenImage(image,factor)

,SolarizeImage(image,factor)

7spread_image=SpreadImage(image,amount)

8swirled_image=SwirlImage(image,degrees)

Awaved_image=WaveImage(image,amplitude,frequency)






9

FUNCTION DESCRIPTIONS






)

AddNoiseImage

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

+The format of the AddNoiseImage routine is:

8

        noisy_image=AddNoiseImage(image,noise_type)


(A description of each parameter follows:



)
noisy_image:
HFunction AddNoiseImage returns a pointer to the image after the noise isAminified. A 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

HFunction BlurImage creates a new image that is a copy of an existing oneFwith the pixels blurred. It allocates the memory necessary for the new7Image structure 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 routine is:

2

        blurred_image=BlurImage(image,factor)


(A description of each parameter follows:




blurred_image:
HFunction BlurImage returns a pointer to the image after it is blurred. A5null 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.






+

DespeckleImage

IFunction DespeckleImage creates a new image that is a copy of an existingEone with the speckle noise minified. It uses the eight hull algorithmFdescribed in Applied Optics, Vol. 24, No. 10, 15 May 1985, ``GeometricGfilter for Speckle Reduction'', by Thomas R Crimmins. Each pixel in theGimage is replaced by one of its eight of its surrounding pixels using aHpolarity and negative hull function. DespeckleImage allocates the memoryFnecessary for the new Image structure and returns a pointer to the newimage.

,The format of the DespeckleImage routine is:

3

        despeckled_image=DespeckleImage(image)


(A description of each parameter follows:




despeckled_image:
BFunction DespeckleImage returns a pointer to the image after it isCdespeckled. A null image is returned if there is a memory shortage.



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






!

EdgeImage

HFunction EdgeImage creates a new image that is a copy of an existing oneIwith the edges highlighted. It allocates the memory necessary for the new7Image structure and returns a pointer to the new image.

IEdgeImage convolves the pixel neighborhood with this edge detection mask:



  -1  0 -1




   0  W  0




  -1  0 -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 routine is:

0

        edged_image=EdgeImage(image,factor)


(A description of each parameter follows:




edged_image:
KFunction EdgeImage returns a pointer to the image after it is edged. A null0image 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

JFunction 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 routine is:

.

        embossed_image=EmbossImage(image)


(A description of each parameter follows:




embossed_image:
KFunction EmbossImage returns a pointer to the image after it is embossed. A5null image is returned if there is a memory shortage.



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






'

EnhanceImage

KFunction 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.

HEnhanceImage does a weighted average of pixels in a 5x5 cell around eachHtarget pixel. Only pixels in the 5x5 cell that are within a RGB 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 routine is:

/

        enhanced_image=EnhanceImage(image)


(A description of each parameter follows:




enhanced_image:
JFunction EnhanceImage returns a pointer to the image after it is enhanced.7A null image is returned if there is a memory shortage.



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






'

ImplodeImage

KFunction ImplodeImage creates a new image that is a copy of an existing oneBwith the image pixels ``imploded'' by the specified percentage. ItHallocates the memory necessary for the new Image structure and returns apointer to the new image.

*The format of the ImplodeImage routine is:

6

        imploded_image=ImplodeImage(image,factor)


(A description of each parameter follows:




imploded_image:
JFunction ImplodeImage returns a pointer to the image after it is imploded.7A null image is returned if there is a memory shortage.



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



factor:
9An double value that defines the extent of the implosion.






)

OilPaintImage

HFunction OilPaintImage creates a new image that is a copy of an existingKone with each pixel component replaced with the color of greatest frequencyin a circular neighborhood.

+The format of the OilPaintImage routine is:

6

        painted_image=OilPaintImage(image,radius)


(A description of each parameter follows:




painted_image:
AFunction OilPaintImage returns a pointer to the image after it isB`painted'. A 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

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

)The format of the PlasmaImage routine is:

C

        status=PlasmaImage(image,segment_info,attenuate,depth)


(A description of each parameter follows:




status:
GFunction 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_info:
Hspecifies a structure of type SegmentInfo that defines the boundaries of/the area where the plasma fractals are applied.



attenuate:
)specifies the plasma attentuation factor.



depth:
6this integer values define the plasma recursion depth.






#

RaiseImage

HFunction RaiseImage lightens and darkens the edges of an image to give a3-D raised or lower effect.

(The format of the RaiseImage routine is:

0

        RaiseImage(image,raise_info,raised)


(A description of each parameter follows:




image:
)The address of a structure of type Image.



raise_info:
DSpecifies a pointer to a XRectangle which defines the raised region.



raised:
EA value other than zero causes the image to have a 3-D raised effect,"otherwise it has a lowered effect.






/

ReduceNoiseImage

KFunction 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.

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

.The format of the ReduceNoiseImage routine is:

0

        noisy_image=ReduceNoiseImage(image)


(A description of each parameter follows:




noisy_image:
KFunction ReduceNoiseImage returns a pointer to the image after the noise isAminified. A null image is returned if there is a memory shortage.



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






#

ShadeImage

IFunction 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 routine is:

K

        shaded_image=ShadeImage(image,color_shading,azimuth,elevation)


(A description of each parameter follows:




shaded_image:
HFunction ShadeImage returns a pointer to the image after it is shaded. A5null image is returned if there is a memory shortage.



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



color_shading:
IA value other than zero shades the red, green, and blue components of theimage.



azimuth, elevation:
9A double value that indicates the light source direction.






'

SharpenImage

KFunction 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 routine is:

7

        sharpened_image=SharpenImage(image,factor)


(A description of each parameter follows:




sharpened_image:
KFunction SharpenImage returns a pointer to the image after it is sharpened.7A 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.






)

SolarizeImage

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

+The format of the SolarizeImage routine is:

(

        SolarizeImage(image,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

JFunction 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 routine is:

3

        spread_image=SpreadImage(image,amount)


(A description of each parameter follows:




spread_image:
IFunction SpreadImage returns a pointer to the image after it is spread. A5null image is returned if there is a memory shortage.



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



amount:
FAn unsigned value constraining the ``vicintity'' for choosing a randompixel to swap.






#

SwirlImage

IFunction SwirlImage creates a new image that is a copy of an existing oneHwith the image pixels ``swirled'' 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 routine is:

4

        swirled_image=SwirlImage(image,degrees)


(A description of each parameter follows:




swirled_image:
IFunction SwirlImage returns a pointer to the image after it is swirled. A5null 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.






!

WaveImage

HFunction WaveImage creates a new image that is a copy of an existing oneHwith the 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 routine is:

=

        waved_image=WaveImage(image,amplitude,frequency)


(A description of each parameter follows:




shaded_image:
GFunction WaveImage returns a pointer to the image after it is shaded. A5null image is returned if there is a memory shortage.



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

!

amplitude, frequency:
FA double value that indicates the amplitude and wavelength of the sinewave.