Created
August 15, 2016 15:59
-
-
Save amiltonwong/8eb510b1e1ea39f3871c5332a24224cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
disparityMap = disparity(rgb2gray(I1),rgb2gray(I2),'BlockSize',15); | |
figure | |
% imshow(disparityMap, disparityRange); | |
imshow(disparityMap,[0, max(max(disparityMap))]); | |
title('Disparity Map'); | |
colormap jet | |
colorbar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment