MATLAB图像增强程序举例.doc

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
MATLAB图像增强程序举例

MATLAB图像增强程序举例 % GRAY TRANSFORM clc; I=imread(pout.tif); imshow(I); J=imadjust(I,[0.3 0.7],[0 1],1);??%transforms the walues in the %intensity image I to values in J by linealy mapping %values between 0.3 and 0.7 to values between 0 and 1. figure; imshow(J); J=imadjust(I,[0.3 0.7],[0 1],0.5);??% if GAMMA is less than 1,the ?mapping si weighted toward higher (brighter) %output values. figure; imshow(J); J=imadjust(I,[0.3 0.7],[0 1],1.5);??% if GAMMA is greater than 1,the mapping si weighted toward lower (darker) %output values. figure; imshow(J) J=imadjust(I,[0.3 0.7],[0 1],1);??% If TOPBOTTOM,the output image is reversed,as in a photographic negative. figure; imshow(J); ? 2.直方图灰度变换 %直方图灰度变换 [X,map]=imread(forest.tif); I=ind2gray(X,map);%把索引图像转换为灰度图像 imshow(I); title(原图像); improfile%用鼠标选择一条对角线,显示线段的灰度值 figure;subplot(121) plot(0:0.01:1,sqrt(0:0.01:1)) axis square title(平方根灰度变换函数) subplot(122) maxnum=double(max(max(I)));%取得二维数组最大值 J=sqrt(double(I)/maxnum);%把数据类型转换成double,然后进行平方根变换 %sqrt函数不支持uint8类型 J=uint8(J*maxnum);%把数据类型转换成uint8类型 imshow(J) title(平方根变换后的图像)% HISTGRAM EAQUALIZATION clc; % Clear command window I=imread(tire.tif); % reads the image in tire.tif into I imshow(I); % displays the intensity image I with 256 gray levels figure; %creates a new figure window imhist(I); % displays a histogram for the intensity image I J=histeq(I,64); % transforms the intensity image I,returning J an intensity figure; %image with 64 discrete levels imshow(J); figure; imhist(J); J=histeq(I,32); %transforms the intensity image ,returning in % J an intensity figure; %image with 32 discrete levels imshow(J); figure; imhist(J); 4.直方图规定化程序举例 % HISTGRAM REGULIZATION clc; %Clear command window I=imread(tire.tif); %reads the image in tire.tif into I J=histeq(I,32); %transforms the intensity image I,returning in %J an intensity image with 32 discrete levels [counts,x]=imhist(J); %displays a histogram for the intensity image I Q=imread(pout.tif); %reads the image in tire.tif into I figure

文档评论(0)

xjj2017 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档