# How to get the extrinsic parameters from a extrinsic parameters matrix?

**URL:** <https://community.stereolabs.com/t/how-to-get-the-extrinsic-parameters-from-a-extrinsic-parameters-matrix/242>\
**Category:** Uncategorized\
**Created:** [May 12, 2021, 8:06pm UTC](https://community.stereolabs.com/t/how-to-get-the-extrinsic-parameters-from-a-extrinsic-parameters-matrix/242 "2021-05-12T20:06:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lks90](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/l/50afbb/32.png) [@lks90](https://community.stereolabs.com/u/lks90)\
**Post date:** [May 12, 2021, 8:06pm UTC](https://community.stereolabs.com/t/how-to-get-the-extrinsic-parameters-from-a-extrinsic-parameters-matrix/242/1 "2021-05-12T20:06:45Z")

</div>

I executed the calibration between two cameras and got the intrinsic and extrinsic parameters.

My problem is that the extrinsic parameters are in the [R | T] matrix format (3x4):

[r1 r2 r3 t1;  
r4 r5 r6 t2;  
r7 r8 r9 t3;]

and I need the extrinsic parameters in the same format of the ZED calibration parameters file (.conf).

So, I need to extract from this matrix the Baseline, TY, TZ, RX\_HD, CV\_HD and RZ\_HD parameters to add these values on the [STEREO] section of a ZED calibration file.  
I would appreciate some help in how can I extract these values from the extrinsic matrix.

---

<div class="post-metadata">

**Author:** ![obraun-sl](https://community.stereolabs.com/user_avatar/community.stereolabs.com/obraun-sl/32/17_2.png) [@obraun-sl](https://community.stereolabs.com/u/obraun-sl)\
**Post date:** [May 13, 2021, 6:13am UTC](https://community.stereolabs.com/t/how-to-get-the-extrinsic-parameters-from-a-extrinsic-parameters-matrix/242/2 "2021-05-13T06:13:40Z")

</div>

Hi,

According to your extrinsic matrix, you can convert as follow :

baseline = t1  
Ty = t2  
Tz = t3.

Then you need to convert the 3x3 rotation to 3x1 rotation vector using cv::rodrigues() function that will output (rv1,rv2,rv3). ( cv::rodrigues(Rotation, RotationVector)).  
RX = rv1  
CV = rv2  
Rz = rv3.

---

<div class="post-metadata">

**Author:** ![lks90](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/l/50afbb/32.png) [@lks90](https://community.stereolabs.com/u/lks90)\
**Post date:** [May 13, 2021, 7:37am UTC](https://community.stereolabs.com/t/how-to-get-the-extrinsic-parameters-from-a-extrinsic-parameters-matrix/242/3 "2021-05-13T07:37:53Z")

</div>

Thanks, I will check this function.
