I am calculating DCT of grayscale image of size 32x32
- Using OpenCV
def _dct(image):
result = cv2.dct(np.float32(image)/255.0)
return (result * 255.0)
- Using Scipy.fftpack.dctn
dctn(image)
Output of both functions first using cv2.dct() then using scipy.fftpack.dctn()