diff --git a/datasets/raise/fft/fourier_to_image.py b/datasets/raise/fft/fourier_to_image.py index d1ba7d3..4688398 100644 --- a/datasets/raise/fft/fourier_to_image.py +++ b/datasets/raise/fft/fourier_to_image.py @@ -1,6 +1,7 @@ from PIL import Image import numpy as np from scipy import fftpack +import matplotlib.pyplot as plt fft = np.array(Image.open('fft.png').convert('L'))# / 255 print(fft) diff --git a/datasets/raise/fft/image_to_fourier.py b/datasets/raise/fft/image_to_fourier.py index 8bf2e1f..c2c6808 100644 --- a/datasets/raise/fft/image_to_fourier.py +++ b/datasets/raise/fft/image_to_fourier.py @@ -1,6 +1,7 @@ from PIL import Image import numpy as np from scipy import fftpack +import matplotlib.pyplot as plt image = np.array(Image.open('image_4.png').convert('L'))# / 255 print(image) @@ -13,10 +14,6 @@ height, width = fft1.shape for x in range(width): fft1[height // 2, x] = np.median(fft1[:, x]) - - - - # save the image # np.log10 plt.imshow(np.log10(abs(fft1))) diff --git a/datasets/raise/utils.py b/datasets/raise/utils.py index d92bf1b..a89eba1 100644 --- a/datasets/raise/utils.py +++ b/datasets/raise/utils.py @@ -33,7 +33,7 @@ class Denoiser(Enum): def __str__(self): return self.name.lower() -class Distance(Enum) +class Distance(Enum): ROOT_MEAN_SQUARE = auto() PEARSON_CORRELATION = auto()