|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#3
|
|||
|
|||
|
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) 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 |
|
|
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 |