Camera Tracking

Discussion in 'Physics & Math' started by Blindman, Aug 6, 2004.

  1. Blindman Valued Senior Member

    Messages:
    1,425
    I need help..

    I have about 30 seconds of helicopter footage of a building site. I have managed to write a program that will track points in the video as x and y screen coords but need to convert this to x,y,z and locate the camera at each frame. I tried to triangulate by using the focal length (27.5mm) but get huge errors for each frame.

    Is there a way to remove the error and get an approximation of the cameras position and a x,y,z position of the tracked points.

    Any help at all would be greatly appreciated as I have exhausted all avenues. I know I must be missing something in my triangulation. It works fine for just two frames but adding more just does not work.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. darktr00per Registered Senior Member

    Messages:
    132
    If you dont know how to program.....dont try.
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. Blindman Valued Senior Member

    Messages:
    1,425
    Gee that does not help... I know how to program Ive been doing it for about 20 years, my problem is the math. How to reduce the errors of triangulation over many frames with about 100 tracked points per frame. It does not need to be real time.

    The problem is that the resolution of each frame does not allow for triangulation, i am assuming that this error can be reduced over many frames. I just don't know how.
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. darktr00per Registered Senior Member

    Messages:
    132
    What program lang r u using? and on top of it all, its going to be complicated as hell.
     
  8. Blindman Valued Senior Member

    Messages:
    1,425
    C#.. But the language is irrelevant its a math theroy im after..
     
  9. talk2farley Registered Senior Member

    Messages:
    190
    If the math holds up for one or two frames, abandon the focal length and instead get the position of the object being videotaped at frame 1. then use the change in distance at frame 3 to get the change in the cameras position. Im not sure if this will work as math is not my forte, but its worth a shot.
     
  10. Blindman Valued Senior Member

    Messages:
    1,425
    I just cant seem to get my head around it.. At the first frame project a set of lines from the focal plane, then at the second frame I do the same. Then I try to move the camera so that all the lines intercect the line from the first frame with a arbatary error, but each susequent frame i have to expand the error so that the lines from the camera interset all the line from the first and second frame and so on. I end up with spheres of approimate intersection that keeps on expanding with each frame. In the end I end up with a set of spheres around each point. I need to get the best fit for each frame.

    Currently I guess the camera movement and iterate so that the total volume of all spheres are at a minimum, but this method just does not work. My camera moves wildly, and when I match it up to a 3D scene it just looks wrong...
     
  11. Pete It's not rocket surgery Registered Senior Member

    Messages:
    10,167
    I don't think this is an easy problem. I think you need to hire a consultant with the right skills.
     
  12. thefountainhed Fully Realized Valued Senior Member

    Messages:
    2,076
    Do you know anything about Gaussian distribution?
     
  13. Blindman Valued Senior Member

    Messages:
    1,425
    Thanks for the hint.. Ill use this to help me weed out bad pixel projections, and use it to refine the camera fit iterations.
    I have refined the pixel matching and the lens projection and have reduced the error greatly, almost usable.
     
  14. AD1 Registered Senior Member

    Messages:
    249
    So, let me get this straight, you have a footage taken from a helicopter, and you wish to determine the path the camera took through the scene while shooting the footage? i.e. that of the helicopter.
     
  15. Blindman Valued Senior Member

    Messages:
    1,425
    Yep, almost there.
     
  16. thefountainhed Fully Realized Valued Senior Member

    Messages:
    2,076
    cool. I didn't wanna write a long post. Good job.
     

Share This Page