Closed simpzan closed 2 years ago
hi, the units of positions is in millimeters, rotations is in degrees Please refer to this page to understand how to get extrinsic parameters of a fisheye camera. https://sites.google.com/site/scarabotix/ocamcalib-toolbox
Thanks, Zong Wei
@zongwave seems like Export Data
only export intrinsic parameters. so I need to modify the matlab code to export the RRfin
to get the extrinsic parameters, right?
this tool export extrinsic parameters RRfin in terms of rotation matrix , you should convert the matrix into Euler angles roll/pitch/yaw
https://sites.google.com/site/scarabotix/ocamcalib-toolbox
RRfin | Contains the extrinsic parameters of every checkerboard with the respect to the camera reference frame. RRfin is a 3x3xM matrix, where M correspond to the respective image number. The first two columns of RRfin identify the ROTATION matrix (which is given by the column vectors Rx and Ry; Rz can be obtained as cross product between Rx and Ry). The third column of RRfin identifies the TRANSLATION vector of the checkerboard (i.e. [tx;ty;tz]) |
---|
@zongwave I just get the following RRfin
matrix.
0.008067090116959 -0.001721306462260 -0.598260206191614
0.002777823138339 0.009548147942833 -1.367026172935751
0.005215913693398 -0.002422803113083 -3.522215947851525
according to the doc,
(0.008067090116959, 0.002777823138339, 0.005215913693398)
(-0.001721306462260, 0.009548147942833, -0.002422803113083)
, (-0.00005653243414877, 0.00001056678510185, 0.00008180725482393)
.now Rx, Ry, Rz vectors are all known, how to get the rotation matrix? I just googled a bit, the Rx is matrix of following form, not a vector. so I am still confused.
| 1 0 0 |
Rx = | 0 cos A -sin A |
| 0 sin A cos A |
RRfin defines a rotation 3-vector, matlab function "rodrigues" can be used to calculate corresponding rotation matrix. details of rodrigues rotation formula at wiki: https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula
rodrigues Transform rotation matrix into rotation vector and viceversa.
Sintax: [OUT]=rodrigues(IN)
If IN is a 3x3 rotation matrix then OUT is the
corresponding 3x1 rotation vector
if IN is a rotation 3-vector then OUT is the
corresponding 3x3 rotation matrix
this tool export extrinsic parameters RRfin in terms of rotation matrix , you should convert the matrix into Euler angles roll/pitch/yaw
https://sites.google.com/site/scarabotix/ocamcalib-toolbox RRfin Contains the extrinsic parameters of every checkerboard with the respect to the camera reference frame. RRfin is a 3x3xM matrix, where M correspond to the respective image number. The first two columns of RRfin identify the ROTATION matrix (which is given by the column vectors Rx and Ry; Rz can be obtained as cross product between Rx and Ry). The third column of RRfin identifies the TRANSLATION vector of the checkerboard (i.e. [tx;ty;tz])
Hi, @zongwave , extrinsic parameters of a fisheye camera means the position and Euler angles of a fisheye camera in world(vehicle) reference frame?
@zongwave I just get the following
RRfin
matrix.0.008067090116959 -0.001721306462260 -0.598260206191614 0.002777823138339 0.009548147942833 -1.367026172935751 0.005215913693398 -0.002422803113083 -3.522215947851525
according to the doc,
* Rx is the first column, namely `(0.008067090116959, 0.002777823138339, 0.005215913693398)` * and Ry is the second column, namely `(-0.001721306462260, 0.009548147942833, -0.002422803113083)`, * and Rz = Rx cross product Ry, namely `(-0.00005653243414877, 0.00001056678510185, 0.00008180725482393)`.
now Rx, Ry, Rz vectors are all known, how to get the rotation matrix? I just googled a bit, the Rx is matrix of following form, not a vector. so I am still confused.
| 1 0 0 | Rx = | 0 cos A -sin A | | 0 sin A cos A |
Have you solved the problem yet?
@simpzan Have you solved the problem yet?
This might be a bit late, but just in case anyone working with libxcam moving forward has this doubt, following is the confirmation I've got from the OCamCalib forums:
The affine transform RRfin is [x y t]. Thus, to create a rotation matrix of RRfin for frame/image f do the following:
x = RRfin(1,:,frame);
y = RRfin(2,:,frame);
T = RRfin(3,:,frame);
z = cross(x,y);
R = [x y z]
And then with the R just created, the euler angles can be got as follows (in python3 code):
from scipy.spatial.transform import Rotation
r = Rotation.from_matrix(R)
angles = r.as_euler("zyx", degrees=True)
I hope this is right. If not, I hope the people maintaining this repo correct me.
hi, the units of positions is in millimeters, rotations is in degrees Please refer to this page to understand how to get extrinsic parameters of a fisheye camera. https://sites.google.com/site/scarabotix/ocamcalib-toolbox
Thanks, Zong Wei
This link is not available. It is not cleared to extract the extrinsic parameters from ocamcalib tool.
Hi, there. I am trying to run test-surround-view with following extrinsic parameters, it doesn't work. the parameters are calculated with opencv
solvePnP()
. what is the expected unit/format for the extrinsic parameters? and how to obtain them? Thanks!