IMAQLearnPattern6 Returns a Null Pointer Error in LabWindows/CVI

Updated Jun 25, 2020

Reported In

Software

  • LabWindows/CVI

Driver

  • IMAQ Vision

Issue Details

I have created a project in LabWindows/CVI to search for a template image in another image. In order to do it, I use the imaqLearnPattern and imaqMatchPattern functions.

When I run my code, I get the following error when executing the imaqLearnPattern6 function:
NON-FATAL RUN-TIME ERROR: Function imaqLearnPattern6: (errorCode == -2085395269 [0xbff6077b]). Null pointer

Why do I receive this error?

Solution

When you use the imaqLearnPattern, make sure that you don't put the RotationAngleRange argument to NULL. That would explain the error because you should define a rotation range. If you don't want to allow a rotation in your image, please call the function with 0 in the argument fields.