Why rectifyStereoImages gives error in Matlab2015 ?

조회 수: 1 (최근 30일)
Shida
Shida 2016년 2월 3일
댓글: Shida 2016년 2월 3일
I was wondering if rectifyStereoImages function has changed between Matlab 2014 and 2015. I am using Matlab's own instructions for a stereo setup. Calibration results are OK, but since the disparity in my images is large I'm using the following argument to get the entire image: 'OutputView','full' as below:
[J1, J2] = rectifyStereoImages(I1, I2, stereoParams,'OutputView','full');
I have to use this otherwise most of my image is cropped. But now I had to change to Matlab 2015. The reason is that I was getting error when using pcshow in Matlab 2014 and I realized it was only introduced in Matlab 2015. I've installed Matlab 2015 and everything works fine but rectifyStereoImages gives an error if and only if I use : 'OutputView','full'. The same arguments works perfectly fine in Matlab 2014. Here's the exact error I get when using 'full' in Matlab 2015:
Error using vision.internal.calibration.CameraParametersImpl>getFullBounds (line 917)
Assertion failed.
Error in vision.internal.calibration.CameraParametersImpl/computeUndistortBounds (line 782)
[xBounds, yBounds] = getFullBounds(undistortedMask, ...
Error in vision.internal.calibration.StereoParametersImpl/computeOutputBounds (line 372)
computeUndistortBounds(this.CameraParameters1, ...
Error in vision.internal.calibration.StereoParametersImpl/computeRectificationParameters (line 271)
[xBounds, yBounds] = computeOutputBounds(this, imageSize, ...
Error in vision.internal.calibration.StereoParametersImpl/rectifyStereoImagesImpl (line 191)
this.computeRectificationParameters(imageSize, outputView);
Error in rectifyStereoImages (line 119)
[rectifiedImage1, rectifiedImage2] = rectifyStereoImagesImpl(stereoParams, ...
I see that if I use 'OutputView','valid' in Matlab 2015 it works, but most of my image is cropped. If I don't use the 'OutputView' in Matlab 2015, I get very bad results for disparity for a stereo pair which Matlab 2014 give good results.
I appreciate if anyone can help.

채택된 답변

Dima Lisin
Dima Lisin 2016년 2월 3일
편집: Dima Lisin 2016년 2월 3일
This is a known bug, which occurs for high-resolution images. Please see the external bug report 1280905 for the patch.
  댓글 수: 2
Shida
Shida 2016년 2월 3일
Thanks Dima. I had no idea this is a known bug. It works perfectly fine in Matlab 2014. I had to use Matlab 2014 and then save and import the results into Matlab 2015 ! Now I will follow the instructions on the page you've sent me, and I hope it gets fixed.
Best wishes.
Shida
Shida 2016년 2월 3일
OK! Yes it works. Thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Display Point Clouds에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by