02-23-2013 08:22 AM
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?
02-25-2013 05:55 PM
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.
03-01-2013 05:32 PM
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
03-02-2013 12:33 PM