Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1
Send Topic Print
camera frame buffer format (Read 805 times)
admin
YaBB Administrator
*****




Posts: 3676
camera frame buffer format
01/29/08 at 7:54am
 
Another email question -
 
>Hi, could you just explain me how the "unsigned char *frame_buf" (the
>picture) is structured? Is it an array of YUV values, with 3 entries
>for every pixel of the image? Are there any headers? I'm just asking
>because I wanted to work a bit on the vision functions on the firmware.
>
 
There aren't any headers. The U and V are subsampled by the OV9655, so the frame buffer format is actually UYVY - each Y pixel uses its adjacent U and V to form a complete YUV, and in the image processing code, we sometimes average the 2 Y pixels -
 
  ix = index(xx,yy);
  //y = (((unsigned int)frame_buf[ix+1] + (unsigned int)frame_buf[ix+3])) >> 1;
  y = (((unsigned int)frame_buf[ix+1] + (unsigned int)frame_buf[ix+3])) >> 1;
  u = (unsigned int)frame_buf[ix];
  v = (unsigned int)frame_buf[ix+2];
 
The total frame buffer size is actually imgWidth*imgHeight*2.  The OV9655 basically counts a pixel as a 16-bit UY or VY pair.
Back to top
 
« Last Edit: 01/29/08 at 8:47am by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
Pages: 1
Send Topic Print