Mercurial > hg > ishara
annotate arrows/dsp/adct.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | ae596261e75f |
children |
rev | line source |
---|---|
samer@0 | 1 % adct - arrow for DCT |
samer@0 | 2 % |
samer@0 | 3 % adct :: M:natural -> arrow({[[N]]}, {[[M]]}, empty). |
samer@42 | 4 % |
samer@42 | 5 % Produces only the first M DCT coefficients |
samer@0 | 6 function o=adct(M) |
samer@42 | 7 I=1:M; |
samer@0 | 8 o=arrf(@mkdct,1,1); |
samer@0 | 9 |
samer@0 | 10 function f=mkdct(sizes_in) |
samer@0 | 11 % take DCT size from size(1) of first input |
samer@42 | 12 %W=row(dct(eye(sizes_in{1}(1))),M); |
samer@42 | 13 f=@(x)row(dct(x),I); |
samer@0 | 14 end |
samer@0 | 15 end |
samer@0 | 16 |