MatchGeometricPattern Method
From NI Vision for Visual Basic
MatchGeometricPattern Method
Syntax
CWIMAQVision.MatchGeometricPattern SearchImage, Template, MatchGeometricOptions, GeometricPatternMatchReport [, Regions]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Searches for a template image in the input Image.
Remarks
Use one of the following methods of configuring the template image you want to use with this method:
- Load a previously saved template image that you created using the NI Vision Template Editor using CWIMAQVision.ReadImageAndVisionInfo.
- Use CWIMAQVision.LearnGeometricPattern to learn the template image.
|
Note To use the NI Vision Template Editor to configure a template image, click Start»All Programs»National Instruments»Vision»Template Editor.
Use this method with U8 images. ParametersSearchImage As CWIMAQImage The image in which the template image is to be located. Template As CWIMAQImage The template image to be located during the geometric matching process. MatchGeometricOptions As CWIMAQMatchGeometricPatternOptions The parameters the method uses for matching. GeometricPatternMatchReport As CWIMAQGeometricPatternMatchReport On return, a report containing information about each match found in the image. Regions As Variant [Optional] A CWIMAQRegions object that specifies the regions within an image in which to search for the template. The CWIMAQRegions object must contain exactly one rectangle or one rotated rectangle region. Do not supply this parameter if you want the entire image to be examined. See Also |