% 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/ L3 = [1 2 1]; E3 = [-1 0 1]; S3 = [-1 2 -1]; %L5 = [1 2 3 2 1]; %can be improved %L7 = [1 2 3 4 3 2 1]; % can be improved gMask = gaussMask(4,1.4); %Navatia Babu filters oriented at six angles (0,30,60,90,120,150) NB1 = [ -100, -100, 0, 100, 100; ... -100, -100, 0, 100, 100; ... -100, -100, 0, 100, 100; ... -100, -100, 0, 100, 100; ... -100, -100, 0, 100, 100]; NB2 = [ -100, 32, 100, 100, 100; ... -100,-78, 92, 100, 100; ... -100,-100, 0, 100, 100; ... -100,-100,-92, 78, 100; ... -100,-100,-100,-32, 100]; NB3 = -NB2'; NB4 = -NB1'; NB5 = -NB3(end:-1:1,:); NB6 = NB5'; M_LL = L3'*L3; M_LE = L3'*E3; backgroundGray = zeros(9,9); backgroundGray(3:7,3:7) = NB1; subplot(1,15,10); imagesc(backgroundGray); colormap gray; axis off; axis square; subplot(1,15,11); imagesc(backgroundGray); colormap gray; axis off; axis square;