Massiv speed problems from sending frames to the PC

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

Massiv speed problems from sending frames to the PC

Postby mat » Mon Nov 13, 2006 10:20 am

Hi

How are you doing such things at such high Bitrates???

I just want to send an image from the Cam to my PC. Im running the Cam synchron with the uC (MEGA32) at 16MHz. My frame rate is the minimum avalible, lets say something about 1,3 frame /s. My Picture size is 146x176. Together not even close to your settings. I'm running my serial interface at 1MBaud (1Byte = 10us) but my Pixelclock is coming every 4us. (something about 380 times per line).
So I ask you, how it is possible to process images with 30 frames per second. I wouldn't even be able to load the data in my memory at such a speed.
And how can you send a color image to your PC. Even with 1MBaud, my serial interface is still a bottleneck.

I would be very grateful for your help, cause I'm stuck at the moment with using 'only' a MEGA. If you need more specific information, just ask.

Thanks and Greeting
Matthias
mat
 
Posts: 1
Joined: Wed Oct 25, 2006 6:17 am
Location: Germany

Postby davedave » Thu Nov 16, 2006 7:00 am

OK, the 30fps stuff happens inside the AVRcam and only the tracking data (<100 bytes) is sent over serial because the serial connection is relatively slow (fixed at 115kb/s). To speed things up there are any number of things you can do with AVRs including, but not limited to shared ram chips, using a spare spi on one of the bigger chips. For faster connection to a PC you are going to have to consider constructing a USB 2.0 interface or some other custom channel. Having said all that, any modification means porting the code to something other than a mega8. There is a site which has ported the code to a mega64(?) but I can't remember where it is.
davedave
 
Posts: 15
Joined: Wed May 10, 2006 11:02 pm
Location: Canberra Australia

Postby johno » Sat Nov 18, 2006 2:42 pm

A couple of things to remember here:

-As DaveDave pointed out, when tracking colors, the only information being transferred over the serial port is tracking information (i.e., tracking packets). All processing is done in the AVR, so the 115.2 kbps serial link isn't even close to saturated

-When performing a frame dump, only the upper 4-bits per pixel are being sent out from the AVRcam. Adjacent pixels are packed (so one byte of dump data contains two pixels worth or R, G, or B information). The AVRcamVIEW PC app performs the interpolation to provide a 12-bit color value for each individual pixel (when you dump an image from the AVRcam using AVRcamVIEW, you see two versions of the image: one is the raw un-interpolated data, and one is the interpolated data).

-When dumping, it takes around 4 seconds to send a complete frame, so if you do the math (4-bits/pixel with 176 pixels/row and 144 rows per image, and a max data rate of 115.2 kbps), you'll find the theoretical max.
-John O
Site Admin
johno
 
Posts: 51
Joined: Thu Mar 16, 2006 2:29 pm


Return to AVRcam Embedded System

Who is online

Users browsing this forum: No registered users and 21 guests

cron