Access over 20 million homework & study documents

Matlab programming of DCT and FFT

Content type
User Generated
Subject
Engineering
Type
Study Guide
Rating
Showing Page:
1/4


!
"#$
%&&'&&
%&&''&&'
%&&('&&(
for&
for&
if)*+
%
%'
%(
end
end
end
,&&'%&&
,&&''%&&'
,&&('%&&(
-'.
/%
/01,
2 0
%&&'&&
%&&''&&'
%&&('&&(
for&
for&
if)*
%
%'
%(
end
end
end
,&&'%&&
,&&''%&&'
,&&('%&&(
-'.'
/%
/01,
3 0

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/4
%&&'&&
%&&''&&'
%&&('&&(
for&
for&
if)*.
%
%'
%(
end
end
end
,&&'%&&
,&&''%&&'
,&&('%&&(
-'.(
/%
/01,
( 0
%&&'&&
%&&''&&'
%&&('&&(
for&
for&
if)*1
%
%'
%(
end
end
end
,&&'%&&
,&&''%&&'
,&&('%&&(
-'..
/%
/01,
 0
44$
%&&5'&&
%&&'5'&&'
%&&(5'&&(

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/4

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 4 pages?
Access Now
Unformatted Attachment Preview
clear all; p=imread('kaka.jpg'); %%%%%%%%%%%give path of the picture a=imresize(p,[100,100]); %DCT Z(:,:,1)=dct2(a(:,:,1)); Z(:,:,2)=dct2(a(:,:,2)); Z(:,:,3)=dct2(a(:,:,3)); ? for i=1:100 ? ? ??for j=1:100 ? ? ? ? ??if((i+j)>60) ? ? ? ? ? ? ? ?Z(i,j,1)=0; ? ? ? ? ? ? ? ?Z(i,j,2)=0; ? ? ? ? ? ? ? ?Z(i,j,3)=0; ? ? ? ? ? ?end ? ? ??end ?end K(:,:,1)=idct2(Z(:,:,1)); K(:,:,2)=idct2(Z(:,:,2)); K(:,:,3)=idct2(Z(:,:,3)); subplot(2,4,1); %imshow(Z); imshow(uint8(K)); title('70% compression'); ?Z(:,:,1)=dct2(a(:,:,1)); Z(:,:,2)=dct2(a(:,:,2)); Z(:,:,3)=dct2(a(:,:,3)); ? for i=1:100 ? ? ??for j=1:100 ? ? ? ? ??if((i+j)>100) ? ? ? ? ? ? ? Z(i,j,1)=0; ? ? ? ? ? ? ? Z(i,j,2)=0; ? ? ? ? ? ? ? Z(i,j,3)=0; ? ? ? ? ? end ? ? ??end ?end K(:,:,1)=idct2(Z(:,:,1)); K(:,:,2)=idct2(Z(:,:,2)); K(:,:,3)=idct2(Z(:,:,3)); subplot(2,4,2); %imshow(Z); imshow(uint8(K)); title('50% compression'); ?Z(:,:,1)=dct2(a(:,:,1)); Z(:,:,2)=dct2(a(:,:,2)); Z(:,:,3)=dct2(a(:,:,3)); ? for i=1:100 ? ? ??for j=1:100 ? ? ? ? ??if((i+j)>140) ? ? ? ? ? ? ? ?Z(i,j,1)=0; ? ? ? ? ? ? ? ?Z(i,j,2)=0; ? ? ? ? ? ? ? ?Z(i,j,3)=0; ? ? ? ? ??end ? ? ??end end K(:,:,1)=idct2(Z(:,:,1)); K(:,:,2)=idct2(Z(:,:,2)); K(:,:,3)=idct2(Z(:,:,3)) ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
This is great! Exactly what I wanted.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Documents