# Please help us understand the Internal/External Camera Parameters export

**URL:** <https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503>\
**Category:** Asset Creation\
**Tags:** realityscan\
**Created:** [May 5, 2022, 8:40am UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503 "2022-05-05T08:40:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonymous\_f84dbdfd17](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_f84dbdfd17](https://forums.unrealengine.com/u/Anonymous_f84dbdfd17)\
**Post date:** [May 5, 2022, 8:40am UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/1 "2022-05-05T08:40:06Z")

</div>

We are attempting to visualise the registered camera frustums computed in RC in another application. We are having trouble interpreting the rotation information included within the \_ **Internal/External Camera Parameters** \_ export (example below).&nbsp;

Our questions:

1. 

How is the heading/pitch/roll defined? We have tried to guess our way without success. Are they defined in world coordinate or image’s local coordinate? In Cesium, the Heading is the rotation about the negative z axis, Pitch is the rotation about the negative y axis, Roll is the rotation about the positive x axis. Is this the same in the \_ **Internal/External Camera Parameters** \_ export? What is the default direction(heading/pitch/roll = 0)?  
2.  
If defined in a world coordinate, x-\>left to right, y-\>backward to frontward, z-\>down to up?  
3.

If defined in a local coordinate, are they using the EastNorthUp coordinate?

1. In terms of transforming the heading/pitch/roll into a matrix, are there any other transform we need to do in order to compare to the algorithm in [this](http://planning.cs.uiuc.edu/node102.html) article?

Any documentation would be much appreciated.

```
#name,x,y,alt,heading,pitch,roll,f,px,py,k1,k2,k3,k4,t1,t2
DJI_20220221103904_0022.JPG,-5041986.508798251,2573482.020935406,-2929105.142556032,-148.4200306549068,10.20497551291449,118.7049066788339,34.98005589922394,2.08370424314095e-003,8.261463622613804e-003,-4.472883919490048e-002,4.299250744468713e-002,-0.1293881883164149,0,0,0 DJI_20220221103956_0044.JPG,-5041974.610274723,2573499.802754866,-2929110.290966901,10.38505537635033,-9.7283810446774,-115.7011765380064,35.00697049557222,-2.759873217514973e-003,1.409853041227379e-002,-4.302171265375437e-002,2.572761946144416e-002,-9.709280172749243e-002,0,0,0

```

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [May 5, 2022, 9:52am UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/2 "2022-05-05T09:52:37Z")

</div>

Hi [Josh33357](https://forums.unrealengine.com/hc/en-us/profiles/381341774580-Josh33357),

regarding to question 1, it is considered in the camera coordinate system, where X is pointing to the plane nose (or north), Y is pointing to right wing and Z is pointing down. Then heading/yaw is around Z axis, pitch is around Y axis and roll is around X axis.

Default direction looks like this (in a local world coordinate system, where Y is pointing to north):

Yaw = 0, image is oriented to Y (upper side of image is oriented that way)  
Pitch = 0, image is looking down  
Roll = 0, image is parallel with X axis

Regarding to question 2 and 3, the YPR are considered in camera coordinate system, as I mentioned in previous answer (X to north, Y to east and Z down).

Regarding to question 4, this is how you can compute the rotation matrix in JavaScript:

&nbsp;&nbsp;&nbsp; EulerRotation: function (y, p, r) {

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var cx = Math.cos(LA.Deg2Rad \* r);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var cy = Math.cos(LA.Deg2Rad \* p);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var cz = Math.cos(LA.Deg2Rad \* y);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var sx = Math.sin(LA.Deg2Rad \* r);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var sy = Math.sin(LA.Deg2Rad \* p);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var sz = Math.sin(LA.Deg2Rad \* y);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return [cx \* cz + sx \* sy \* sz, -cx \* sz + cz \* sx \* sy, -cy \* sx,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -cy \* sz, -cy \* cz, -sy,

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cx \* sy \* sz - cz \* sx, cx \* cz \* sy + sx \* sz, -cx \* cy];

&nbsp;&nbsp;&nbsp; },

&nbsp;

---

<div class="post-metadata">

**Author:** ![Anonymous\_f84dbdfd17](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_f84dbdfd17](https://forums.unrealengine.com/u/Anonymous_f84dbdfd17)\
**Post date:** [May 5, 2022, 11:44pm UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/3 "2022-05-05T23:44:54Z")

</div>

374823146340 perfect, thanks! We are now up and running. Appreciate your assistance.

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [May 6, 2022, 6:57am UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/4 "2022-05-06T06:57:27Z")

</div>

You’re welcome!

---

<div class="post-metadata">

**Author:** ![Anonymous\_35e7fba835](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_35e7fba835](https://forums.unrealengine.com/u/Anonymous_35e7fba835)\
**Post date:** [June 30, 2022, 9:27am UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/5 "2022-06-30T09:27:41Z")

</div>

If possible could you have a look at this question ? [https://support.capturingreality.com/hc/en-us/community/posts/5215775994780-Camera-Coordinate-System-Explanation](https://forums.unrealengine.com/hc/en-us/community/posts/5215775994780-Camera-Coordinate-System-Explanation)

Any help would be great! Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Anonymous\_35e7fba835](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_35e7fba835](https://forums.unrealengine.com/u/Anonymous_35e7fba835)\
**Post date:** [June 30, 2022, 12:29pm UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/6 "2022-06-30T12:29:32Z")

</div>

@&nbsp;which software where you using ?

---

<div class="post-metadata">

**Author:** ![brizzle1834](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brizzle1834](https://forums.unrealengine.com/u/brizzle1834)\
**Post date:** [October 14, 2024, 8:28pm UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/7 "2024-10-14T20:28:29Z")

</div>

@OndrejTrhan We are looking to convert the registered cameras from a drone in RC to a third party like Cesium or Three js. In your [answer](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/2), are you suggesting that the rotation matrix can directly be applied to a camera in cesium?

---

<div class="post-metadata">

**Author:** ![OndrejTrhan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ondrejtrhan/32/906565_2.png) [@OndrejTrhan](https://forums.unrealengine.com/u/OndrejTrhan)\
**Post date:** [October 15, 2024, 7:08am UTC](https://forums.unrealengine.com/t/please-help-us-understand-the-internal-external-camera-parameters-export/712503/8 "2024-10-15T07:08:07Z")

</div>

Hi @brizzle1834  
In that answer is described the process to compute the rotation matrix used in RealityCapture.  
I am not sure about the axis orientation in Cesium, but RealityCapture have it as Y to North, X to East and Z to Up. So, if the systems are the same, the rotation matrix should work also in Cesium.
