Get relative position of object from moving camera.

131 Views Asked by At

I have a moving webcam trying to track an object and I want to get the relative position of where it is from the camera.

My setup is a webcam on a robot tracking a stationary object. The robot knows where it is at times, hence we know where the webcam is at all times. Let's assume the robot is webcam has the object fully in frame at all times.

So assuming that we know the webcam's a x, y, θ position, a vx, vy, vθ velocity, ax, ay, and aθ acceleration, the tracking object's height h and width w, how can we find the relative position of the object from the camera?