- 15
- 0
- 约2.05万字
- 约 33页
- 2023-03-05 发布于上海
- 举报
matlab 图像分割算法源码图像读取及灰度变换
I=imread(cameraman.tif);%读取图像subplot(1,2,1),imshow(I) %输出图像title(原始图像) %在原始图像中加标题subplot(1,2,2),imhist(I) %输出原图直方图
title(原始图像直方图) %在原图直方图上加标题图像旋转
figure,imshow(I);theta = 30;
figure,imshow(I);
theta = 30;
K = imrotate(I,theta); % Try varying the angle, theta. figure, imshow(K)
边缘检测
I = imread(cameraman.tif); J1=edge(I,sobel); J2=edge(I,prewitt); J3=edge(I,log);
subplot(1,4,1),imshow(I);
subplot(1,4,2),imshow(J1);
subplot(1,4,3),imshow(J2);
subplot(1,4,4),imshow(J3);
1.图像反转
MATLAB 程序实现如下:
I=imread(xian.bmp);
J=double(I); J=-J+(256-1);
%图像反转线性变换
H=uint8(J);
subplot(1,2,1
原创力文档

文档评论(0)