Chapter 5
IMAQ Vision for LabWindows/CVI User Manual
5-8
ni.com
Set Search Areas
Select regions of interest (ROIs) in your images to limit the areas in which
you perform your processing and inspection. You can define ROIs
interactively or programmatically.
Interactively Defining Regions
Follow these steps to interactively define an ROI:
1.
Use
imaqConstructROI()
to display an image and the tools palette
in a window.
2.
Select an ROI tool from the tools palette.
3.
Draw an ROI on your image. Resize and reposition the ROI until it
specifies the area you want to process.
4.
Click
OK
to output a descriptor of the region you selected. You can
input the ROI descriptor into many analysis and processing functions.
You can also use
imaqSelectRect()
and
imaqSelectAnnulus()
to
define regions of interest. Follow these steps to use these functions:
1.
Call the function to display an image in a window. Only the tools
specific to that function are available for you to use.
2.
Select an ROI tool from the tools palette.
3.
Draw an ROI on your image. Resize or reposition the ROI until it
specifies the area you want to process.
Click
OK
to output a simple description of the ROI. You can use this
description as an input for the following functions:
ROI Selection Function
Measurement Function
imaqSelectRect()
imaqFindPattern()
imaqClampMax()
imaqClampMin()
imaqFindEdge()
imaqSelectAnnulus()
imaqFindCircularEdge()
imaqFindConcentricEdge()