Effacer les filtres
Effacer les filtres

How can I get Rectification Map Values after Stereo Camera Calibration ?

4 vues (au cours des 30 derniers jours)
Soumya Dubey
Soumya Dubey le 8 Mai 2023
Hi, Is there any way i can access the values of the Rectification maps after stereo calibration of a camera ?
I know the values of the rectification transforms (R1 and R2) from the following piece of code :-
load ("CamCalib.mat")
LeftImage = imread("Left Frame.png");
RightImage = imread("Right Frame.png");
[~, ~, ~, CamLeft, CamRight, R1, R2] = rectifyStereoImages(LeftImage, RightImage, CamCalib);
[RecLeftImage, RecRightImage, Q] = rectifyStereoImages(LeftImage, RightImage, CamCalib);
However when i am using these values R1 and R2 in the OpenCV function initUndistortRectifyMap i am not getting the same rectified frames as MATLAB.
So i want to see the difference between the Rectification Maps created from OpenCV and MATLAB, but i was unable to find any way to see the values of the Rectification Maps for both the frames.
Please help me in understanding this issue. Any help would be highly appreciated. Thanks.

Réponses (1)

Sarthak
Sarthak le 16 Mai 2023
Hi Soumya,
You can get the Rectification Map by finding the (x,y) bounds and Homography matrices from ComputeRectificatoinParams.m and then using Homography and undistortion equations and then interp2 which will give accurate rectifications.
Attaching a documentation link and an answer for your reference

Catégories

En savoir plus sur MATLAB Support Package for USB Webcams dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by