![]() | InDesign SDK 20.5 |
#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) |
| AGMImageAccessor * | CreateOutputAccessor (AGMImageRecord &output) |
| void | ApplyBlur () |
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.
| typedef float TranFxConvolutionFilter::Pixel |
Data type this class uses to manipulate pixel values.
| TranFxConvolutionFilter::TranFxConvolutionFilter | ( | AGMImageAccessor * | agmImage, |
| const bool16 | invertGrey, | ||
| const bool16 | applyAlpha | ||
| ) |
Constructor copies image data out of the given agmImage and into this objects fOutput buffer for subsequent processing.
| agmImage | IN image to be processed. Must be a greyscale image with an alpha channel. |
| invertGrey | IN if kTrue then greyscale values ar flipped(black(0) becomes white(255) and white becomes black. |
| applyAlpha | IN if kTrue then the alpha channel values for each greyscale pixel are applied. |
| virtual |
Destructor deletes fOutput buffer and tidies up.
| void TranFxConvolutionFilter::ApplyBlur | ( | ) |
Apply a slight blur and reduce the intensity of the image.
| void TranFxConvolutionFilter::Convolve | ( | TranFxConvolutionFilter::Kernel & | kernel | ) |
Convolve the image with the given kernel.
| kernel | containing coeffients to be used. |
| AGMImageAccessor * TranFxConvolutionFilter::CreateOutputAccessor | ( | AGMImageRecord & | output | ) |
Return the processed image in the given AGMImageRecord.