Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Unhandled Exception thrown occurred in NationalInstruments.Vision.Common.dll

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;
        }

 


 

 

 

0 Kudos
Message 1 of 3
(4,037 Views)

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!

Sincerely,

Greg S.
0 Kudos
Message 2 of 3
(4,024 Views)

Hi Greg,

 

Thanks for the reply.  I've solved the problem.  It was just licensing issue.  

 

Thanks

Jim

0 Kudos
Message 3 of 3
(4,011 Views)