Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Camera Programming (http://www.chiefdelphi.com/forums/showthread.php?t=49269)

railerobotics 02-10-2006 23:15

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.

Astronouth7303 03-10-2006 15:56

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.

railerobotics 04-10-2006 21:59

Re: Camera Programming
 
Thanks, I'll try that and see what happens


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

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