problems with syncing views

hi all,

currently i’m playing arround with the viewer app to get more educated in depth with all the Sensor stuff and the STCaptureSession. But i stuck in the current situation:

i want to overlay the colorFrame and the depthFrame. normalFrame i deactivated. I gave them the same size, but when i start the app, i have a fullscreen streaming of the color camera of the IPad and depth streaming from the sensor. Unfortunately they don’t match. I assume this is the Calibration difference between the devices. but i have no idea where to fix this.

Anybody some experience with that?

Here is the method i play arround with (Viewer App)

// Create the subview here to get the correctly size/rotation view bounds
-(void)viewDidLayoutSubviews
{
    
    CGRect colorFrame = self.view.frame;
    //colorFrame.size.height /= 2;
    
    CGRect depthFrame = self.view.frame;
   //depthFrame.size.height /= 2;
//    depthFrame.origin.y = self.view.frame.size.height/2;
    //depthFrame.origin.x = 0.25;
//    depthFrame.origin.x = -self.view.frame.size.width * 0.25;
    
//    CGRect normalsFrame = self.view.frame;
//    normalsFrame.size.height /= 2;
//    normalsFrame.origin.y = self.view.frame.size.height/2;
//    normalsFrame.origin.x = 1;
//    normalsFrame.origin.x = self.view.frame.size.width * 0.25;
    

    
    _coloredDepthBuffer = NULL;
    //_normalsBuffer = NULL;
    _colorImageBuffer = NULL;
    
    _colorImageView = [[UIImageView alloc] initWithFrame:colorFrame];
     _colorImageView.contentMode = UIViewContentModeScaleAspectFit;
     [self.view addSubview:_colorImageView];
    
    _depthImageView = [[UIImageView alloc] initWithFrame:depthFrame];
    _depthImageView.contentMode = UIViewContentModeScaleAspectFit;
    _depthImageView.alpha = 0.5;
    [self.view addSubview:_depthImageView];
    
//    _normalsImageView = [[UIImageView alloc] initWithFrame:normalsFrame];
//    _normalsImageView.contentMode = UIViewContentModeScaleAspectFit;
//    [self.view addSubview:_normalsImageView];
//    _normalsImageView.alpha = 0.5;
 
}

Greetings Thorsten