IMAQ GetKernel VI

LabView NI Vision

IMAQ GetKernel VI

Owning Palette: FiltersInstalled With: NI Vision Development Module

Reads a predefined kernel. This code consists of three separate units: Kernel Family, Kernel Size, and Kernel Number. If you already know the code, you can enter it directly with Kernel Code.

Details Examples

IMAQ GetKernel

cenum.gif

Kernel Family determines the type of matrix. This value corresponds to the thousandth unit in the researched code. The matrix types are as follows:

Gradient (1)

Specifies the kernel family as gradient

Laplacian (2)

Specifies the kernel family as Laplacian

Smoothing (3)

Specifies the kernel family as smoothing

Gaussian (4)

Specifies the kernel family as Gaussian

ci32.gif

Kernel Size (3,5,...) determines the horizontal and vertical matrix size. The values are 3, 5, and 7, corresponding to the convolutions 3 × 3, 5 × 5, and 7 × 7 supplied in the matrix catalog. This value corresponds to the hundredth unit in the researched code.

ci32.gif

Kernel Number is the matrix family number. It is a two-digit number, between 0 and n, belonging to a family and a size. A number of predefined matrices are available for each type and size.

ci32.gif

Kernel Code is a code you can use to directly access a convolution matrix. Each code specifies a specific convolution matrix. You can use this input if it is connected and is not 0. The kernel located in the file then is transcribed into a 2D array that is available from the output Kernel. You can use the codes to specify a predefined kernel.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

isgl.gif

Divider is the normalization factor associated with the retrieved kernel.

i2dsgl.gif

Kernel is the resulting matrix. It corresponds to a kernel encoded by a code specified from the inputs Kernel Family, Kernel Size, and Kernel Number or a from a code directly passed through the input Kernel Code. You can connect this output directly to the input Kernel in the IMAQ Convolute VI.

ii32.gif

Kernel code indicates the code that was used to retrieve the kernel.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

Details

For the kernel code 1300, the kernel family is gradient, the kernel size is 3 × 3, and the kernel number (nn) is 00. The matrix is as follows:

–1 0 1
–1 0 1
–1 0 1

Refer to Kernels for a list of predefined kernels used in NI Vision.

Examples

Refer to the following for an example that uses this VI.

  • LabVIEW\examples\Vision\2. Functions\Binary Analysis\Particle Analysis Example.vi