Table Of Contents

Convolute (G Dataflow)

Last Modified: June 25, 2019

Filters an image using a linear filter.

The calculations are performed with either integers or floating points, depending on the image type and the contents of the kernel. This node modifies the source image. If you need the original source image, create a copy of the image using the Copy Image node before using this node.

connector_pane_image
datatype_icon

image src

Reference to the source image.

datatype_icon

image mask

8-bit image that specifies the region of the small image to be copied.

Only pixels in the image src image that correspond to a non-zero pixel in the mask image are copied. All other pixels keep their original values. The entire image is processed if image mask is not connected.

datatype_icon

image dst

Reference to the destination image.

datatype_icon

kernel

2D array that contains the convolution matrix to apply to the image.

The size of the convolution is fixed by the size of this array. The array can be generated by standard programming techniques or the Get Kernel node or the Build Kernel node. If the kernel contains fewer than three rows or three columns, no convolution is performed.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

divider

Normalization factor applied to the sum of the obtained products.

Under normal conditions the divider should not be connected. If connected and not equal to 0, the elements internal to the matrix are summed and then divided by this normalization factor.

datatype_icon

rounding mode

Type of rounding to use when dividing image pixels.

Name Description
optimized Rounds the result of a division using the best available method.
truncate Truncates the result of a division.
datatype_icon

image dst out

Reference to the destination image.

If image dst is connected, image dst out is the same as image dst. Otherwise, image dst out refers to the image referenced by image.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Connected Source Image Border Size

The connected source image must be created with a border capable of supporting the size of the convolution matrix. A 3 × 3 matrix must have a minimum border of 1, a 5 × 5 matrix must have a minimum border of 2, and so on. The border size of the destination image is not important.

Convolution Matrix Dimensions

A convolution matrix must have odd-sized dimensions so that it contains a central pixel. If one of the kernel dimensions is even, the function does not take into account the odd boundary farthest out on the matrix. For example, if the input kernel is 6 × 4 (X = 6 and Y = 4), the actual convolution is 5 × 3. Both the sixth line and the fourth line are ignored.

Calculations

Calculations using an 8-bit or 16-bit image input are made in integer mode provided that the kernel contains only integers. Calculations using a 32-bit floating-point image input are made in floating-point mode.

Processing Speed and Kernel Size

The processing speed corresponds to the size of the kernel. A 3 × 3 convolution processes 9 pixels and a 5 × 5 convolution processes 25 pixels.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics