% for POSITIVE PRINT OF IMAGE steve mann 1990oct22
%
% scales a real matrix to [0,255] range,
% 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;scaler2(X);rowpad] colpad];
dis = sprintf(' to %g by %g and scaled to [0,255] range',M+2*thicknessrow,N+2*thicknesscol);
disp([sprintf('zero padded %g by %g',M,N) dis])