This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| import numpy as np | |
| #@title Direct DCT1D | |
| def dct1d(x, array_length=-1): | |
| if array_length == -1: | |
| length = len(x) | |
| else: | |
| length = array_length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from matplotlib import image | |
| from matplotlib import pyplot | |
| import numpy as np | |
| import cv2 | |
| from google.colab.patches import cv2_imshow | |
| def compare(image1, image2): | |
| if(image1.shape != image2.shape): |