matlab 图像分割算法源码图像读取及灰度变换I=imread(cameraman.tif);%读取图像subplot(1,2,1),imshow(I) %输出图像title(原始图像) %在原始图像中加标题subplot(1,2,2),imhist(I) %输出原图直方图title(原始图像直方图) %在原图直方图上加标题图像旋转I = imread(cameraman.tif);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