I have a frame grabber that is returning R, G, B matrices (So, X, Y, {R,G,B})
But I need to slice up the data to 2 12 bit vectors; I'm unsure how to do this quickly (converting everything to strings is terrible).
If someone could help me out, I'd appreciate it; thanks all!
[Edit] here is what I mean: I have a data object that is 4-D - X,Y,RGB,FrameNumber.
So for example, if I do: data(1,1,1,1), I get the 1st row, 1st col, Red Channel, Frame 1.
The problem is my camera is infrared and actually spitting out 2 12 bit numbers (it's entirely custom). So I need to take this: data(1,1,1,1),data(1,1,2,1),data(1,1,3,1), concatentate them, and return to the user 2x12 bit numbers.
With strings:
data(1,1,1,1) = 0x40
data(1,1,2,1) = 0x37
data(1,1,3,1) = 0x4F
Concatentation gives me:
0x40374F
I'd need to return to the user, for this pixel: [403,74F]
[An apology about my example: I tried to quickly come up with a 4D matrix in matlab, and it's been so long since I've used it that it will take me a while to figure out what it actually looks like constructing it!]