18 lines
387 B
Mathematica
18 lines
387 B
Mathematica
|
close all
|
||
|
clear
|
||
|
clc
|
||
|
disp('====E4_7_1.m====');
|
||
|
|
||
|
I=[0 20 40 70
|
||
|
80 100 120 150
|
||
|
160 180 200 230]
|
||
|
uint8I=uint8(I)
|
||
|
subplot(2,2,1),imshow(uint8I),ylabel('原始图像');
|
||
|
subplot(2,2,2),imhist(uint8I);
|
||
|
|
||
|
mask = fspecial('average',5) % 语句1
|
||
|
J=filter2(mask,uint8I)
|
||
|
uint8J=uint8(J)
|
||
|
subplot(2,2,3),imshow(uint8J),ylabel('3*3均值滤波后的图像');
|
||
|
subplot(2,2,4),imhist(uint8J);
|