⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 specification.m

📁 自己编写的一个简单的matlab程序
💻 M
字号:
clc;
I=imread('moon.tif');
% I=imread('moon.tif'); %读入图像
figure;
subplot(1,2,1);
% imshow(I);    %显示图像
imshow(I);
title('原始图像');
subplot(1,2,2);
% imhist(I,256);     %显示原始图像直方图,灰度级为256
imhist(I);
title('原始图像直方图');

%直方图均衡化处理
J=histeq(I,32);   
figure;
subplot(1,2,1);  
imshow(J);
title('均衡化图像(32级)');
subplot(1,2,2);
imhist(J);
title('均衡化图像直方图');
[counts,x]=imhist(J);
%获得均衡化处理后直方图个各像素点灰度级以便后面图像规定化

%直方图规定化处理
K=imread('pout.tif');
figure;
subplot(1,2,1);
imshow(K);
title('要规定化图像');
subplot(1,2,2);
imhist(K);
title('要规定化图像直方图');

%规定化处理
L=histeq(K,counts);
figure;
subplot(1,2,1);
imshow(L);
title('规定化后图像');
subplot(1,2,2);
imhist(L);
title('规定化后图像直方图');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -