|
Re: Help me pls...
The data you are getting is in the 12rgbrgb pattern, but it isn't human readable. For example, instead of sending the character '1', followed by the character '0', followed by the character '0', the CMUcam2 sends only one character that the computer sees as the hex value 0x64, which is 100 in basse ten. Then, when you pass 0x64 to be printed on the screen as a single character, it would show up as a 'd', because 'd' is the 100th character in the ASCII table. So what you need to do is take each character and cast it to a number, and then that number is the intensity value for that pixel. Our team used Python for CMUcam2, so we used the ord(char) function. Google tells me the VB equivalent of this is asc(), so if you use that, you should be able to read the pixel values.
Oh, by the way, the 1s, 2s, and 3s used in the SF protocol are encoded the same way. So when you expect to see a one at the beginning of the frame dump, the one is send as the hex value '0x01', which you can't read without using asc().
|