From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read image from a memory pointer imaq


@JMSH wrote:

Sorry again, you are right of course xD, I did correctly the count, I can get 7680000 bytes in range [0,255], so it is 1200x1600x4. Format is RGB32. 

What I need is to know how to pass from it to the controlable image. But as you said, I don´t know how it is stored on memory, so I don´t know the order in with I get the vector. But what should I have to do to passing it to image now?

Thank you again,

Best regards.


Well, a first approach would be to copy it into a LabVIEW array of 1200*1600 uInt32 values. Something along these lines should work.

Memory Pointer.png

 

The bitmap array that is returned should be already in the right format then. However when passed to the IMAQ ArrayToImage function you may end up with wrong colors since the color components might be not in the right order. You would have to play around with swapping the individual bytes in each uIn32 pixel to get good colors.

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 11
(713 Views)