Open vanshilshah97 opened 3 years ago
Hi, you don't extract the calibration matrix from Unity, instead, it is calculated on the client-side (ROS/C++).
Since both the image dimensions (width x height) and field of view (FOV) are defined by the user. (see https://github.com/uzh-rpg/flightmare/blob/master/flightlib/include/flightlib/sensors/rgb_camera.hpp#L59-L61)
you can compute the focal length using this formula: f = ( image.height / 2.0 ) / tan( (M_PI * FOV/180.0 )/2.0 )
and fx=fy
. Hence, the camera intrinsic matrix is[ [fx, 0, image.width/2], [0, fy, image.height/2], [0, 0, 1] ]
.
How would be able to extract callibration matrix from unity ?