DOC PREVIEW
UT Arlington EE 5355 - Avik_Pal_Project10.doc

This preview shows page 1-2-3-4-5 out of 14 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 14 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

AVIK PAL UTA_ID: 1001113861 Project 10 Transform coding gain is defined as .)./..(~~1/1102102MGMANGNNiiiNiiiTC Where, is the variance of the ith transform coefficient. Compare the performances of various transforms such as KLT, DFT, DCT and DST for N=8, 16, 32 (Both in tables and graphs), assuming the random vector is generated by I order Markov Process. For each N, consider varying from 0 to 1. is adjacent correlation coefficient. Solution: Programming: - (For N=8) clc; close all; clear all; %creating initial sum =0 and product=1 for all transforms KLT_mtx1=zeros(1,10); DCT_mtx1=zeros(1,10); DFT_mtx1=zeros(1,10); DST_mtx1=zeros(1,10); KLT_mtx2=ones(1,10); DCT_mtx2=ones(1,10); DFT_mtx2=ones(1,10); DST_mtx2=ones(1,10); %creating matrix with values for N=8% N = 8; %Finding the matrix of DCT,DFT and DST for n=8% DCT_matrix=dctmtx(N); DFT_matrix=dftmtx(N); for k=1:N for l=1:N DST_matrix(k,l)=sqrt(2/(N+1))*sin((k*l*pi)/(N+1)); end endAVIK PAL UTA_ID: 1001113861 Project 10 %Finding 10 points for 10 Markov processes% p = [rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand()]; %calculating GTC% for k=1:10 for i=1:N for j=1:N A(i,j)=p(k)^(abs(i-j)); end end %finding KLT kernel [KLT_matrix,D]=eig(A); %Finding transform domain variances in KLT,DCT,DFT and DST KLT_tran= (KLT_matrix'*A*KLT_matrix); DCT_tran= (DCT_matrix'*A*DCT_matrix); DFT_tran= (DFT_matrix'*A*DFT_matrix); DST_tran= (DST_matrix'*A*DST_matrix); %Finding the sum of diagnals elements and product of diagnal elements for x=1:N for y=1:N if(x==y) KLT_mtx1(k)=KLT_mtx1(k)+KLT_tran(x,y); KLT_mtx2(k)=KLT_mtx2(k)*KLT_tran(x,y); DCT_mtx1(k)=DCT_mtx1(k)+DCT_tran(x,y); DCT_mtx2(k)=DCT_dnr(k)*DCT_tran(x,y); DFT_mtx1(k)=DFT_mtx1(k)+DFT_tran(x,y); DFT_mtx2(k)=DFT_mtx2(k)*DFT_tran(x,y); DST_mtx1(k)=DST_mtx1(k)+DST_tran(x,y); DST_mtx2(k)=DST_mtx2(k)*DST_tran(x,y); end end end %computing of GTC=arithmetic mean/geom mean% KLT_Gtc(k)=((KLT_mtx1(k)/N)/(KLT_mtx2(k)^(1/N))); DCT_Gtc(k)=((DCT_mtx1(k)/N)/(DCT_mtx2(k)^(1/N))); DFT_Gtc(k)=((DFT_mtx1(k)/N)/(DFT_mtx2(k)^(1/N))); DST_Gtc(k)=((DST_mtx1(k)/N)/(DST_mtx2(k)^(1/N))); end %displayin of GTC% Gtc8(1,:)=KLT_Gtc; Gtc8(2,:)=DCT_Gtc; Gtc8(3,:)=DFT_Gtc; Gtc8(4,:)=DST_Gtc; plot(0:0.1:0.9,Gtc8); legend('KLT','DCT','DFT','DST'); title('Transform coding gain plot for N=8'); figure Visualization:AVIK PAL UTA_ID: 1001113861 Project 10 Observation: For Coding gain for KLT matrix Coding gain for DCT matrix Coding gain for DFTAVIK PAL UTA_ID: 1001113861 Project 10 Coding gain for DST - (For N=16) Programming: %------------------------------------------------------------------------ %Repeating above process for N=16 N = 16; %Finding the Kernel of DCT,DFT and DST DCT_mtx=dctmtx(N); DFT_mtx=dftmtx(N); for k=1:N for l=1:N DST_mtx(k,l)=sqrt(2/(N+1))*sin((k*l*pi)/(N+1)); end end %Finding 10 rhos for 10 Markov processes p = [rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand()]; %calculating GTC for k=1:10 for i=1:N for j=1:N A(i,j)=p(k)^(abs(i-j));AVIK PAL UTA_ID: 1001113861 Project 10 end end %finding KLT kernel [KLT_mtx,D]=eig(A); %Finding transform domain variances in KLT,DCT,DFT and DST KLT_tra= (KLT_mtx'*A*KLT_mtx); DCT_tra= (DCT_mtx'*A*DCT_mtx); DFT_tra= (DFT_mtx'*A*DFT_mtx); DST_tra= (DST_mtx'*A*DST_mtx); %Finding the sum of diagnals elements and product of diagnal elements for x=1:N for y=1:N if(x==y) KLT_mtx1(k)=KLT_mtx1(k)+KLT_tra(x,y); KLT_mtx2(k)=KLT_mtx2(k)*KLT_tra(x,y); DCT_mtx1(k)=DCT_mtx1(k)+DCT_tra(x,y); DCT_mtx2(k)=DCT_mtx2(k)*DCT_tra(x,y); DFT_mtx1(k)=DFT_mtx1(k)+DFT_tra(x,y); DFT_mtx2(k)=DFT_mtx2(k)*DFT_tra(x,y); DST_mtx1(k)=DST_mtx1(k)+DST_tra(x,y); DST_mtx2(k)=DST_mtx2(k)*DST_tra(x,y); end end end %computation of Coding gain=arithmetic mean/geom mean KLT_Gtc(k)=((KLT_mtx1(k)/N)/(KLT_mtx2(k)^(1/N))); DCT_Gtc(k)=((DCT_mtx1(k)/N)/(DCT_mtx2(k)^(1/N))); DFT_Gtc(k)=((DFT_mtx1(k)/N)/(DFT_mtx2(k)^(1/N))); DST_Gtc(k)=((DST_mtx1(k)/N)/(DST_mtx2(k)^(1/N))); end %display of GTC Gtc16(1,:)=KLT_Gtc; Gtc16(2,:)=DCT_Gtc; Gtc16(3,:)=DFT_Gtc; Gtc16(4,:)=DST_Gtc; plot(0:0.1:0.9,Gtc16); legend('KLT','DCT','DFT','DST'); title('Transform coding gain plot for N=16'); figure Visualization: For N=16AVIK PAL UTA_ID: 1001113861 Project 10 Observation: Coding gain matrix for KLT Coding gain matrix for DCT Coding gain matrix for DSTAVIK PAL UTA_ID: 1001113861 Project 10 Coding gain matrix for DFT - For N=32 Programming: %------------------------------------------------------------------------ %Repeating above process for N=32% N = 32; %Finding the Kernel of DCT,DFT and DST DCT_mtx=dctmtx(N); DFT_mtx=dftmtx(N); for k=1:N for l=1:N DST_mtx(k,l)=sqrt(2/(N+1))*sin((k*l*pi)/(N+1)); end end %Finding 10 rhos for 10 Markov processes p = [rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand(),rand()]; %calculating GTC for k=1:10 for i=1:N for j=1:N A(i,j)=p(k)^(abs(i-j)); end end %finding KLT kernel [KLT_mtx,D]=eig(A);AVIK PAL UTA_ID: 1001113861 Project 10 %Finding transform domain variances in KLT,DCT,DFT and DST KLT_tra= (KLT_mtx'*A*KLT_mtx); DCT_tra= (DCT_mtx'*A*DCT_mtx); DFT_tra= (DFT_mtx'*A*DFT_mtx); DST_tra= (DST_mtx'*A*DST_mtx); %Finding the sum of diagnals elements and product of diagnal elements for x=1:N for y=1:N if(x==y) KLT_mtx1(k)=KLT_mtx1(k)+KLT_tra(x,y); KLT_mtx2(k)=KLT_mtx2(k)*KLT_tra(x,y); DCT_mtx1(k)=DCT_mtx1(k)+DCT_tra(x,y); DCT_mtx2(k)=DCT_mtx2(k)*DCT_tra(x,y); DFT_mtx1(k)=DFT_mtx1(k)+DFT_tra(x,y); DFT_mtx2(k)=DFT_mtx2(k)*DFT_tra(x,y); DST_mtx1(k)=DST_mtx1(k)+DST_tra(x,y); DST_mtx2(k)=DST_mtx2(k)*DST_tra(x,y); end end end %computation of GTC=arithmetic mean/geom mean KLT_Gtc(k)=((KLT_mtx1(k)/N)/(KLT_mtx2(k)^(1/N))); DCT_Gtc(k)=((DCT_mtx1(k)/N)/(DCT_mtx2(k)^(1/N))); DFT_Gtc(k)=((DFT_mtx1(k)/N)/(DFT_mtx2(k)^(1/N))); DST_Gtc(k)=((DST_mtx1(k)/N)/(DST_mtx2(k)^(1/N))); end %display of


View Full Document
Download Avik_Pal_Project10.doc
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Avik_Pal_Project10.doc and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Avik_Pal_Project10.doc 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?