Mercurial > hg > pydct
view pydct/tNxN.py @ 0:63af49cca5d2
initial import
author | pmeerw@pan |
---|---|
date | Tue, 06 May 2008 23:01:28 +0200 |
parents | |
children | 9aa2dd7d0de7 |
line wrap: on
line source
import dct, numpy def fdctNxN(b): ''' Forward 2D DCT on NxN array. ''' c = __init_dctN(b.shape[0]) return numpy.dot(c, numpy.dot(b, numpy.transpose(c))) def idctNxN(b): ''' Inverse 2D DCT on NxN array. ''' c = __init_dctN(b.shape[0]) return numpy.dot(numpy.transpose(c), numpy.dot(b, c))