Camera Data Formatting and Pixel Modification

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.


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.