Set search areas, Defining regions interactively, Set search areas -8 – National Instruments IMAQ Vision for LabWindows TM /CVI User Manual

Page 60: Defining regions interactively -8

Advertising
background image

Chapter 5

Performing Machine Vision Tasks

IMAQ Vision for LabWindows/CVI User Manual

5-8

ni.com

Set Search Areas

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

Defining Regions Interactively

Complete the following steps to interactively define an ROI:

1.

Use

imaqConstructROI2()

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 ROIs. Complete the following 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 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()

Advertising