function viewCorrelatedDepthmap % Version 0.1, Feb 2006. % This code is copyrighted by Ashutosh Saxena, Stanford University % It is available for non-commercial use only. For commericial use, please % contact the authors. % Any publication or report resulting from Use of this code, should cite: % Learning Depth from Single Monocular Images, Ashutosh Saxena, Sung H. Chung, Andrew Y. Ng, NIPS 2005. % 3-D Depth Reconstruction from a Single Still Image, Ashutosh Saxena, Sung H. Chung, Andrew Y. Ng, To appear in IJCV 2007. % For more info and dataset, visit: http://ai.stanford.edu/~asaxena/learningdepth/ % For a better version of the algorithm, also visit: % http://ai.stanford.edu/~asaxena/reconstruction3d/ global imageDirectory depthMapDirectory configurationFile; dirList = dir([imageDirectory 'img-*.jpg']); for n=1:length(dirList) close all; imageFilename = dirList(n).name; inputImage = imread([imageDirectory imageFilename]); inputImage = permute(inputImage, [2 1 3]); inputImage = inputImage(:,end:-1:1,:); load( [depthMapDirectory 'depth' imageFilename(4:(end-4)) '.mat']); imagesc( inputImage ); title(imageFilename); axis square; figure, imagesc( log(depthMap) ); title(imageFilename); axis square; end