# How to Get Intrinsics for RGB and Depth Sensors? How About Extrinsics Between the Two?

**URL:** <https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163>\
**Category:** Unity Development\
**Tags:** pixel-sensor\
**Created:** [August 6, 2025, 7:30pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163 "2025-08-06T19:30:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric\_engineer](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@eric\_engineer](https://forum.magicleap.cloud/u/eric_engineer)\
**Post date:** [August 6, 2025, 7:30pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163/1 "2025-08-06T19:30:29Z")

</div>

How can I get the camera matrix (intrinsic) for RGB and the Depth camera? And are there calibrated extrinsic, like the translation and rotation matrix between the RGB and the Depth?

I’m inching my way towards combining the two into an RGBD image, or at least an RGB and D that align with each other as well as I can get it.

Thanks!

Give us as much detail as possible regarding the issue you’re experiencing:

**Unity Editor version** : 6000  
**ML2 OS version** : 1.12  
**Unity SDK version** :2.6  
**Host OS** : (Windows/MacOS) windows, but running on the ML2

**Error messages from logs** (syntax-highlighting is supported via Markdown):

---

<div class="post-metadata">

**Author:** ![eric\_engineer](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@eric\_engineer](https://forum.magicleap.cloud/u/eric_engineer)\
**Post date:** [August 7, 2025, 6:04pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163/2 "2025-08-07T18:04:26Z")

</div>

Well I got the intrinsics. I guess only way to get extrinsics is to go on a calibration journey?

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [August 11, 2025, 5:22pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163/3 "2025-08-11T17:22:53Z")

</div>

You can get the pose of both of the sensors. But we do not provide the information that is specific between a set of sensors.

---

<div class="post-metadata">

**Author:** ![eric\_engineer](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@eric\_engineer](https://forum.magicleap.cloud/u/eric_engineer)\
**Post date:** [August 14, 2025, 3:29pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163/4 "2025-08-14T15:29:30Z")

</div>

Never met a headset that made this stuff easy 🙂 How about this question. I ended up having to use MLCamera to get my RGB8888 data, and then Pixel sensor to get my depth data. That’s finally all working. But… I have to use PixelSensorFeature.GetSensorPose(SensorId); for the pixel sensor because getting it from the frame just never works. Then in MLCVCamera I do MLCVCamera.GetFramePose(mlTime, out mlPose).IsOk.

And with the headset still, the poses are too different to be correct. Like the translation baseline is 120mm. So I’m assuming these two things do not return the same pose? Docs seem to be clear the ML camera pose is the pose of the camera relative to the world origin, but GetSensorPose just says “pose of sensor”.

What gives here?

Thank you

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [August 15, 2025, 8:11pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163/5 "2025-08-15T20:11:09Z")

</div>

You’re correct, those two APIs do not return the same reference frame by default.

MLCVCamera.GetFramePose() returns the pose in Unbounded tracking space (MLSDK default), which is anchored to the world origin defined by the system.

PixelSensorFeature.GetSensorPose() returns the pose in the tracking origin set in your XR Origin (usually Device or Floor space in Unity). This is why you see the large offset.

If you need them to align:  
1 Make sure your tracking space is set to Unbounded as mentioned in the OpenXR MLCamera doc.  
2. To query based on the frame timestamp, See this SDK modification example:

> [@Hologram Drift Issue When Tracking Object with Retroreflective Markers using Depth Camera (Raw data)](https://forum.magicleap.cloud/t/hologram-drift-issue-when-tracking-object-with-retroreflective-markers-using-depth-camera-raw-data/5618/8):
>
> Sorry to hear that you are running into this issue. The team is out of office today but you could look into making a minor change in the SDK itself and see if it resolves your issue. Possibly by modifying a function in the SDK to allow for an additional property to be passed into the Get Pose function. (Note we have not tested this workaround yet) Move the Magic Leap Unity SDK into your project’s packages directory. Make sure the Magic Leap Unity Package is imported into your project as a folde…

3. You also might want to verify the pose is not returning (0,0,0) before processing.

This way, both ML Camera and Pixel Sensor poses will report from the same origin.

---

<div class="post-metadata">

**Author:** ![eric\_engineer](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@eric\_engineer](https://forum.magicleap.cloud/u/eric_engineer)\
**Post date:** [August 26, 2025, 7:20pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163/6 "2025-08-26T19:20:33Z")

</div>

Is there a way to get transform between the two spaces? I ask because I’m capturing and saving the mesh as a ply file in Unity world space (using localToWorldMatrix). But I’m stuck with the unbounded pose from MLCamera. And I’m using MLCamera because it was the only way I found to give me RGB data instead of a jpeg stream.

For a test I used the PixelSensor pose from the depth camera and the results are so close! Just need to get the right pose for RGB 🙂

Thank you

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [August 26, 2025, 11:02pm UTC](https://forum.magicleap.cloud/t/how-to-get-intrinsics-for-rgb-and-depth-sensors-how-about-extrinsics-between-the-two/6163/7 "2025-08-26T23:02:49Z")

</div>

When you use the Unbounded Reference Space, the Pixel Sensor should provide it’s pose in the same manner.

Make sure you have the reference Space Feature enabled in the Unity Settings and that your script toggles the unbounded space before the capture begins.
