This message was posted on behalf of Intel Corporation
Thanks for reaching out!
Personally, I have not done a conversion like that, however, I have been investigating and I found information that you may find useful. First, I’d recommend you to watch this video: https://www.youtube.com/watch?v=wIkIdjN6Oyw, there you’ll find an explanation of how to convert RealSense images to OpenCV images. In addition to that, in this other site: Realsense ImageData to OpenCV Mat, you can find a snippet code to convert a color image to OpenCV image. I believe you can use that information as a reference to reach what you need.
I hope you find this information useful.