%% chdir /mas/vision/vismod/users/steve/mannfamily
M=512;
N=768;
if ~(exist('a') & exist('b'))
  %a=loadraw('mannfamily67',M,N);  % miss hist bins from photoshop conv to grey
  %b=loadraw('mannfamily66',M,N);
  a=loadppm('/mas/disks/vision9/steve/flakes/cement/mannfamily/mannfamily67g.pgm');  % green channel only
  b=loadppm('/mas/disks/vision9/steve/flakes/cement/mannfamily/mannfamily66g.pgm');
end%if

ab=crosshist(a,b);

[M,N]=size(ab);   % M=N=256
figure
tvslog(ab,.001,'negativeimage')
set(gcf,'Name','cross histogram')
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]);ab=crosshist(a,b);
% 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])

