%*************** EECS_556 IMAGE PROCESSING ******************* %*************** Computer Assignment #1 ******************* %********** *************** %********** James J. Huth Joe Mancuso *************** %********** 2/6/96 *************** %************************************************************** % Explore the application of Lloyd-Max and uniform quantizers, % 2D:DCT, 2D:DFT, etc. to an image. Investigate sampling rates % and aliasing, SNR. %***** Initialize close all; clear; %***** Load Image load house; %*********** Part c ******************************************* %*** Find the 2D DFT of Image ********************************* w=-.5:1/255:.5; house_dft=fft2(house); save house_dft.mat house_dft; dcterm1=house_dft(1,1); house_dft(1,1)=house_dft(2,2); % DC2= (log(dcterm2)); house_dft_un8=uniform(8,log(.25.*(abs(house_dft)))); figure; mesh(w,w,fftshift(round(house_dft_un8)));view(0,90);colormap(gray); title(['2D DFT of Original Image - DC Term Excluded']);