%% chdir /mas/vision/vismod/users/steve/mannfamily
M=512;
N=768;
if ~(exist('a') & exist('b'))
  a=loadraw('mannfamily67',M,N);
  b=loadraw('mannfamily66',M,N);
end%if

p=path;
if isempty(findstr(p,'mallat2'))
  path(p,'/mas/disks/vision9/steve/mallat/mallat2')
end%if

a_und=undsamavg(a);   % good size for 4 inch column width; 85dpi screen
b_und=undsamavg(b);

[M,N]=size(a_und);
figure
tvs(sqrt(a_und))
set(gcf,'Name','Image a')
axis('off')
hlef=line([1,1],[1,M]);
hbot=line([1,N],[M,M]);
hrig=line([N,N],[M,1]);
htop=line([N,1],[1,1]);
% set border to white; will print as black
set(hlef,'color',[1 1 1])
set(hbot,'color',[1 1 1])
set(hrig,'color',[1 1 1])
set(htop,'color',[1 1 1])

figure
tvs(sqrt(b_und))
set(gcf,'Name','Image b')
axis('off')
hlef=line([1,1],[1,M]);
hbot=line([1,N],[M,M]);
hrig=line([N,N],[M,1]);
htop=line([N,1],[1,1]);
% set border to white; will print as black
set(hlef,'color',[1 1 1])
set(hbot,'color',[1 1 1])
set(hrig,'color',[1 1 1])
set(htop,'color',[1 1 1])

