matlab2016a自带的disparity函数

I1 = imread('scene_left.png');
I2 = imread('scene_right.png');


figure
imshow(stereoAnaglyph(I1,I2));
title('Red-cyan composite view of the stereo images');


disparityRange = [-6 10];
disparityMap = disparity(rgb2gray(I1),rgb2gray(I2),'BlockSize',15,'DisparityRange',disparityRange);


figure
imshow(disparityMap, disparityRange);
title('Disparity Map');

colormap jet

colorbar

matlab2016a自带的disparity函数_第1张图片

disparityRange = [-6 10];

matlab2016a自带的disparity函数_第2张图片

disparityRange = [0 16];

显然,默认disparityRange =

你可能感兴趣的:(科研理论)