Bayer Data Help

This forum is used for discussing hardware, software, and technical details of the AVRcam embedded system.

Bayer Data Help

Postby frank26080115 » Fri Oct 05, 2007 8:42 pm

I'm writing a program in Processing to take frame dumps and display them. So far, I made the code grab all the data without a problem. But drawing is different, since every high nibble is green and the lower is blue first, then on the next pixel, the lower is red. How do you turn that into a pixel with a RGB value?

edit: I have my code working and the image is sorta real, I think you have your high and low nibble mixed up, the high nibble seems to always be red, and the lower seem to alternate between green and blue

oh and how do you get your software working with a USB to UART converter?
frank26080115
 
Posts: 9
Joined: Thu Oct 04, 2007 8:10 pm

Postby johno » Tue Oct 09, 2007 6:16 am

Hi Frank,
The AVRcam provides 4-bits of R, 4-bits of G, and 4-bits of B. Thus, the processor receiving these pixels needs to grab this data and do an interpolation of some kind to determine what RGB value should be used for each individual pixel. The AVRcamVIEW application uses a bi-linear interpolation (basically averaging the surrounding pixels to determine what RGB value to use for a pixel of interest). Its pretty straightforward.

You are correct that an error did appear in the user's manual in regards to the order of the 4-bit pixel values coming from the AVRcam. This will be corrected in future versions.

In regards to using a serial to USB converter, it depends if you are using Windoze of Linux. If using Windoze, the converter should just appear as COMx, and you would just select COMx before you connect with AVRcamVIEW. If using Linux, you'll need to put a soft link from /dev/ttyS0 to /dev/ttyUSB0.
-John O
Site Admin
johno
 
Posts: 51
Joined: Thu Mar 16, 2006 2:29 pm

Postby frank26080115 » Tue Oct 09, 2007 8:33 am

how do you do that soft link thing?
frank26080115
 
Posts: 9
Joined: Thu Oct 04, 2007 8:10 pm

Postby johno » Tue Oct 09, 2007 8:11 pm

ln -s /dev/ttyUSB0 /dev/ttyS0

or use the man pages for more info:
man ln
-John O
Site Admin
johno
 
Posts: 51
Joined: Thu Mar 16, 2006 2:29 pm

Postby frank26080115 » Tue Oct 09, 2007 10:07 pm

that didn't work, it still says no serial port found, but my own software will fare well enough now
frank26080115
 
Posts: 9
Joined: Thu Oct 04, 2007 8:10 pm


Return to AVRcam Embedded System

Who is online

Users browsing this forum: No registered users and 16 guests

cron