0
votes

I have calibrated my pinhole camera using opencv 3.0 and got 4 intrinsic parameters (f_x,f_y,u_0,v_0) plus some distortion coefficients. Using this calibration, I estimate the essential matrix from two images at different positions. Finally I want to recover (R|t) using the recover pose function from opencv 3.0. The interface of this function expects a single focal length, but I have two from the calibration procedure. How can a get the focal length f=f_y/s_y = f_x/s_x (Definition according to OpenCV) from f_x an f_y so that I can properly use the recover pose function?

2

2 Answers

2
votes

You can simply use the horizontal focal length f_x. The ratio f_y/f_x is just the pixel aspect ratio, an estimate the squareness of the pixels.

Note that, unless you have some absolute scale reference in your image pair (e.g. an object of known size), you can recover pose only up to scale, that is, R and s*t for some unknown scale s.

0
votes

You can't really derive the actual focal length just from f_x and f_y. For a pinhole camera the actual focal length is the distance from the pinhole to the imaging plane. Your camera probably has the focal length written somewhere in the specs.