IMAQ GetKernel VI
Owning Palette: FiltersInstalled With: NI Vision Development ModuleReads 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.
Kernel Family determines the type of matrix. This value corresponds to the thousandth unit in the researched code. The matrix types are as follows:
|
|||||||||
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. |
|||||||||
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. |
|||||||||
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. |
|||||||||
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.
|
|||||||||
Divider is the normalization factor associated with the retrieved kernel. |
|||||||||
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. |
|||||||||
Kernel code indicates the code that was used to retrieve the kernel. |
|||||||||
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.
|
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