National Instruments IMAQ Vision for LabWindows TM /CVI User Manual

Page 57

Advertising
background image

Chapter 5

Performing Machine Vision Tasks

© National Instruments Corporation

5-5

IMAQ Vision for LabWindows/CVI User Manual

b.

If you use

imaqFindTransformRects()

, specify two

rectangular objects, each containing one separate, straight
boundary of the object, as shown in Figure 5-3. The boundaries
cannot be parallel. The regions must be large enough to include
the boundaries in all the images you want to inspect.

Figure 5-3. Locating Coordinate System Axes with Two Search Areas

2.

Use the options parameter to choose the options you need to locate the
edges on the object, the coordinate system axis direction, and the
results that you want to overlay onto the image. Set the options
parameter to

NULL

to use the default options.

3.

Choose the mode for the function. To build a coordinate transform for
the first time, set the mode parameter to

IMAQ_FIND_REFERENCE

.

To update the coordinate transform in subsequent images, set this
mode to

IMAQ_UPDATE_TRANSFORM

.

1

Primary Search Area

2

Secondary Search Area

3

Origin of the Coordinate System

4

Measurement Area

1

3

2

4

1

3

2

4

b.

a.

Advertising