我想在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
非常感谢您的帮助。谢谢。