IMAQ Threshold VI

NI Vision 2017 for LabVIEW Help

Edition Date: May 2017

Part Number: 370281AD-01

»View Product Info
Download Help (Windows Only)
Owning Palette: Processing
Requires: NI Vision Development Module

Applies a threshold to an image.

Examples

Supported Image Types

8-bit unsigned grayscale 16-bit unsigned grayscale 16-bit signed grayscale floating point grayscale

IMAQ Threshold

/images/reference/en-XX/help/370281AD-01/cbool.gif

Keep/Replace Value (Replace) determines whether to replace the value of the pixels existing in the range between Lower value and Upper value. The default status, TRUE, replaces these pixel values, and the status FALSE keeps the original values.

/images/reference/en-XX/help/370281AD-01/cgenclasstagrefflat.gif

Image Src is a reference to the source image.

/images/reference/en-XX/help/370281AD-01/cgenclasstagrefflat.gif

Image Dst is a reference to the destination image.

/images/reference/en-XX/help/370281AD-01/cnclst.gif

Range is a cluster specifying the threshold range.

/images/reference/en-XX/help/370281AD-01/csgl.gif

Lower value is the lowest pixel value used during a threshold. The default is 128.

/images/reference/en-XX/help/370281AD-01/csgl.gif

Upper value is the highest pixel value used during a threshold. The default is 255.

/images/reference/en-XX/help/370281AD-01/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.

/images/reference/en-XX/help/370281AD-01/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.

/images/reference/en-XX/help/370281AD-01/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.

/images/reference/en-XX/help/370281AD-01/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.

/images/reference/en-XX/help/370281AD-01/csgl.gif

Replace Value is the value used to replace pixels between the Lower value and Upper value. This operation requires that Keep/Replace Value (Replace) is TRUE.

Note  Use a binary palette when you plan to visualize an image to which a threshold has been applied in Replace mode. However, which palette to use for visualization depends on the value of Replace Value. For example, the visualization of a threshold image could be performed with a gray palette. However, in this case it is advised that you use a replacement value of 255 (white) to see the threshold image better.
/images/reference/en-XX/help/370281AD-01/igenclasstagrefflat.gif

Image Dst Out is a 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.

/images/reference/en-XX/help/370281AD-01/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.

/images/reference/en-XX/help/370281AD-01/ibool.gif

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

/images/reference/en-XX/help/370281AD-01/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.

/images/reference/en-XX/help/370281AD-01/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.

Examples

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

  • LabVIEW\examples\Vision\Binary Analysis\Particle Analysis Report.vi

  • LabVIEW\examples\Vision\Binary Analysis\Particle Filter.vi

  • LabVIEW\examples\Vision\Image Processing\Gray Morphological Reconstruction H-Dome Example.vi

  • LabVIEW\examples\Vision\Image Processing\Image Label.vi

  • LabVIEW\examples\Vision\Image Processing\Morphological Segmentation.vi

WAS THIS ARTICLE HELPFUL?

Not Helpful