Hi everyone, for my project, I'm working with the Kinect v2 and I have to map the depth information onto the RGB images to process them: in particular, I need to know which pixels in the RGB images are in a certain range of distance (depth) along the Z axis; I'm acquiring all the data with a C# program and saving them as images. I had a look on the internet and I found some equations to map depth and RGB info here. I am actually able to get the intrinsic parameters for the single camera calibration using a checkerboard recorded from both the RGB camera (1920x1080) and the IR sensor (512x424) and processing them with MatLab Camera Calibrator app, but I'm stuck doing the stereo calibration (to find the rotation and translation matrices), because MatLab Stereo Camera Calibrator doesn't accept pair of images with different resolution. I've also tried some other method with no results; It would be great if anyone could help me figuring out what I have to do in order to solve my problem. Thanks very much!
Kshitij Singh answered .
2025-11-20
[pointsRGB, boardSizeRGB, imagesRGBused] =detectCheckerboardPoints(imagesRGB);
[pointsIR, boardSizeIR, imagesIRused] = detectCheckerboardPoints(imagesIR);
imagePoints = cat(4, poitnsRGB, pointsIR);
d) Now the word points: where squaresize is the width of each of the squares in your calibration target (unit is mm).
worldPoints = generateCheckerboardPoints(boardSizeRGB, squaresize);
e) Calibration:
[stereoParams,pairsUsed,estimationErrors] = estimateCameraParameters(imagePoints,...
worldPoints,'EstimateSkew', false, 'EstimateTangentialDistortion', false, ...
'NumRadialDistortionCoefficients', 2, 'WorldUnits', 'mm');
figure; showReprojectionErrors(stereoParams);
figure; showExtrinsics(stereoParams);