LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting array to U8 as input for MATLAB script node doesn't work

I'm using the ColorImageToArray.vi to take an image and convert it to an array. Since the image is actually grayscale, I'm using array subset to take one plane from the array. I want to convert this array to uint8 for some processing in a MATLAB script node. When I try to do this conversion in the script node convertedarray = uint8(array) it gives me an empty array.

 

When I try to use the To Unsigned Byte Integer function in LabVIEW, it gives correct values, but MATLAB still sees it as an array of doubles.

 

How can I cast a 2D array to something that MATLAB sees as uint8?

0 Kudos
Message 1 of 2
(2,752 Views)

It seems to me that your problem is with matlab. Maybe you should ask in their forum.

Can you show is some code?

0 Kudos
Message 2 of 2
(2,687 Views)