generating graycode isn't mathematically very difficult
do you want to store it in a 768x1024x20 matrix?
or is it enough just to have the binary values in a 768x1024 matrix?
I can't remember much about matlab to be honest
you can see how to render the graycode values at:
that'll give you a 1024*768 array of integers
then for each frame, you should trasmit a bit for each frame
this is performed at
but you can code this in a way that makes more sense to you
for (int i=0; i<size; i++)
*pixel++ = (*data++ & (uint)1 << frame) == (uint)1 << frame ? (uchar)255 : (uchar)0;
means for each pixel, get the integer for that pixel
then select the bit for this frame (bitshift 1 by frame, [&] this value against the int, check whether equals 1 bitshift by frame)
the output is then converted to 255 (full brightness) or 0
elliot
On 13 February 2012 22:58, Dalia Nada
<dalia...@gmail.com> wrote:
Is there a open source code to generate gray code pattern ( 20 frames
maximum) using matlab ??????