# Camera Data Formatting and Pixel Modification

**URL:** <https://forum.magicleap.cloud/t/camera-data-formatting-and-pixel-modification/3292>\
**Category:** Native Development\
**Tags:** depth-camera, camera\
**Created:** [March 19, 2024, 9:12pm UTC](https://forum.magicleap.cloud/t/camera-data-formatting-and-pixel-modification/3292 "2024-03-19T21:12:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben1](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@ben1](https://forum.magicleap.cloud/u/ben1)\
**Post date:** [March 19, 2024, 9:12pm UTC](https://forum.magicleap.cloud/t/camera-data-formatting-and-pixel-modification/3292/1 "2024-03-19T21:12:16Z")

</div>

**ML2 OS version** : 1.4.1  
**MLSDK version** : v1.5.0  
**Host OS** : Windows 11

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

Hi there,

I have been working through c-api samples trying to acquire raw camera data from the integrated magic leap 2 cameras. In particular, I have been looking at the camera\_preview and depth\_camera samples. I have been able to find the location of the raw data stored in memory for both the video camera and depth camera. I am considering modifying the pixel values for a given camera frame. Is there a preferred method of modifying individual pixels of an image? How is the camera data specifically formatted in memory? Any help would be appreciated.

Thanks  
-Ben

---

<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:** [March 25, 2024, 5:01pm UTC](https://forum.magicleap.cloud/t/camera-data-formatting-and-pixel-modification/3292/2 "2024-03-25T17:01:20Z")

</div>

Not sure I understand, you can get the images in RGBA or YUV format from the RGB Camera located at the center of the device. You can also capture the images in JPEG format.

The Depth camera returns a Range Depth Image in R8 format.
