LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save an unsigned24-bit array into three image (R, G, and B channel)

Hi all.

 

I acquired one image from my color camera. The data is in a 2D array of unsigned 24-bit data.

I want to get the R, G, and B data (corresponding to the 16-23, 8-15, 0-7 bit) in to three different images.

 

Is there LabVIEW function can perform this job?

 

Thanks a lot...

 

0 Kudos
Message 1 of 5
(2,756 Views)
Have you tried the Color to RGB VI? Or, you can always use the Split Number node.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(2,754 Views)

In Labview you have 8,16,and 32 bits data types but non 24 bit. So I guess your 2d array is U32 data type. You can mask any color using logical and functions in the Boolean function palette. if you want to only keep the information in bit 16 to 23 you "and" every number in the array with 0x0F00, bit 8 to 15 you "and" with 0x00F0, and so on.

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 5
(2,741 Views)
The Color to RGB VI will do that for him. That VI is password protected but the RGB to Color VI isn't and should give you an idea of how the former is implemented (assuming it's just inverted logic, which I'm sure it is). And, yes I didn't mention that they isn't a 24 bit data type, but I was assuming he would've figured that out 🙂
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 5
(2,738 Views)

thanks a lot for the help, guys,

I used color to rgb to solve this issue.

attached is the picture showing my LV code (for the reference of those who might need it in the future)...

0 Kudos
Message 5 of 5
(2,702 Views)