focal length in pixel from fx and fy

asked Mar 29 '16

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

Preview: (hide)

Comments

btw, please spare us duplicate qiestions.

berak gravatar imageberak (Mar 29 '16)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 (Mar 29 '16)edit

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

ayeshas gravatar imageayeshas (Mar 29 '16)edit

Have you seen this ?

Eduardo gravatar imageEduardo (Mar 30 '16)edit