Why rectifyStereoImages gives error in Matlab2015 ?

3 次查看(过去 30 天)
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing and Computer Vision 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by