Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

convolute

When i use filter (particularly laplace) in my script and  create .NET code from this script with Vision Assistant Code Create ( VA, version 2012 SP1), VA create incorrect code.

 

incorrect code:

            // Filters: Convolution - Applies a linear filter to an image by convolving the image with a filtering kernel.
            double[] vaCoefficients = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
            Algorithms.Convolute(image, image, new Kernel(7, 7, vaCoefficients), 0);

 

error message:

Error1:    The best overloaded method match for 'NationalInstruments.Vision.Analysis.Algorithms.Convolute(NationalInstruments.Vision.VisionImage, NationalInstruments.Vision.VisionImage, NationalInstruments.Vision.Analysis.Kernel, NationalInstruments.Vision.VisionImage)' has some invalid arguments    [----]\ImageProcessing.cs    127    4    Vision Assistant.2008

 

Problem is:             Algorithms.Convolute(image, image, new Kernel(7, 7, vaCoefficients), 0);

 

When i correct it myself as: Algorithms.Convolute(image, image, new Kernel(7, 7, vaCoefficients));

 

can i compile project without error. Is there a reasonable explanation for this error?

 

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 4
(3,831 Views)

musakaradag,

 

We have found an issue with our Vision Assistant code creation creating broken code when converting filter functions to C# code. We found this issue earlier this month and are actively pursuing a resolution for this issue. I apologize for the inconvenience this may cause.

 

Blake C.
Applications Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 4
(3,792 Views)

The problem has been reported (CAR# 390138) and will be fixed in the next release of the software (2013 due in June or July time frame).

In the meantime, replace the file C:\Program Files (x86)\National Instruments\Vision Assistant\CG\templates\IVAConvolute.ascx by the one attached (rename the txt file .ascx)

It will fix the issue the next time you generate the code.

 

Best regards,

 

Christophe

0 Kudos
Message 3 of 4
(3,770 Views)
Thank you very much.
0 Kudos
Message 4 of 4
(3,766 Views)