直方图均衡化实验报告.doc

上传人:scccc 文档编号:11260488 上传时间:2021-07-19 格式:DOC 页数:2 大小:603.50KB
返回 下载 相关 举报
直方图均衡化实验报告.doc_第1页
第1页 / 共2页
直方图均衡化实验报告.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《直方图均衡化实验报告.doc》由会员分享,可在线阅读,更多相关《直方图均衡化实验报告.doc(2页珍藏版)》请在三一文库上搜索。

1、南京信息工程大学 实验(实习)报告实验(实习)名称 点操作及直方图均衡化 实验(实习)日期 得分 指导教师 系 计算机系 专业 软件工程 年级 三 班次 3 姓名 学号 实验目的:1、理解点操作图像增强方法2、理解直方图均衡化算法的原理,掌握算法的实现实验内容:1、理解图像灰度拉伸,练习imadjust函数的使用;I=imread(pout.tif);K=imadjust(I,0.2 0.5,0 1);figure;subplot(1,2,1),imshow(I);subplot(1,2,2),imshow(K);2、编程实现图像线性灰度变换算法;(全域截取分段 for循环)clear ;cl

2、c;I=imread(pout.tif); I=double(I);J=(I-80)*255/70; row=size(I,1); column=size(I,2); for i=1:rowfor j=1:columnif J(i, j)255; J(i,j)=255;endendendfigure;subplot(121); imshow(uint8(I); subplot(122); imshow(uint8(J); subplot(223),imhist(I);subplot(224),imhist(J);3、编程实现图像二值化算法;直方图 选域值clear;clc;i=imread(p

3、out.tif);bw=im2bw(i);subplot(121),imshow(i),subplot(122),imshow(bw);4、编程实现图像灰度对数log变换、指数(三角符号)变换算法;I=imread(pout.tif);J=log(im2double(I)+1); K=fft2(J);n=5;D0=0.1*pi;rh=0.7;rl=0.4;row, column=size(J);for i=1:rowfor j=1:columnD1(i,j)=sqrt(i2+j2);H(i,j)=rl+(rh/(1+(D0/D1(i,j)(2*n);endendL=K.*H;M=ifft2(L

4、); N=exp(M)-1;figure;subplot(121),imshow(I);subplot(122),imshow(real(N); 5、在Matlab中编程实现直方图均衡化算法(不使用histeq函数,编程实现其功能)。clear;clc;i=imread(pout.tif);d=double(i); %全域线性灰度变换a=min(min(d);b=max(max(d);a1=0.0;b1=255.0;d2=(b1-a1)/(b-a)*(d-a)+a1;i2=uint8(d2); %截取式线性灰度变换a3=75.0;b3=150.0;a4=0.0;b4=255.0;n1=find

5、(ia3&ib3);n2=find(ib3);d3=d;d3(n1)=(d(n1)-a3)*(b4-a4)/(b3-a3)+a4;d3(n2)=a4;d3(n3)=b4;i3=uint8(d3); %分段线性灰度变换c=120.0;e=150.0;c1=30.0;d1=171.0;n4=find(d=a&d=c&d=e&db);di2=d;di2(n4)=(d(n4)-a)*(c1-a4)/(c-a)+a4;di2(n5)=(d(n5)-c)*(d1-c1)/(e-c)+c1;di2(n6)=(d(n6)-e)*(b4-d1)/(b-e)+d1;i4=uint8(di2);subplot(241),imshow(i);subplot(242),imshow(i2);subplot(243),imshow(i3);subplot(244),imshow(i4);subplot(245),imhist(i);subplot(246),imhist(i2); subplot(247),imhist(i3);subplot(248),imhist(i4);

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1