hosea1008
11/6/2018 - 1:21 PM

SciPy或Tensorflow 1维dct计算2维dct

def dct_2d(image):
  return dct(dct(image.T, norm='ortho').T, norm='ortho')


def idct_wd(coefficient):
  return idct(idct(coefficient.T, norm='ortho').T, norm='ortho')