Go to Post Once you go hex you'll never go back. - sdcantrell56 [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 05-02-2007, 12:40
itsme itsme is offline
Registered User
FRC #2217 (FOMH)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Israel
Posts: 86
itsme is an unknown quantity at this point
Unhappy Desperate for help in camera tracking

My team and I had only managed to make the camera track in the pan direction. We are having a serious problem tracking in the tilt direction. We are programing in EasyC pro, and since there isn't any prepared code for the camera search and tracking, we made it ourselves. Here's what our tracking function mainly does: after it finds the light (with the search function we maid witch works pretty fine), it has to find the value of the center of the light. If there is only 1 light then the value to rotate to is the centroid_x. If there are 2 lights the value to rotate to is: if the centroid_x is closer to the right, then it is about 3 pixels to the left from the upright_x, and if it's more closer to the left then it is about 3 pixels right from the bottomleft_x. After that I put the pan_move function. This function gets the value that it has to move for. The rotation is 255-value because the value and the rotation's x axle are upside down (correct me if I'm wrong). All this works pretty fine, (it moves a bit too little, but I think it's correct). Now, the big problem is the tilt direction. I set the rotation of the tilt direction to be the 255-centroid_y value (that means it has to rotate to the PWM value). But the problem is: it just goes up and down and running crazy. Our team doesn't have any idea what's the problem
Our code goes something like this:

Code:
Search_Light(); //when found it stops the movement of  the servos
while(1) //infinite loop
{
     Get_Target(); //Stores the x and y values to rotate to into global variables
     Pan_Move(); //Moves the pan servo using PWM from the global variable
     Tilt_Move(); //Moves the tilt servo using PWM from the global variable
}
The code is supposed to keep tracking the green light.
Please help us, we are sitting with this irritating problem for over 3 weeks now. We are desperate for help!
I would be very happy if someone gave us some direction to go to.

Last edited by itsme : 05-02-2007 at 12:46.
 


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
Camera tracking problem Windward Programming 2 15-01-2007 17:59
CMU Camera Tracking auditt241 Programming 0 03-02-2005 16:33
Camera Tracking Woes VideoMan053 Programming 4 29-01-2005 18:09
In desperate need of some help archiver 2000 0 23-06-2002 23:40
desperate help Andrew Dahl General Forum 0 21-11-2001 12:08


All times are GMT -5. The time now is 11:40.

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