How to Upscale Depth Image from SceneDepth to Match CapturedFrame Resolution

I'm working on a project that involves depth sensing using Apple's ARKit, and I've run into a bit of a challenge. I hope someone can provide some guidance.

I'm currently capturing depth information using ARKit's SceneDepth feature, and I also have the color image captured with CapturedFrame. However, the resolutions of these two sources are different. The SceneDepth image has a lower resolution compared to the CapturedFrame image.

Now, I need to align these two images and upscale the SceneDepth image to match the resolution of the CapturedFrame image. Essentially, I want to ensure that the depth information corresponds precisely to the color image.

Could someone please walk me through the steps or provide some code snippets on how to achieve this upscaling and alignment?

How to Upscale Depth Image from SceneDepth to Match CapturedFrame Resolution
 
 
Q