![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1424763/image.png)
Image lengthening of 'rectifyStereoImages' function application results
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
JONGHAK LEE
il 3 Lug 2023
Commentato: Song-Hyun Ji
il 7 Lug 2023
Hi. I apply 'rectifyStereoImages' function for rectify stereo image. But results are littlebit weird.
[J1, J2] = rectifyStereoImages(I1, I2, stereoParams, 'OutputView', 'full');
I ran just this code.
I1, I2`s size : 2592x1944, but J1, J2`s size 8704x2378. It`s too long and there is no effect changing the option 'OutputView', 'full' → 'vaild' or reverse.
My stereo camera system is each camera tilts 20 degrees, -20 degrees towards the center (the optical axis draws a V shape), is it common for the output image to be longer when this function is applied?
(first row : input image, second row : output image)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1424738/image.png)
0 Commenti
Risposta accettata
Song-Hyun Ji
il 3 Lug 2023
Modificato: Song-Hyun Ji
il 3 Lug 2023
I am not sure what is your 'steroParams' but they would affect the result. Here is my test code.
ld = load('wideBaselineStereo');
leftImages = imageDatastore(fullfile(toolboxdir('vision'), 'visiondata', ...
'calibration', 'wideBaseline', 'left'));
rightImages = imageDatastore(fullfile(toolboxdir('vision'), 'visiondata', ...
'calibration', 'wideBaseline', 'right'));
[imagePoints, boardSize] = detectCheckerboardPoints(leftImages.Files, rightImages.Files);
squareSizeInMillimeters = 29;
worldPoints = generateCheckerboardPoints(boardSize, squareSizeInMillimeters);
stereoParams = estimateStereoBaseline(imagePoints, worldPoints, ...
ld.intrinsics1, ld.intrinsics2);
figure; showReprojectionErrors(stereoParams)
I1 = readimage(leftImages, 1);
I2 = readimage(rightImages, 1);
[J1,J2] = rectifyStereoImages(I1,I2,stereoParams,'OutputView','full');
imshow(J1);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1424763/image.png)
6 Commenti
Song-Hyun Ji
il 7 Lug 2023
It is necessary to rectify the input images I1 and I2. Rectification ensures that corresponding points in the stereo pair image are aligned along the same rows. To rectify the input stereo pair image, you can utilize the rectifyStereoImages function. It is important to note that the reference image must remain consistent for both rectification and disparity map computation.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!