Announcement

Collapse
No announcement yet.

RAW picture 80x60 2bit gray scale shows as only 1200 bytes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RAW picture 80x60 2bit gray scale shows as only 1200 bytes?

    Hi all,I am trying to get a raw picture from my uCam-TTL at 80x60 resolution, 2 bit gray scale. Expected to see the size as 4800 coded in the param 2, 3 and 4 fields of the uCam-TTL's DATA command if the operation worked correctly.However am seeing only 1200.Is it that instead of sending 4800 bytes each containing two used bits, the uCam-TTL sends (4800x2)/8bytes, that is --- the minimum number of bytes needed to contain 80x60x2 used bits, which works out to be 1200 ?Is this what is happening ?here is the INITIAL command to set up for RAW, 80x60, at 2 bit gray scale[HTML]const unsigned char CONFIG_RAW_80x60[] __FLASH__= {0xaa, 0x01, 0x00, 1, 1, 0};//2bitGray,80x60,0Here iis the check for the DATA I.D. and param 1
    HTML Code:
    if( buf[0]==0xaa && buf[1]==0x0a && buf[2]==0x02 //raw preview data buf[2]==0x02
    and here is section to see what size the data is to be//next line to see how much data in the picture,its len,by looking uCam DATA command
    //params 2,3 and 4
    len= (uint32)buf[3] | ((uint32)buf[4])

  • #2


    the minimum number of bytes needed to contain 80x60x2 used bits, which works out to be 1200 ?
    That is correct

    The pixels arrive top left to bottom right

    First byte and with 0xC0 to get first pixel, 0x30 to get second, etc.
    Mark

    Comment


    • #3


      Thanks for your reply ESPsupport,

      All the best, Seán

      Comment

      Working...
      X