I wanted to rectify a stereo image pair coming from two different modalities (visual and thermal). I calibrated both cameras using
[cameraParams,imagesUsed,estimationErrors] = estimateCameraParameters(imagePoints,worldPoints);
giving me a stereoParameter object, since imagePoints contains matching checkerboard points for both modalities.
To rectify, I used the following call:
[J1,J2] = rectifyStereoImages(I1,I2, cameraParamsStereo);
where I1
is a visual image and I2
a thermal one. Unfortunately, that gives me the error:
Error using rectifyStereoImages>parseInputs (line 106) Inputs must be of the same size and data types.
Error in rectifyStereoImages (line 96) [I1, I2, interp, outputView, fillValues] = parseInputs(...
The resolutions of both images are quite different (2048x1088 for visual, 384x288 for thermal). From my undertanding however, rectification in principle should still work, since it is done similarly in this paper. Honestly however, I am not sure how...
Question: Is there a way in MATLAB to rectify images of different sizes? If not, is there an algorithm to do so that can be easily implemented?