imaqGetKernel

NI Vision for LabWindows/CVI Function

imaqGetKernel

Usage

const float* imaqGetKernel(KernelFamily family, int size, int number);

Purpose

Returns a pointer to a predefined convolution matrix. You can use the returned pointer in conjunction with imaqConvolve(). You cannot dispose of or alter the returned pointer because it is a reference to static memory. If you need to alter the kernel, copy the data from the supplied kernel to the memory space you have allocated yourself.

Parameters

Name

Type

Description

family KernelFamily The family of the kernel matrix.
size int The horizontal and vertical matrix size. Valid values are 3, 5, and 7, corresponding to the convolution matrix sizes of 3 x 3, 5 x 5, and 7 x 7.
number int References the particular desired matrix among the predefined matrices that are available for each family and size.

Return Value

Type

Description

const float* On success, this function returns a pointer to the requested matrix. This pointer points to constant data in memory that you should not alter. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). You do not need to call imaqDispose() on the pointer.