实验一图像增强和图像分割实验(1)分别用图中给出的直线和曲线作为增强函数进行增强,比较它们的效果并讨论其特点
线性变换对指数变换图片1图片2实验步骤:1
在MATLAB中编写灰度图像的线性变换点运算程序图片1处理程序I=imread('图片1
png');%读入原图像I=im2double(I);%转换数据类型为double[M,N]=size(I);figure(1);imshow(I);%显示原图像title('原图像');figure(2);I=rgb2gray(I);%转化为灰度图像[H,x]=imhist(I,64);stem(x,(H/M/N),'
');title('原图像');%tan=30`a=sqrt(3)/3;b=0;y=a
*I+b;figure(3);E2(s)E3(s)E1(s)L-1L-1E5(s)E4(s)L-1L-1imshow(y);title('tan=30');figure(4);[H,x]=imhist(y,64);stem(x,(H/M/N),'
');title('tan=30');%tan=45`a=1;b=0;y=a
*I+b;figure(5);imshow(y);title('tan=45');figure(6);[H,x]=imhist(y,64);stem(x,(H/M/N),'
');title('tan=45');%tan=60`a=sqrt(3);b=0;y=a
*I+b;figure(7);imshow(y);title('tan=60');figure(8);[H,x]=imhist(y,6