06-15-2011 03:05 PM
Hi cowboy,
"essentially I want a 640 x 480 array with each cell containing 16-bit value. The original array is double the size, with 8-bit."
Pick the corresponding bytes in correct order (as mentioned by Altenbach) and join them!
06-15-2011 04:03 PM
Would this do what you want? You might need to change representation or order of pages to get the right values.
Lynn
06-15-2011 04:19 PM - edited 06-15-2011 04:21 PM
That would be correct for a 3D 680x480x2 array, but I don't think this is customary for 10 bit data. More likely is flat arrangement in memory, such as in a 1360x480 array for example, with the bytes to be merged adjancent to each other.
Assuming big endian, the following might work.
Modify as needed. There are probably bugs....
06-16-2011 01:02 PM
Thank you all so much for your feedback.
Here is some additional information I have obtained about the situation:
The camera provides 8-bit data in an array on labview. Ultimately I would like to aquire 10-bit data by converting the 8-bit data into 16-bit. In binary, the last six digits would be 000000 and to my understanding, those zeros can be "cut off" to enable a 10-bit solution.
06-16-2011 01:09 PM
cowboys99 wrote:
The camera provides 8-bit data in an array on labview. Ultimately I would like to aquire 10-bit data by converting the 8-bit data into 16-bit. In binary, the last six digits would be 000000 and to my understanding, those zeros can be "cut off" to enable a 10-bit solution.
I'm sorry, but this still isn't making much sense. Why do you want 10-bit data? How does "converting the 8-bit data into 16-bit" give you 10 bits? Also, you're going to end up storing your 10-bit data in 16-bit values anyway (the computer can naturally address 16-bit values, but cannot do so for 10-bit values), so losing the lower 6 bits won't gain you anything in terms of memory use unless you're willing to write a lot of code to pack and unpack 10-bit values.
06-16-2011 01:15 PM
cowboys99 wrote:The camera provides 8-bit data in an array on labview. Ultimately I would like to aquire 10-bit data by converting the 8-bit data into 16-bit. In binary, the last six digits would be 000000 and to my understanding, those zeros can be "cut off" to enable a 10-bit solution.
Obviously, words are insufficient. Why don't you attach a VI that contains a typical input array, either as default data in a control or indicator, or as a diagram constant?
You cannot cutoff individual bits from a 16 bit value, but you can ingore certain bits.