% vignetting border to get a feathering effect in maxnan, or the like
%
% preserves size
%
% Examples: Y = bordervignette(X);
%
%           Y = bordervignette(X,pedestal); % fade to grey
%
% Applications: making smooth image mosaics using maxnan

function Y = dummy(X,pedestal)

if nargin == 1
  pedestal = .25;  % default
  disp(sprintf('bordervignette.m: pedestal defaulting to %g',pedestal))
end%if

[M N] = size(X);

windM=(pedestal)*hanning(M) + (1-pedestal);
windN=(pedestal)*hanning(N) + (1-pedestal);
WIND=windM(:)*windN(:).';

Y = X.*WIND;

