National Instruments IMAQ Vision for LabWindows TM /CVI Network Card User Manual


 
Chapter 5 Performing Machine Vision Tasks
IMAQ Vision for LabWindows/CVI User Manual 5-24 ni.com
Choose from the following search strategies:
IMAQ_CONSERVATIVE—Uses a very small step size, the least amount
of subsampling, and all the color information present in the template.
The conservative strategy is the most reliable method to look for a
template in any image at potentially reduced speed.
Note Use the IMAQ_CONSERVATIVE strategy if you have multiple targets located very
close to each other in the image.
IMAQ_BALANCED—Uses values in between the IMAQ_AGGRESSIVE
and
IMAQ_CONSERVATIVE strategies.
IMAQ_AGGRESSIVE—Uses a large step size, a lot of sub-sampling,
and all of the color information from the template.
IMAQ_VERY_AGGRESSIVE—Uses the largest step size, the most
subsampling, and only the dominant color from the template to search
for the template. Use this strategy when the color in the template is
almost uniform, the template is well contrasted from the background,
and there is a good amount of separation between different occurrences
of the template in the image. This strategy is the fastest way to find
templates in an image.
Color Score Weight
When you search for a template using both color and shape information, the
color and shape scores generated during the match process are combined to
generate the final color pattern matching score. The color score weight
determines the contribution of the color score to the final color pattern
matching score. If the color information of the templates is superior to
its shape information, set the weight higher. For example, if you set
colorWeight to 1000, the algorithm finds each match by using both color
and shape information, and then ranks the matches based entirely on their
color scores. If you set
colorWeight to 0, the matches are still found using
color and shape information, but they are ranked based entirely on their
shape scores.
Minimum Contrast
Use the minContrast element to increase the speed of the color pattern
matching algorithm. The color pattern matching algorithm ignores all
image regions where grayscale contrast values fall beneath a set minimum
contrast value. Refer to the Setting Matching Parameters and Tolerances
section of this chapter for more information about minimum contrast.