11-06-2018 10:26 AM - edited 11-06-2018 10:27 AM
Hi,
I have .net library that returns data as System.Object that is really a byte array ("The pixel data buffer is provided as a byte array for a grab result"). I want to get them as LabVIEW array.
Width and Height return image size, they work fine, so I have image data.
In C# it is done as following:
// Access the image data. Console.WriteLine("SizeX: {0}", grabResult.Width); Console.WriteLine("SizeY: {0}", grabResult.Height); byte[] buffer = grabResult.PixelData as byte[]; Console.WriteLine("Gray value of first pixel: {0}", buffer[0]);
It is Basler USB camera through their Pylon. I do not have NI vision.
Thanks for help!
Solved! Go to Solution.
11-06-2018 03:12 PM - edited 11-06-2018 03:13 PM
Problem solved.
Simply .Net object to variant.vi from .net palette.
02-13-2019 02:32 PM
I have the same question.
Thanks for your help