Data dir:
./images/
Result dir:./out/
You can install requirement by follow this command:
pip3 install PIL numpy numba
If you have pipenv
to manage your python project environment, then you can follow this command:
pipenv install # install venv by following Pipfile.lock
pipenv shell # active your project venv.
Function name | Parameter | Introdution |
---|---|---|
dct_2d() | img: np.array, dct_img: np.array | Original 2D-DCT |
idct_2d() | dct_img: np.array, idct_img: np.array | Original 2D-IDCT |
dct_1d() | seq: np.array | 1D-DCT |
idct_1d() | seq: np.array | 1D-IDCT |
dct_fast_2d() | img: np.array | Fast 2D-DCT |
idct_fast_2d() | img: np.array | Fast 2D-IDCT |
dct_block() | img: np.array, block: (w, h) default is (8, 8) | 2D-DCT_block |
idct_block() | img: np.array, block: (w, h) default is (8, 8) | 2D-IDCT_block |