Set Search Areas; Defining Regions Interactively - National Instruments IMAQTM User Manual

Vision for visual basic
Table of Contents

Advertisement

Chapter 5
Performing Machine Vision Tasks

Set Search Areas

Defining Regions Interactively

Table 5-1. ROI Selection Methods to Use with CWMachineVision Methods
CWMachineVision ROI Selection Methods
SetupViewerForRotatedRectSelection
GetSelectedRotatedRectFromViewer
SetupViewerForAnnulusSelection
GetSelectedAnnulusFromViewer
IMAQ Vision for Visual Basic User Manual
Select ROIs in the images to limit the areas in which you perform the
processing and inspection. You can define ROIs interactively or
programmatically.
Follow these steps to interactively define an ROI:
1.
Call
CWMachineVision.SetupViewerFor<shapename>Selection
The following
<shapename>
,
Point
Rectangle
viewer to display the appropriate tools for the shape you want to select.
2.
Draw an ROI on the image. Resize or reposition the ROI until it defines
the area of the image you want to process.
3.
Use
CWMachineVision.GetSelected<shapename>FromViewer
to programmatically retrieve the shape from the viewer.
You also can use the techniques described in Chapter 3,
and Color
Measurements, to select an ROI.
Table 5-1 indicates which ROI selection methods to use with a given
CWMachineVision method.
values are available:
, and
RotatedRect
CWMachineVision Method
FindPattern
MeasureMaximumDistance
MeasureMinimumDistance
FindStraightEdge
LightMeterRectangle
FindCircularEdge
FindConcentricEdge
5-8
,
Annulus
Line
. This method configures the
Making Grayscale
.
,
ni.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

Imaq

Table of Contents