NI Vision Function Palettes

NI Vision for LabVIEW Basics

NI Vision Function Palettes

NI Vision for LabVIEW is organized into three main function palettes: Vision Utilities, Image Processing, and Machine Vision. This section describes these palettes and their subpalettes.

Note  This document references many VIs from the NI Vision function palette. If you have difficulty finding a VI, use the search capability of the LabVIEW VI browser.

Vision Utilities

Vision Utilities functions allow you to manipulate and display images in NI Vision.

  • Image Management—A group of VIs that manage images. Use these VIs to create and dispose images, set and read attributes of an image such as its size and offset, and copy one image to another. You also can use some of the advanced VIs to define the border region of an image and access the pointer to the image data.
  • Files—A group of VIs that read images from files, write images to files in different file formats, and get information about the image contained in a file.
  • External Display—A group of VIs that control the display of images in external image windows. Use these VIs to complete the following tasks:
    • Get and set window attributes, such as size, position, and zoom factor
    • Assign color palettes to image windows
    • Set up and use image browsers
    • Set up and use different drawing tools to interactively select ROIs on image windows
    • Detect draw events
    • Retrieve information about ROIs drawn on the image window
  • Region of Interest—A group of VIs that manage ROIs. Use these VIs to programmatically define ROIs and convert ROIs to and from image masks.
  • Image Manipulation—A group of VIs that modify the spatial content of images. Use these VIs to resample an image, extract parts of an image, and rotate, shift, and unwrap images. This subpalette also contains VIs that copy images to and from the clipboard.
  • Pixel Manipulation—A group of VIs that read and modify individual pixels in an image. Use these VIs to read and set pixel values in an image or along a row or column in an image, fill the pixels in an image with a particular value, and convert an image to and from a 2D LabVIEW array.
  • Overlay—A group of VIs that overlay graphics on an image display environment without altering the pixel values of the image. Use these VIs to overlay the results of your inspection application onto the images you inspect.
  • Calibration—A group of VIs that spatially calibrate an image to take accurate, real-world measurements regardless of camera perspective or lens distortion. Use these VIs to set a simple calibration or to let NI Vision automatically learn the calibration data from a grid image. Then use the VIs to convert pixel coordinates to real-world coordinates for simple measurements.
  • Color Utilities—A group of VIs that access data from color images. Use these VIs to extract different color planes from an image, replace the planes of a color image with new data, convert a color image to and from a 2D array, read and set pixel values in a color image, and convert pixel values from one color space to another.
  • Vision RT—A group of VIs that provide functionality for using NI Vision with the LabVIEW Real-Time (RT) Module. Use these VIs to display images to Video Out on your RT system, to control the compression setting for sending images over the network, and to time bound your processing VIs on your RT system.

Image Processing

Use the Image Processing functions to analyze, filter, and process images in NI Vision.

  • Processing—A group of VIs that process grayscale and binary images. Use these VIs to convert a grayscale image into a binary image using different thresholding techniques. You also can use these VIs to transform images using predefined or custom lookup tables, apply a watershed transform, change the contrast information in the image, and invert the values in an image.
  • Filters—A group of VIs that filter an image to enhance the information in the image. Use these VIs to smooth an image, remove noise, and highlight or enhance edges in the image. You can use a predefined convolution kernel or create custom convolution kernels.
  • Morphology—A group of VIs that perform morphological operations on an image. Some of these VIs perform basic morphological operations, such as dilation and erosion, on grayscale and binary images. Other VIs improve the quality of binary images by filling holes in particles, removing particles that touch the image border, removing small particles, and removing unwanted particles based on different shape characteristics of the particle. Another set of VIs in this subpalette separate touching particles, find the skeleton of particles, and detect circular particles.
  • Analysis—A group of VIs that analyze the content of grayscale and binary images. Use these VIs to compute the histogram information and grayscale statistics of an image, retrieve pixel information and statistics along any one-dimensional profile in an image, and detect and measure particles in binary images.
  • Color Processing—A group of VIs that analyze and process color images. Use these VIs to compute the histogram of color images; apply  lookup tables to color images; change the brightness, contrast, and gamma information associated with a color image; and threshold a color image. Some of these VIs also compare the color information in different images or different regions in an image using a color matching process.
  • Operators—A group of VIs that perform basic arithmetic and logical operations on images. Use some of these VIs to add, subtract, multiply, and divide an image with other images or constants. Use other VIs in this subpalette to apply logical operations—such as AND/NAND, OR/NOR, XOR/XNOR—and make pixel comparisons between an image and other images or a constant. In addition, one VI in this subpalette allows you to select regions in an image to process using a masking operation.
  • Frequency Domain—A group of VIs that analyze and process images in the frequency domain. Use these VIs to convert an image from the spatial domain to the frequency domain using a two-dimensional Fast Fourier Transform (FFT) and convert from the frequency domain to the spatial domain using the inverse FFT. These VIs also extract the magnitude, phase, real, and imaginary planes of the complex image. In addition, these VIs allow you to convert complex images into complex 2D arrays and back. Also in this subpalette are VIs that perform basic arithmetic operations—such as addition, subtraction, multiplication, and division—between a complex image and other images or a constant. Lastly, some of these VIs allow you to filter images in the frequency domain.

Machine Vision

The Machine Vision functions are high-level VIs that simplify common machine vision tasks.

  • Select Region of Interest—A group of VIs that allow you to select a ROI tool, draw specific ROIs in the image window, and return information about ROIs with very little programming.
  • Coordinate System—A group of VIs that find a coordinate system associated with an object in an image. Use these VIs to find the coordinate system using either edge detection or pattern matching. You can then use this coordinate system to take measurements from other Machine Vision VIs.
  • Count and Measure Objects—A VI that thresholds an image to isolate objects from the background and then finds and measures characteristics of the objects. This VI also can ignore unwanted objects in the image when making measurements.
  • Measure Intensities—A group of VIs that measure the intensity of a pixel at a point or the statistics of pixel intensities along a line or rectangular region in an image.
  • Measure Distances—A group of VIs that measure distances, such as the minimum and maximum horizontal distance between two vertically oriented edges or the minimum and maximum vertical distance between two horizontally oriented edges.
  • Locate Edges—A group of VIs that locate vertical, horizontal, and circular edges.
  • Find Patterns—A VI that learns and searches for a pattern in an image.
  • Searching and Matching—A group of VIs that create and search for patterns in grayscale and color images. This subpalette also contains a VI to search for objects with predefined shapes in binary images.
  • Caliper—A group of VIs that find edges along different profiles in the image. Use these VIs to find edges along a line, a set of parallel lines defined inside a rectangular region (rake), a set of parallel concentric lines defined inside an annular region (concentric rake), or a set of radial lines defined inside an annular region (spoke). You also can use these VIs to find pairs of edges in the image that satisfy certain criteria.
  • Analytic Geometry—A group of VIs that perform analytic geometry computations on a set of points in an image. Use these VIs to fit lines, circles, and ellipses to a set of points in the image; compute the area of a polygon represented by a set of points; measure distances between points; and find angles between lines represented by points. VIs in this subpalette also perform computations, such as finding the intersection point of two lines and finding the line bisecting the angle formed by two lines.
  • OCR—A group of VIs that perform optical character recognition and verification in a region of the image.
  • Classification—A group of VIs that classify binary objects according to their shape or any user-defined feature vector.
  • Instrument Readers—A group of VIs that accelerate the development of applications that require reading from seven-segment displays, meters, gauges, 1D barcodes, or 2D codes.
  • Inspection—A group of VIs that compare images to a golden template image.

Vision Express

Use the Vision Express VIs to quickly develop common image acquisition and processing applications.

  • Vision Acquisition—An Express VI to easily configure acquisitions from analog, digital, Camera Link, IEEE 1394, and GigE Vision cameras.
    Note  You must have NI Vision Acquisition Software installed to access the Vision Acquisition Express VI.
  • Vision Assistant—An Express VI that allows you to use NI Vision Assistant from within the LabVIEW environment to perform common image processing tasks.