Image Compression Venkatesh
Image Compression Venkatesh
DATE :
IMAGE COMPRESSION
AIM:
To compress the given medical image and calculate the compression ratio.
OBJECTIVES:
• To compress the given medical image using dct2 function for different
compression ratios
• To calculate the compression ratio for each compression level
THEORY:
Image compression methods are used to reduce the amount of data required to
represent a digital image.The basis of the reduction process is the removal of
redundant data.
Coding redundancy: If the gray levels of an image are coded in a way that uses
more code symbols than absolutely necessary to represent each gray level, that is, the
code fails to minimize, the resulting image is said to contain coding redundancy.
clc;
clear all;
close all;
compressed_size2 = nnz(dct_img2);
compression_ratio2 = original_size / compressed_size2;
compressed_size3 = nnz(dct_img3);
compression_ratio3 = original_size / compressed_size3;
Thus, Image compression is applied to the medical image and output is obtained.