Home > Matching_SYM_LSM > src > 2D_LSM_62 > 2D_LSM_62_sym_Functions > fill_left_right_images_0.m

fill_left_right_images_0

PURPOSE ^

% fill initial pair of images left and right

SYNOPSIS ^

function [im,weite,b] = fill_left_right_images_0(g,h,max_iter)

DESCRIPTION ^

% fill initial pair of images left and right

 wf 7/2020

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [im,weite,b] = fill_left_right_images_0(g,h,max_iter)
0002 %% fill initial pair of images left and right
0003 %
0004 % wf 7/2020
0005 
0006 %size of images, may be different
0007 [Mg,~]=size(g);
0008 [Mh,~]=size(h);
0009 % half size
0010 Mhg=(Mg-1)/2;
0011 Mhh=(Mh-1)/2;
0012 % maximum
0013 M = max(Mhg,Mhh);
0014 % boundary
0015 b=5;
0016 weite = max(Mg,Mh);
0017 wh = (weite+1)/2;
0018 
0019 % white background
0020 im=ones(3*b+2*weite,3*b+(max_iter+1)*weite);
0021 
0022 % given image windows
0023 im(b+    wh-Mhg:  b+    wh+Mhg, b+wh-Mhg:b+wh+Mhg) = g/256;
0024 im(2*b+(weite+wh)-Mhh:2*b+(weite+wh)+Mhh,b+wh-Mhh:b+wh+Mhh) = h/256;
0025 
0026 
0027 end
0028

Generated on Sun 19-Jul-2020 23:00:25 by m2html © 2005