10-15-2020 11:25 AM
Hello I am trying to pass an image captured in LabVIEW to a python script and I am having trouble displaying the image in the python script because of the data passed being U16 data or a string.
I have attached the python and labview programs. Any help would be great:)
10-16-2020 10:21 AM
I recreated your VI and python code and I think the issue is that you're using the wrong output from 'IMAQ Image to Array.vi'
In your screenshot, it shows that you're taking the I16 output of that vi, not the U16 output. Since your image is U16, the I16 output will be empty.
Try changing the terminal you have 'image' connected to to the following:
10-16-2020 10:56 AM
Thank you for the reply. Yes, I have tried this. The screenshot was probably an iteration that I did not revert back to the U16 connection. My apologies. It still gives errors when trying to display the image in python when the image data is sent. Either with the array or the actual image data.
10-19-2020 01:53 AM
Try changing the endianness of the U16. It may well be that LabVIEW's data does not match Python's representation. I have seen this before with external code.
12-11-2020 10:16 AM
Any thoughts on how to pass a color image? Do you have to pass per plane and then re-assemble? The only other idea I have is to pass a file path and use the load and save functions in opencv. Kinda janky, and very in-efficient, but would work.