Go to Post Publishing your code and designs = good. - MrRoboSteve [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
  #3   Spotlight this post!  
Unread 05-02-2007, 13:55
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
Re: Desperate for help in camera tracking

Thanks for the information about the centroid range...
The camera probably bounced up and down because it never realy got to the right centroid_y. I didn't understand the code, what does 3 stand for? And 120 is supposed to represent the center of the tilt, right? Now I'll repair this in the pan direction too. So lets say I call the value of the x direction as target_x (like in the demo code) then every pixel of the centroid_x range is: target_x/159?
And another question: our camera is mounted with the ON/OFF switch on top, so where is the 0 of the centroid_x and the 159 of it? Same thing about the tilt.
Oh, and about the code, I will be glad if you could give me some pseodo code to learn from.. I am a rookie as you see, and I'm getting very nevous about this camera because I can't get almost nothing from it
Thanks in advance.

:::EDIT:::
I thought about it, and isn't it easier to calculate the exact tilt location according to the centroid_y (after the conversion to rotation, 239 centroid_y pixels are 255 rotation ticks--> 255/239=1.066... rotation ticks for each pixel. So if the centroid_y is let's say at 150, then the rotation has to be:
Code:
rotation=(int)centroid_y*(255/239); // or rotation=(int)255-centroid_y*(255/239);  Depends on the centroid_y direction.
SetPWM(Port_2,rotation)
Same thing about the pan servo (but not necessarily with centroid_x).
Correct me if I'm wrong please.

Last edited by itsme : 05-02-2007 at 15:15. Reason: An idea poped up
 


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