0001
0002
0003
0004
0005
0006 function [Image_l,Image_r] = h_init(Image_name_l,Image_name_r)
0007
0008 global tau
0009 global sigma
0010 global width
0011 global sigma_n
0012 global coordinate_sigma_x
0013 global coordinate_name
0014
0015 close all
0016
0017
0018 tau = 0.7;
0019 sigma = 3;
0020 width = 3*sigma;
0021 sigma_n = 1;
0022
0023 maxI = 640;
0024
0025 Image_l = imread(Image_name_l);
0026 Image_r = imread(Image_name_r);
0027
0028 [Nl,Ml,~] = size(Image_l);
0029 factor = min(maxI/Nl,maxI/Ml);
0030 Image_l = imresize(Image_l,factor);
0031
0032 [Nr,Mr,~] = size(Image_r);
0033 factor = min(maxI/Nr,maxI/Mr);
0034 Image_r = imresize(Image_r,factor);
0035
0036 coordinate_name = Image_name_l(1:end-4);
0037 coordinate_sigma_x = 0.5;