Mercurial > hg > ishara
view arrows/@abuffer/construct.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
function u=construct(s,sizes_in) u=construct(s.base,sizes_in); u.sizes_out = {[u.sizes_out{1}(1),s.width]}; subproc = u.process; width = s.width; if nargin(s.base)==0 && nargout(s.base)==1 u.process = @proc01; elseif nargin(s.base)==1 && nargout(s.base)==0 u.process = @proc10; else u.process = @proc11; end function proc10(X) for i=1:width, subproc(X(:,i)); end end function Y=proc11(X) y=subproc(X(:,1)); Y=repmat(y,1,width); for i=2:width Y(:,i)=subproc(X(:,i)); end end function Y=proc01 y=subproc(); Y=repmat(y,1,width); for i=2:width Y(:,i)=subproc(); end end end