focal length in pixel from fx and fy

asked 2016-03-29 11:26:43 -0600

Hi,

how can I get focal length in pixels from fx and fy? I need to get disparity using z = b*f / d,

where z is the depth (in meters), b is the horizontal baseline between the cameras (in meters), f is the (common) focal length of the cameras (in pixels), and d is the disparity (in pixels). At zero disparity, the rays from each camera are parallel, and the depth is infinite. Larger values for the disparity mean shorter distances.

I am using kinect with the focal length: fx_rgb = 5.1885790117450188e+02 * ratio; fy_rgb = 5.1946961112127485e+02 * ratio;

Kinect is not a stereo sensor, therefore I dont have a "baseline".

Please help Ayesha

edit retag flag offensive close merge delete

Comments

btw, please spare us duplicate qiestions.

berak gravatar imageberak ( 2016-03-29 12:04:07 -0600 )edit

Kinect1 is a stereo sensor: it has an infrared projector and an infrared sensor.

Kinect2 is a time of flight sensor (if you are talking about Kinect2).

Anyway, with only the RGB camera stream, you will not be able to recover the depth. With Kinect1, there are multiple libraries or SDKs (the official Windows SDK or OpenNI for example) that return directly the depth map.

Eduardo gravatar imageEduardo ( 2016-03-29 15:34:25 -0600 )edit

Hi, I have depth, I am intended to recover the disparity.

ayeshas gravatar imageayeshas ( 2016-03-29 16:39:57 -0600 )edit

Have you seen this ?

Eduardo gravatar imageEduardo ( 2016-03-30 04:06:44 -0600 )edit