% for POSITIVE PRINT OF IMAGE % 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 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); Y = [rowpad;X;rowpad]; colpad = zeros(M+2*thicknessrow,thicknesscol); Y = [colpad Y colpad];