图像的线性点运算 a=imread(‘cameraman.tif’); subplot(321):imshow(a); xlabel(‘(a)原始图像’); b1=a+50; subplot(322);imshow(b1); xlabel(‘(b)灰度值增大’); b2=1.2*a; subplot(323);imshow(b2); xlabel(‘(c)对比度增大’); b3=0.65*a; subplot(324);imshow(b3); xlabel(‘(d)对比度减小’); b4=-double(a)+255; subplot(325);imshow(uint8(b4)); xlabel(‘(e)图像求补运算’); 图像的非线性点运算 %运用函数f(x)=x+0.05*x*(255-x)对图像进行非线性变换 a=imread(‘cameraman.tif’); subplot(131);imshow(a); xlabel(‘(a)原始图像’); x=1:255; y=x+x.*(255-x)/255; subplot(132);plot(x,y); xlabel(‘(b)函数的曲线图’); b1=double(a)+0.05*double(a).*(255-double(a)); subplot(133);imshow(uint8(b1)); xlabel(‘(c)非线性
原创力文档

文档评论(0)