% for NEGATIVE PRINT OF IMAGE; often saves toner. Steve Mann; 1990OCT22
%
% 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);
rowpad = zeros(thicknessrow,N);
colpad = zeros(M+2*thicknessrow,thicknesscol);
Y = [colpad [rowpad;255-scaler2(X);rowpad] colpad];
dis = sprintf(' to %gby%g, took NEGATIVE and SCALED to [0,255] range',M+2*thicknessrow,N+2*thicknesscol);
disp([sprintf('zero padded %gby%g',M,N) dis])