www.pudn.com > MATLAB.rar > dctlp.m, change:2009-10-20,size:329b


clear; 
close all; 
clc; 
a=imread('1.bmp'); 
b=rgb2gray(a); 
figure:imshow(b); 
d=dct2(b); 
figure:surfc(d); 
[n1 n2]=size(b); 
for i=1:n1 
    for j=1:n2 
        if(i<64)&(j<64) 
            d(i,j)=d(i,j); 
        else 
            d(i,j)=0; 
        end 
    end 
end 
figure:surfc(d); 
g=idct2(d); 
figure:imshow(uint8(g));