Set Search Areas

NI Vision for LabVIEW Basics

Set Search Areas

Select ROIs in your images to limit the areas in which you perform your processing and inspection. You can define ROIs interactively or programmatically.

Defining Regions Interactively

The following table shows which ROI to use with a given measurement VI.

ROI Measurement VI
Rotated rectangle IMAQ Find Pattern 2IMAQ Clamp Horizontal Max
IMAQ Clamp Horizontal Min
IMAQ Clamp Vertical Max
IMAQ Clamp Vertical Min
IMAQ Find Edge
IMAQ Find Straight Edges
Annulus IMAQ Find Circular Edge
IMAQ Find Concentric Edge

Defining Regions Programmatically

When you design an automated application, you need to define ROIs programmatically. You can programmatically define regions in two ways:

  • Specify the elements of the ROI descriptor.
  • Specify regions by providing basic parameters that describe the region you want to define. You can specify a rotated rectangle by providing the coordinates of the top-left point, bottom-right point, and the rotation angle. You can specify an annulus by providing the coordinates of the center, inner radius, outer radius, start angle, and end angle. You can specify a point by setting its x-coordinates and y-coordinates. You can specify a line by setting the coordinates of the start and end points.