I am having trouble learning in a color image to perform a color pattern match. The Learn color function is returning a zero (error). I am trying to find template image within mainImage. The template is the center of the main image. Here is the code I am using to learn the image: The imaqLearnColorPattern function is returning a zero (error). Any Suggestions?
matchfeature=1 (color pattern matching)
Learn_options.featureMode=matchfeature;
Learn_options.learnMode = IMAQ_LEARN_ALL;
Learn_options.threshold = 80;
Learn_options.ignoreMode = IMAQ_IGNORE_NONE;
Learn_options.colorsToIgnore = NULL;
Learn_options.numColorsToIgnore = 0;
stat= imaqLearnColorPattern(template, &Learn_options);