09-20-2011 11:28 AM
Hello,
I'm currently running VDM 2011. When I used it to generate the calibrated solution for VS 2008. The following bug has been found
Public Shared Function ProcessImage(ByRef image As VisionImage) As PaletteType
'Initialize the IVA_Data structure to pass results and coordinate systems.
Dim ivaData As New IVA_Data(2, 0)
'Calibrate Image: Calibration from image
Dim vaFileName As string = "E:\\Master\\Samples\\Calibration Grid\\New2011.png"
Using calibratedImage As New VisionImage(ImageType.U8, 7)
calibratedImage.ReadVisionFile(vaFileName)
Algorithms.CopyCalibrationInformation(image,calibratedImage )
End Using
'Image Correction
Dim vaFillValue As PixelValue = Functions.IVA_SetPixelValue(image.Type, 0, 0, 0, 0)
Algorithms.CorrectCalibratedImage(image, image, vaFillValue, InterpolationMethod.Bilinear)
'Dispose the IVA_Data structure.
ivaData.Dispose()
'Return the palette type of the final image.
return PaletteType.Gray
End Function
09-21-2011 04:50 PM
Hello Waleed,
Could you please attach your Vision Assistant script in a reply? I will be looking into whether this issue is a known problem that has already been targeted to be fixed by R&D or if it is something that we will need to investigate, but I would also like to have a look at your Vision Assistant script and make sure that the problem can be replicated.
Thanks!
09-26-2011 07:36 PM
Hi Waleed,
Those are both very good points. Regarding the second one, I created CAR 316646, which will be fixed in 2011 SP1.
I can provide you with a way to fix it. Just modify the file
C:\Program Files (x86)\National Instruments\Vision Assistant\CG\templates\IVAImageCalib.ascx
On line 14, just swap the 2 parameters, and the problem will be fixed the next time you generate code.
Thanks for reporting that issue.
-Christophe
09-28-2011 01:16 PM
Thanks for your kind response,
I've already swapped the parameters since my posting. I've enclosed the used script for revision. One final notice, regarding overelays, the vision assistant uses obsolete way to draw them while there is new methods in the algorithm namespace (one line of code) to draw them !. It is very clear when drawing rotating rectangle.
Thanks again for your kind response and concern.