Chapter5 MachineVision
IMAQVision for LabWindows/CVI User Manual 5-8 ni.com
Set Search AreasSelectregions 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 stepsto interactively define an ROI:
1. UseimaqConstructROI() to display an image and the too lsp alette
in a window.
2. Select an ROItool from the tools palette.
3. Drawan ROI on your image. Resize and reposition the ROI until it
specifiesthe area you want to process.
4. Click OKt o output a descriptor of the region you selected. Youcan
inputthe ROI descriptor into many analysis and processing functions.
Youcan also use imaqSelectRect() and imaqSelectAnnulus() to
defineregions of interest. Follow these steps to use these functions:
1. Call the function to display an image in a window.Only the tools
specificto that function a re availablefor you to use.
2. Select an ROItool from the tools palette.
3. Drawan ROI on your image. Resize or reposition the ROI until it
specifiesthe area you want to process.
Click OKto outp ut a simple description of the ROI.You can use this
description as an input for the followingfuncti ons:
ROISelection Function MeasurementFunction
imaqSelectRect() imaqFindPattern()
imaqClampMax()
imaqClampMin()
imaqFindEdge()
imaqSelectAnnulus() imaqFindCircularEdge()
imaqFindConcentricEdge()