Back to Adaptive Vision Library website
You are here: Start » Function Reference » Image Local Transforms » ConvolveImage
ConvolveImage
Computes a convolution of the input image with a user-specified mask.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::ConvolveImage ( const avl::Image& inImage, atl::Optional<const avl::Region&> inRoi, const avl::Matrix& inMask, bool inNormalizeMaskValues, atl::Optional<const avl::Location&> inMaskOrigin, avl::Image& outImage )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inImage | const Image& | Input image | ||
inRoi | Optional<const Region&> | NIL | Range of outImage pixels to be computed | |
inMask | const Matrix& | Image convolution kernel | ||
inNormalizeMaskValues | bool | False | Normalize sum of weights in mask to one | |
inMaskOrigin | Optional<const Location&> | NIL | Relative location of point to its mask | |
outImage | Image& | Output image |
Description
The operation computes new value of pixel as a convolution of inImage pixels and the inMask values.
Pixels which mask exceeds inRoi region are set to black. Input and output pixel have the same type.
If result value does not fit into pixel type you should use ConvertPixelType.
Examples
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
This operation supports processing on OpenCL compatible device (when inRoi=NIL).
Errors
Error type | Description |
---|---|
DomainError | Empty convolution mask on input in ConvolveImage. |
DomainError | Mask origin is outside the dimensions of the mask in ConvolveImage. |
DomainError | Sum of weights in Mask is equal zero. Cannot normalize values. |