Table Of Contents

Threshold (Binary Auto Threshold) (G Dataflow)

Last Modified: June 25, 2019

Computes the optimal threshold value for an image or a region of interest and applies the computed threshold.

connector_pane_image
datatype_icon

object type

Type of objects to look for.

The following values are valid:

Name Value Description
Bright Objects 0

Looks for objects in the image represented by pixels with values greater than the value computed by the threshold method.

Dark Objects 1

Looks for objects in the image represented by pixels with values less than the value computed by the threshold method.

datatype_icon

image src

Reference to the source image.

datatype_icon

image dst

Reference to the destination image.

datatype_icon

ROI descriptor

Descriptor that defines the region of interest (ROI) within which the threshold is performed.

datatype_icon

global rectangle

Coordinates of the bounding rectangle.

datatype_icon

contours

Individual shapes that define an ROI.

datatype_icon

ID

Object specifying if contour is the external or internal edge of an ROI.

datatype_icon

Type

Shape type of the contour.

datatype_icon

Coordinates

Relative position of the contour.

datatype_icon

method

Threshold method to use.

Choose from the following options:

Name Value Description
clustering 0

Use the clustering method as a general-purpose threshold method.

entropy 1

Use the entropy method to detect particles that are present in minuscule proportions on the image.

metric 2

The metric method calculates an optimal threshold value using the surfaces representing the initial gray scale.

moments 3

Use the moments method for images that have poor contrast.

inter-class variance 4

The interclass variance method determines an optimal threshold by maximizing the between-class variation with respect to the threshold.

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

threshold limits

Upper and lower bounds of the threshold values used to calculate the threshold.

datatype_icon

lower value

Lower bound of the threshold range.

datatype_icon

upper value

Upper bound of the threshold range.

datatype_icon

replace value

Replacement value the node uses for the pixels of the kept objects in the destination image.

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 src.

datatype_icon

threshold range

Range used to threshold the image or ROI.

datatype_icon

lower value

Lowest pixel value to be taken into account during a threshold.

datatype_icon

upper value

Highest pixel value to be taken into account during a threshold.

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.

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