Go to Post Any metric you want to apply to Pink, they will pass with flying colors. Pun intended. - Lil' Lavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-02-2006, 18:55
wvenhau wvenhau is offline
Registered User
no team
 
Join Date: Feb 2006
Location: SIUE
Posts: 3
wvenhau is an unknown quantity at this point
Using Send Frame Command

Hi,
I recently purchased the CMUcam2+ and I'm trying to send a frame to a PIC to do further image processing. I'm using the SF command to send it and when I do I'm receiving a whole bunch of garbage (ASCII characters). This doesn't surprise me because that's what the manual says it suppose to do. However what I'd like is to have the RGB data (i.e. a array of integers).
Can I have the CMUcam2+ send the PIC this information?
Or, do I need the PIC to decode the the ASCII characters and produce my array of ints? If so, I haven't got the foggiest idea of how to do so.
Any help will be greatly appreciated.
Thanks,
Bill

Last edited by wvenhau : 19-02-2006 at 19:59.
  #2   Spotlight this post!  
Unread 20-03-2006, 12:32
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
Re: Using Send Frame Command

The CMUCam sends RGB data as binary values, a series of bytes.
Look at the documentation for "F packets". However don't look too closely.
I have found several versions that are different, and none match what I see
the camera doing. (To be sure of what your camera is doing, dump the
first few bytes out with a printf, or dump it all to a file and use a hex viewer.)

This is what I found to work, the camera outputs:

- a byte of 0x01
- a byte with the x size (number of pixels in a row)
- a byte with the y size (number of rows)
- bytes of pixels data, 3 bytes per pixel,
--- a byte with the red value of this pixel
--- a byte with the green value of this pixel
--- a byte with the blue value of this pixel
The number of these bytes is xsize * ysize * 3
- a byte of 0x02
- a byte of 0x03

If you count bytes, you can ignore these last two, but they can help you
tell when you have dropped data. None of the pixel data bytes will be less
the 16. The older your computer, the more likely that the serial link will be unable to keep up at high baud rates, try running at a slower baud rate.
__________________
Don Reid
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a digital picture frame Billfred Chit-Chat 2 21-01-2006 09:52
Won't grab frame in Labview Robert Dores Programming 2 14-01-2006 04:13
using eclipse dasRatsel Programming 82 02-01-2006 13:20
Software Development System Installation Mike Betts Programming 26 25-07-2005 10:48
programming codewords black mage Programming 9 23-02-2005 21:21


All times are GMT -5. The time now is 01:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi