processing.compression.get_compression_level
(img, img_file)Given an image and its file name, return the compression level
:param img: the image object :param img_file: The name of the image file :return: The quality of the image.
processing.compression.get_psnr
(original, compressed)Compute the PSNR of the compressed image and the original image
:param original: The original image :param compressed: The compressed image :return: the PSNR value for the two images.
processing.compression.get_ssim
(original, compressed)Compute the SSIM of the compressed image and the original image
:param original: The original image :param compressed: The compressed image :return: the SSIM value for the two images.
processing.compression.get_mse
(original, compressed)Compute the MSE of the compressed image and the original image
:param original: The original image :param compressed: The compressed image :return: the MSE value for the two images.
processing.compression.format_to_grid_with_commas
(matrix)Given a matrix, format it to a string with commas between the numbers
:param matrix: the matrix to be formatted :return: a string of the matrix with commas and spaces.
processing.compression.dec_dct
(matrix)Convert a matrix of integers to floats, perform the DCT on the matrix, then convert the result back to integers
:param matrix: The matrix to be converted :return: a matrix of the same size as the input matrix.
processing.compression.dec_inverse_dct
(matrix)The function dec_inverse_dct() is the inverse of the function dec_dct(). It takes a string
representation of a matrix as input and returns a matrix representation of the inverse DCT
:param matrix: The matrix to be processed :return: the inverse DCT of the input matrix.
processing.compression.up_sampling
(array)Given a 2D array, return a new 2D array with the array values repeated twice along the first axis (axis=0) and twice along the second axis (axis=1)
:param array: the array to be repeated :return: The upSampled image.
processing.compression.tile
(img, d, img_name)This function is used to split the image into tiles and save them in a folder.
:param img: the image to be compressed :param d: The size of the tiles :param img_name: the name of the image to be processed
processing.compression.write_bloc_in_cell
(img, img2)This procedure is used to set DCT data in cells and save IDCT Tiles in folder.
:param img: :param img2:
Creado: 12 de octubre de 2022