Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

I need fast conversion of 24 bit RGB to IMAQ format image

I'm using Imaq Vision with cvi.
I get a 24 bit RGB array from my camera. To make this into an IMAQ Chunky Colour 32 bit image I first have to convert it to a 32 bit array:-

for (i=0; i memcpy(buf32[i*4], buf24[i*3], 3);

This works, but is pretty slow.
Does anyone have a faster way to achieve this?
0 Kudos
Message 1 of 2
(3,381 Views)
The only way that I can think of doing this is to use realloc to resize the array and doing bit shifts to reformat the data. Unfortunetly, I do not have any examples that do this.
0 Kudos
Message 2 of 2
(3,381 Views)