% for NEGATIVE PRINT OF IMAGE; often saves toner. Steve Mann; 1990OCT22
%
% places COLs only of GRID (crosshair up and down at origin only) into image
%
% scales a real matrix to [0,255] range, takes 255-image,
% and places a border of all black (zeros) around the outside.
% the dimension is increased by 2 (or more) each way
%
% Y = border(X); % black border all around
% % so if image is mostly white, you can see its region of support
%
% Y = border(X,2); % double thickness border all around
%
% Y = border(X,3,4); % 3 rows of zeros, 4 cols of zeros;
% % looks nice on a 3by4 image (eg. TV screen size)
function Y = dummy(X,thicknessrow,thicknesscol)
if nargin == 2
thicknesscol = thicknessrow;
end%if
if nargin == 1
thicknesscol = 1;
thicknessrow = 1;
end%if
[M N] = size(X);
X = scaler2(X);
% CROSSHAIRS at origin
X(:,N/2) = 255*ones(M,1); % white now, will be black when neg. taken
rowpad = zeros(thicknessrow,N);
colpad = zeros(M+2*thicknessrow,thicknesscol);
Y = [colpad [rowpad;255-X;rowpad] colpad];
dis = sprintf(' to %g by %g, took NEGATIVE and SCALED to [0,255] range',M+2*thicknessrow,N+2*thicknesscol);
disp([sprintf('zero padded %g by %g',M,N) dis])