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 件)

Community Treasure Hunt

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

Start Hunting!

Translated by