Question
Please help me write a matlab code to compress the image using the global DCT method to select the small magnitude coefficients and set them
Please help me write a matlab code to compress the image using the global DCT method to select the small magnitude coefficients and set them to zeros.
Also apply the following nose to the image.
im1=imnoise(im,gaussian,0,0.09);
im2=imnoise(im,salt & pepper,0.25);
Im3=imnoise(im,speckle,0.20);
Compress the image using the following ratios:
a. Retain 2% of the coefficients. (This requires sorting the coefficients and retaining the largest 2%, while the rest are set to zero.)
b. Retain 10% of the coefficients.
c. Retain 50% of the coefficients
d. Find the root mean square error between the original and reconstructed images in each case
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started