matlab 基本图像处理命令(1)

%原图像显示
picture_read = imread('1.jpg');
subplot(2,4,1);
figure0 = imshow(picture_read);
title('原图')


%图像灰度化
picture_gray = rgb2gray(picture_read);
subplot(2,4,2);
figure1=imshow(picture_gray);
title('图像灰度化')


%直方图均衡
picture_balance = histeq(picture_gray);
subplot(2,4,3);
figure2 = imshow(picture_balance);
title('直方图均衡')


%图像加上高斯噪声
picture_gaussian = imnoise(picture_gray,'gaussian');
subplot(2,4,4);
figure3 = imshow(picture_gaussian);
title('加上高斯噪声')


%图像加上椒盐噪声
picture_salt = imnoise(picture_gray,'salt & pepper');
subplot(2,4,5);
figure4 = imshow(picture_salt);
title('加上椒盐噪声')


%图像加上泊松噪声
picture_poisson = imnoise(picture_gray,'poisson');
subplot(2,4,6);
figure5 = imshow(picture_poisson);
title('加上泊松噪声');

%绘制灰度直方图

figure, imhist(picture_gray);

上一篇:python-3D子图的ConnectionPatch


下一篇:【CS231n】斯坦福大学李飞飞视觉识别课程笔记(三):Python Numpy教程(3)