09-02-2011 09:53 AM
Hi there,
I am trying to run the C#.net example pattern matching code (running Visual Studio 2008 .NET framework 3.5). When Algorithms.Extract is called, I got an exception:
An unhandled exception of type 'NationalInstruments.Vision.VisionException' occurred in NationalInstruments.Vision.Common.dll
This happen after I load an image in and draw a rectangle around the pattern I want to match. Then click on the LEARN button.
Any help would be much appreciated.
Thanks
Jim
Here is the code:
private void learnPatternButton_Click(object sender, EventArgs e)
{
learnPatternButton.Text = "Learning...";
// Extract region corresponding to the region of interest in the image window
Algorithms.Extract(imageViewerMain.Image, imageViewerPattern.Image, (RectangleContour)imageViewerMain.Roi[0].Shape);
imageViewerMain.Roi.Clear();
// Learn template
Algorithms.LearnPattern(imageViewerPattern.Image);
learnPatternButton.Text = "Learn Pattern";
// Enable the Match button and disable the Learn button
learnPatternButton.Enabled = false;
matchPatternButton.Enabled = true;
}
09-06-2011 04:05 PM
Hello Jim
Thank you very much for bringing this to our attention. Can you please site the location of this example? As well, would you mind posting a screenshot of the error you are receiving? Thank you very much!
09-12-2011 09:14 AM
Hi Greg,
Thanks for the reply. I've solved the problem. It was just licensing issue.
Thanks
Jim