Chapter5 MachineVision
©NationalInstruments Corporation 5-5 IMAQVision for LabWindows/CVI User Manual
Figure5-3. LocatingCoordinate System Axes with Two Search Areas
2. Usethe 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 wantto overlay onto the image. Set the options
parameter to NULL to use the default options.
3. Choosethe mode for the function. To builda coordinate transform for
thefirst time, set mode to IMAQ_FIND_REFERENCE. To update the
coordinate transform in subsequent images, set this mode to
IMAQ_UPDATE_TRANSFORM.
Using Pattern Matching to Build a Coordinate Transform
You can build a coordinate transformusing pattern matching. Use
imaqFindTransformPattern()to define a coordinate system based on
thelocation of a reference feature. Use this technique when the object under
inspectiondoes not have straigh t, distinct edges. Follow the steps below to
build a coordinate reference system using pattern matching:
Note Theo bject may rotate ±360° in the image using this technique if you use
rotation-invariantpattern matching.
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
a. b.