1 / 2
文档名称:

傅里叶变换、离散余弦变换处理图像的代码.doc

格式:doc   大小:26KB   页数:2页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

傅里叶变换、离散余弦变换处理图像的代码.doc

上传人:mh900965 2018/5/28 文件大小:26 KB

下载得到文件列表

傅里叶变换、离散余弦变换处理图像的代码.doc

文档介绍

文档介绍:一、图像处理基本功能
普通傅里叶变换(ft)与逆变换(ift)、快速傅里叶变换(fft)与逆变换(ifft)、离散余弦变换(DCT),小波变换;数字图像直方图的统计及绘制等;图像平滑算法实现及应用。
(一)、程序源代码:
代码一:
clc;
I=imread('');
length(size(I))==3
g=rgb2gray(I);
subplot(1,2,1)
imshow(I);
title('原图');
subplot(1,2,2)
I=rgb2gray(I);
subplot(2,2,1);imshow(I);title('原始图象');
[J,T] = histeq(I);
subplot(2,2,3);imshow(J);title('增强图象');
subplot(2,2,2);imhist(I,64);title('原始图象直方图');
subplot(2,2,4);imhist(J,64);title('均衡化图象直方图');
colorbar;
J=fft2(g);%快速傅里叶变换
figure;
subplot(1,2,1)
imshow(J);
title('FFT变换结果');
subplot(1,2,2)
K=fftshift(J);
imshow(K);
title('零点平移');
% 图象的DCT变换
RGB=imread('');
figure;
subplot(1,2,1)
imshow(RGB);
title('彩色原图');
a=rgb2gray(RGB);
subplot(1,2,2)
imshow(a);
title('灰度图');
figure;
b=dct2(a);
imshow(log(abs(b)),[]),colormap(jet(64)),colorbar;
title('DCT变换结果');
figure;
b(abs(b)<10)=0;
% idct
c=idct2(b)/255;
imshow(c);
title('IDCT变换结果');
运行结果: