yjh0410 / DiscreteCosineTransformation

A numpy & pytorch deployment of 2D DiscreteCosineTransformation (DCT)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discrete Cosine Transformation

We release the codes of 2D DCT with Numpy and PyTorch.

Our deployment can process a batch of square images with [B, N, N] shape, rather than process image one by one.

Examples

  • Original mask images:

image image

  • transformed by cv2.dct:

image image

  • transformed by our Numpy deployment:

image image

  • transformed by our PyTorch deployment:

image image

  • Recover by cv2.idct:

image image

  • Recover by our Numpy deployment:

image image

  • Recover by our PyTorch deployment:

image image

About

A numpy & pytorch deployment of 2D DiscreteCosineTransformation (DCT)


Languages

Language:Python 100.0%