InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TranFxConvolutionFilter Class Reference

#include <TranFxConvolutionFilter.h>

Classes

class  Kernel
 

Public Types

typedef float Pixel
 

Public Member Functions

 TranFxConvolutionFilter (AGMImageAccessor *agmImage, const bool16 invertGrey, const bool16 applyAlpha)
 
virtual ~TranFxConvolutionFilter ()
 
void Convolve (Kernel &kernel)
 
AGMImageAccessorCreateOutputAccessor (AGMImageRecord &output)
 
void ApplyBlur ()
 

Detailed Description

Image processing helper class.

Convolution filtering is often used for image processing such as blurring, sharpening and edge detection. It operates on a group of input pixels surrounding a center pixel. The surrounding pixels provide information about brightness trends (light to dark,dark to light) in the area of the pixel being processed. It is implemented by sliding a matrix of coeffiecients (see TranFxConvolutionFilter::Kernel) across the input image, pixel by pixel, and applying the coefficients to the surrounding pixels. A new value for the pixel in the center of the kernel is calculated and saved in the output image. The resulting brightness of each output pixel depends on the group of pixels surrounding the input pixel and the value of the coefficients in the kernel.

See Also
Computer Graphics Principles and Practice
http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Image-enhance.doc.html
http://www.dai.ed.ac.uk/CVonline/LOCAL_COPIES/YOUNG/vision1.html

Member Typedef Documentation

Data type this class uses to manipulate pixel values.

Constructor & Destructor Documentation

TranFxConvolutionFilter::TranFxConvolutionFilter (AGMImageAccessoragmImage,
const bool16 invertGrey,
const bool16 applyAlpha 
)

Constructor copies image data out of the given agmImage and into this objects fOutput buffer for subsequent processing.

Parameters
agmImageIN image to be processed. Must be a greyscale image with an alpha channel.
invertGreyIN if kTrue then greyscale values ar flipped(black(0) becomes white(255) and white becomes black.
applyAlphaIN if kTrue then the alpha channel values for each greyscale pixel are applied.
TranFxConvolutionFilter::~TranFxConvolutionFilter ()
virtual

Destructor deletes fOutput buffer and tidies up.

Member Function Documentation

void TranFxConvolutionFilter::ApplyBlur ()

Apply a slight blur and reduce the intensity of the image.

void TranFxConvolutionFilter::Convolve (TranFxConvolutionFilter::Kernelkernel)

Convolve the image with the given kernel.

Parameters
kernelcontaining coeffients to be used.
AGMImageAccessor * TranFxConvolutionFilter::CreateOutputAccessor (AGMImageRecordoutput)

Return the processed image in the given AGMImageRecord.

Returns
accessor for the processed image pixels.