%%
%Written by Chai Jiaxing
%date:2019/4/15
clear;clc;close all;
set(0,'defaultfigurecolormap',jet);
%%
load ('data.dat');
% imagesc(data);
% colorbar;
%%
%均值滤波
figure(1);
subplot(2,2,1);
answer1=af(data,3);
imagesc(answer1);
colorbar;title('window=3*3');
subplot(2,2,2);
answer1=af(data,5);
imagesc(answer1);
colorbar;title('window=5*5');
subplot(2,2,3);
answer1=af(data,7);
imagesc(answer1);
colorbar;title('window=7*7');
subplot(2,2,4);
answer1=af(data,11);
imagesc(answer1);
colorbar;title('window=11*11');
%%
%中值滤波
figure(2);
subplot(2,2,1);
answer1=mf(data,3);
imagesc(answer1);
colorbar;title('window=3*3');
subplot(2,2,2);
answer1=mf(data,5);
imagesc(answer1);
colorbar;title('window=5*5');
subplot(2,2,3);
answer1=mf(data,7);
imagesc(answer1);
colorbar;title('window=7*7');
subplot(2,2,4);
answer1=mf(data,11);
imagesc(answer1);
colorbar;title('window=11*11');
%%
%圆周期滤波
figure(3);
subplot(2,2,1);
answer1=cpf(data,3);
imagesc(answer1);
colorbar;title('window=3*3');
subplot(2,2,2);
answer1=cpf(data,5);
imagesc(answer1);
colorbar;title('window=5*5');
subplot(2,2,3);
answer1=cpf(data,7);
imagesc(answer1);
colorbar;title('window=7*7');
subplot(2,2,4);
answer1=cpf(data,11);
imagesc(answer1);
colorbar;title('window=11*11');
评论0