DOC PREVIEW
UT Arlington EE 5355 - Output-129.107.239.157-AVIK_PAL_Project9.docx_2014_11_10_10_33_39_335

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 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 9 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 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

AVIK PAL 1001113861 Project 9 Project 6 Discrete Sine Transform EE5355 DISCRETE TRANSFORMS AND THEIR APPLICATIONS Q. Apply 7-point DST with offset to Lena image. Show all the figures similar to Fig. 2 in this paper Programming: Original Lena image clc clear all close all %loading the image% X_1=double(imread('lena512.bmp')); %loading it into 511*511 dimension matrix% X_2=imresize(X_1,[511,511]); figure(1) imshow(uint8(X_2)); title('Original Lena Image'); Visualization: Using the circular shift of DST matrix N=7; for i=1:N for j=1:N %making sine transformation%AVIK PAL 1001113861 Project 9 sine_transform(i,j)=sqrt(2/(N+1))*sin((i*j*pi)/(N+1)); end; end; %initializing another matrix which is 511*511% mat_str=zeros(511,511); d=1; for i=1:511 id=1; shft=mod(i, 2); for j=1:7:511 tmp_var= X_2(id:id+6,d); dst_mat(id:id+6,d)=sine_transform*tmp_var; dct_mat(id:id+6,d)=dctmtx(N)*tmp_var; id=id+7; end; %circular shift% mat_str(:,d)=circshift(dst_mat(:,d),shft); d=d+1; end; Observation: After applying sine transformation on the temporary matrix and applying circular shift on dst matrix ,we get mat_str matrix which is 511*511 in dimension and the values are given as below. Calculating the values of sine co efficient and Co sine coefficient: d=1;AVIK PAL 1001113861 Project 9 for i=1:511 id=1; shft=mod(i,2); for j=1:7:511 %inserting values in dct matrix% dct_mat(id+1:id+6,d)=0; %calculating inverse dct% cosine_coeff(id:id+6,d)=idct2(dct_mat(id:id+6,d)); dst_mat(id+1:id+6,d)=0; sine_coeff(id:id+6,d)=sine_transform*dst_mat(id:id+6,d); mat_str(id+3:id+6,d)=0; id=id+7; end; mat_str(:,d)=circshift(mat_str(:,d),-shft); d=d+1; end; figure(2) imshow(uint8(cosine_coeff)); title('DCT Coefficient'); figure(3) imshow(uint8(sine_coeff)); title('DST Coefficient'); Observation: DST matrix Visualization: DCT co-efficientAVIK PAL 1001113861 Project 9 DST co-efficient: DCT co efficient matrix will beAVIK PAL 1001113861 Project 9 Discrete Sine Co-efficient matrix will be It is observed that both matrix are 511*511 in dimension.AVIK PAL 1001113861 Project 9 **DST co-efficient with offset Programming: jd=1; for i=1:511 id=1; for j=1:7:511 offset_sinecoeff(id:id+6,jd)=sine_transform*mat_str(id:id+6,jd); id=id+7; end; d=d+1; end figure(4) imshow(uint8(offset_sinecoeff)); title('DST Coeff with Offset'); Visualization: Offset coefficient matrix is 511*1 dimensionsAVIK PAL 1001113861 Project 9 Matlab Programming: clc clear all close all %loading the image% X_1=double(imread('lena512.bmp')); %loading it into 511*511 dimension matrix% X_2=imresize(X_1,[511,511]); figure(1) imshow(uint8(X_2)); title('Original Lena Image'); N=7; for i=1:N for j=1:N %making sine transformation% sine_transform(i,j)=sqrt(2/(N+1))*sin((i*j*pi)/(N+1)); end; end; %initializing another matrix which is 511*511% mat_str=zeros(511,511); d=1; for i=1:511 id=1; shft=mod(i, 2); for j=1:7:511 tmp_var= X_2(id:id+6,d); dst_mat(id:id+6,d)=sine_transform*tmp_var; dct_mat(id:id+6,d)=dctmtx(N)*tmp_var; id=id+7;AVIK PAL 1001113861 Project 9 end; %circular shift% mat_str(:,d)=circshift(dst_mat(:,d),shft); d=d+1; end; d=1; for i=1:511 id=1; shft=mod(i,2); for j=1:7:511 %inserting values in dct matrix% dct_mat(id+1:id+6,d)=0; %calculating inverse dct% cosine_coeff(id:id+6,d)=idct2(dct_mat(id:id+6,d)); dst_mat(id+1:id+6,d)=0; sine_coeff(id:id+6,d)=sine_transform*dst_mat(id:id+6,d); mat_str(id+3:id+6,d)=0; id=id+7; end; mat_str(:,d)=circshift(mat_str(:,d),-shft); d=d+1; end; figure(2) imshow(uint8(cosine_coeff)); title('DCT Coefficient'); figure(3) imshow(uint8(sine_coeff)); title('DST Coefficient'); jd=1; for i=1:511 id=1; for j=1:7:511 offset_sinecoeff(id:id+6,jd)=sine_transform*mat_str(id:id+6,jd); id=id+7; end; d=d+1; end figure(4) imshow(uint8(offset_sinecoeff)); title('DST Coeff with Offset'); Conclusion: DCT and DST are used immensely for image and signal processing. In this project we apply some characteristics of both dct and dst and inverse dct as well.and then after that I calculate the both DCT and DST matrix and tried to calculate the offset in DST co efficient matrix.AVIK PAL 1001113861 Project


View Full Document

UT Arlington EE 5355 - Output-129.107.239.157-AVIK_PAL_Project9.docx_2014_11_10_10_33_39_335

Download Output-129.107.239.157-AVIK_PAL_Project9.docx_2014_11_10_10_33_39_335
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 Output-129.107.239.157-AVIK_PAL_Project9.docx_2014_11_10_10_33_39_335 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 Output-129.107.239.157-AVIK_PAL_Project9.docx_2014_11_10_10_33_39_335 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?