MATLAB图像的基本处理
来源:互联网 发布:qq纯真ip数据库 编辑:程序博客网 时间:2024/04/30 22:57
1、图像文件读写和显示
close all;
clear all;
clc;
I=imread('ee','jpeg');%图像文件的读写
B=rgb2gray(I);%图像文件转换
figure(1);%画图
subplot(2,2,1);imshow(B,[60,120]);%图像文件的显示并指定灰度值的范围
subplot(2,2,2);image([50 300],[50 200],B);%调整图像的坐标
subplot(2,2,3);imagesc(B,[50 200]);%显示灰度拉伸后的图像
subplot(2,2,4);imshow(B,[]);colorbar('east');%添加彩色条,在图像内侧
figure(2);
[x,y,z]=sphere;
warp(x,y,z,I);%把图像映射到三维空间中
grid;
figure(3);
r=[104 156 129];
c=[12 146 410];
pixel1=impixel(I);%用鼠标选取特定坐标的像素
disp(pixel1);
pixel2=impixel(I,c,r);%在某个范围内显示像素信息
disp(pixel2);
2、图像增强
close all;
clear all;
clc;
%直方图均衡化
I=imread('ee.jpg');
B=rgb2gray(I);
J=histeq(B);
figure(1);
subplot(2,2,1);imshow(B);
subplot(2,2,2);imshow(J);
subplot(2,2,3);imhist(B);
subplot(2,2,4);imhist(J);
%直方图规定化
hgram=ones(1,25);
J2=histeq(B,hgram);
figure(2);
subplot(1,2,1);imshow(J2);
subplot(1,2,2);imhist(J2);
3、图像分割
close all;
clear all;
clc;
I=imread('ee.jpg');
I=rgb2gray(I);
[J,thresh]=edge(I,'sobel',[],'both');
[K,thresh]=edge(K,'canny');
figure;
subplot(1,3,1);imshow(I);
subplot(1,3,2);imshow(J);
subplot(1,3,3);imshow(K);
4、图像变换
close all;
clear all;
clc;
I=imread('ee.jpg');
I=rgb2gray(I);
BW=edge(I,'canny');
[H,theta,rho]=hough(BW,'RhoResolution',0.5,'ThetaResolution',0.5);
figure;
subplot(121);imshow(BW);
subplot(122);imshow(imadjust(mat2gray(H)));
axis normal;
- MATLAB图像的基本处理
- matlab图像处理基本函数
- Matlab 图像处理基本方法
- Matlab图像处理基本操作
- Matlab图像处理基本函数
- MATLAB图像处理基本命令
- Matlab 图像处理基本操作
- Matlab 图像处理基本操作
- Matlab 图像处理基本操作
- Matlab 图像处理基本操作
- MATLAB数字图像处理(一)图像的基本操作
- matlab+数字图像处理教程之1-图像的基本操作
- matlab中图像处理的基本函数(1)
- matlab中图像处理的基本函数(2)
- Matlab学习一 图像基本处理
- 图像处理matlab+OpenCV基本操作
- Matlab彩色图像处理基本操作
- matlab 图像的基本操作
- QJson的简单使用
- caffe for windows的python接口学习(4):训练模型
- Android系统源代码编译—[1]搭建一个构建环境
- Java——第八章(集合类)——项目案例
- MyEclipse+Tomcat+MAVEN+SVN项目完整环境搭建
- MATLAB图像的基本处理
- gitHub分支操作
- C语言通过两个指针挖取字符串,并存入到二级指针中
- Request.getParameter()乱码问题
- redis学习笔记3(redis.conf)
- 30是什么意思
- 使用maven创建web项目
- 为什么我的AJAX请求处理成功了,还报404错误?
- .NET中的Process 类的简单使用