Ask Your Question

# How to convert stereo camera distances, pixels to mm [closed]

Hello.

I calibrated and stereo-parallelized the stereo camera.I would like to know how to find the coefficient to convert from pixels to mm.

From the Q matrix obtained by stereo rectification, Tx: baseline and f: focal length were determined. As you know, the depth z is found by the following formula

z = Bf/(x-x') z:[pixels]

However, the units of z obtained from this formula are pixels. A factor k[mm/pixel] is needed to convert it to mm. Then the equation is as follows

z = (Bf/(x-x'))*k z:[mm]

Is there a smart way to find this coefficient k? Please use something other than how to actually measure z several times to derive k, or how to examine the pitch pixels of the camera's image sensor.

In the case of HALCON, I was able to find it by a function instead of using the method described above.

Couldn't it be calculated from the camera and Q matrices obtained from calibration and stereo parallelization? Thank you.  edit retag reopen merge delete

## 1 answer

Sort by » oldest newest most voted

I didn't know there was such a useful function. Thank you.

more

Official site

GitHub

Wiki

Documentation

## Stats

Asked: 2020-09-21 06:31:18 -0500

Seen: 201 times

Last updated: Sep 26 '20