Python-对图像应用离散余弦变换

问题描述 投票:0回答:1

我想在Python中将离散余弦变换应用于我的图像。我该怎么办?网络上似乎没有足够的文档。下面是我的初始代码:

import os.path
from PIL import Image

if __name__ == '__main__':
    image_counter = 1  
while True:      
    if not os.path.isfile('noise_images/' + str (image_counter) + '.png'):
        break
    print(image_counter)
    noise_image_path = 'noise_images/' + str(image_counter) + '.png'
    noise_image = Image.open(noise_image_path)  
    # Apply DCT to an image.

    image_counter = image_counter + 1

非常感谢您的帮助。谢谢。

python image-processing signal-processing dft dct
1个回答
1
投票

看看这个scipy.fftpack.dct

© www.soinside.com 2019 - 2024. All rights reserved.