필터 지우기
필터 지우기

rectifyStereoImages output looks twisted.

조회 수: 1 (최근 30일)
SANG GYU LEE
SANG GYU LEE 2018년 8월 22일
답변: Subhash Variya 2021년 6월 27일
Hi, I have implemented rectifyStereoImages, but the result looks weird. Please look at the images attached. fig1 and 2 are the original files used. Here is my script.
left = webcam(3);
right = webcam(1);
I1 = snapshot(left);
figure(1)
imshow(I1);
I2 = snapshot(right);
figure(2)
imshow(I2);
[J1,J2]=rectifyStereoImages(I1,I2,stereoParams,'OutputView','full');
figure(3)
imshow(cat(3,J1(:,:,1),J2(:,:,2:3)),'InitialMagnification',50);

답변 (2개)

Astha Singh
Astha Singh 2018년 8월 31일
Hi Sang,
You probably need to fine-tune the 'stereoParams' that you are using.
Most likely that is what is causing the anomaly.
I tried uncalibrated rectification using the two images that you have provided and was able to produce the following rectified image -
You can try this method using the MATLAB Documentation link - Uncalibrated Stereo Image Rectification.
Hope this helps!
  댓글 수: 1
SANG GYU LEE
SANG GYU LEE 2018년 8월 31일
편집: SANG GYU LEE 2018년 8월 31일
Astha! Thank you very much for your comment! My goal is to get the disparity map and the depth (distance) from a camera to an object. I saw the instruction about uncalibrated rectification for stereo vision, but I am not quite sure how https://www.mathworks.com/help/vision/examples/uncalibrated-stereo-image-rectification.html and https://www.mathworks.com/help/vision/examples/depth-estimation-from-stereo-video.html are used together.
So assuming that I have the raw images taken from two cameras, should I do the uncalibrated rectification first -> crop the overlapping parts from the two images -> run stereoCameraCalibrator? If so, doesn't uncalibrated rectification affect the depth value?

댓글을 달려면 로그인하십시오.


Subhash Variya
Subhash Variya 2021년 6월 27일
Hello SANG, i have the same problem. do you have the solution now?

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by