Go to Post In Soviet Russia, FTC support you! - AdamHeard [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 02-10-2006, 23:15
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Camera Programming

I was wondering, does anybody have some code that they used to get the robot to respond to the cameras values? Last year we got our camera to track but we couldn't figure out a way to use those values to make some code that would work. Any help is greatly appreciated.
  #2   Spotlight this post!  
Unread 03-10-2006, 15:56
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Camera Programming

I've used Kevin's code the last two years, modifying this year's code to set the camera to autotrack and report servo values.

To handle the camera, you need to:
  • Call the initialization function, Initialize_Camera(), in User_Initialize()
  • call Camera_Handler() on a regular basis (the slow loop works)

The data is dumped into the variable T_Packet_Data. It contains (by default):
  • The upper left and lower right points of the bounding box of the color blob (x1, y1, x2, y2)
  • The median of the color blob (mx, my)
  • The number of pixels in the blob
  • A "confidence" value (which is proportional to the number of pixels)
See camera.h for details.

If you have done all this, and are having problems getting the robot to "respond", you will have to go into more detail.
  #3   Spotlight this post!  
Unread 04-10-2006, 21:59
railerobotics's Avatar
railerobotics railerobotics is offline
Registered User
FRC #0935
 
Join Date: Jan 2006
Location: Newton, KS
Posts: 190
railerobotics will become famous soon enough
Re: Camera Programming

Thanks, I'll try that and see what happens
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
****Team 40 Checkmate easyC Camera Programming Workshop**** Kingofl337 Programming 0 05-09-2006 16:21
Need help Programming and wiring camera! Amisca Programming 1 14-02-2006 18:37
Camera doesn't have firmware? no programming? GraphicArtDesig Programming 6 19-01-2006 20:10
Camera Help (New to Camera Programming) Idaman323 Programming 6 14-01-2006 03:56
Should there be a section for the 'camera' under 'Programming' Bharat Nain CD Forum Support 6 25-01-2005 22:23


All times are GMT -5. The time now is 20:50.

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