非线性动态范围调整matlab,图像增强-灰度变换.ppt

图像增强-灰度变换

灰度级的修正效果图 线性动态范围调整效果 非线性动态范围调整效果 * * * * * * * * * * * * * * (3) 的确定 由 可知,输出灰度级仅为5个级别: (4)计算对应每个 的 因为 映射到 ,所以有790个像素在输出输出图像上变成 * 映射到 ,所以有1023个像素取值 。 映射到 ,因此有850个像素取值 。 因为 和 都映射到 ,因此有656+329=985个像素取值 。 同理有245+122+81=488个像素变换 。 (5)计算 * (a) (b) (c) (d) ( a)和(b)分别是原始图像和其直方图 (c)和(d)分别是均衡化后图像和其直方图 直方图均衡化效果示例 : * imhist( I )imhist( I, n)imhist( X, map) 显示直方图MATLAB函数 imhist(I) : displays a histogram for the image I above a grayscale colorbar. The number of bins in the histogram is specified by the image type. If I is a grayscale image, imhist uses a default value of 256 bins. If I is a binary image, imhist uses two bins. imhist(I, n) : displays a histogram where n specifies the number of bins used in the histogram. n also specifies the length of the colorbar. If I is a binary image, n can only have the value 2. imhist(X, map) : displays a histogram for the indexed image X. This histogram shows the distribution of pixel values above a colorbar of the colormap map. The colormap must be at least as long as the largest index in X. The histogram has one bin for each entry in the colormap. * J = histeq(I, hgram)J = histeq(I, n)[J, T] = histeq(I,...)newmap = histeq(X, map, hgram)newmap = histeq(X, map) I = imread('tire.tif'); J = histeq(I); imshow(I) figure, imshow(J) figure; imhist(I,64) figure; imhist(J,64) 直方图均衡化 Histogram Equalization * 【例4.2 】在MATLAB环境中,采用图像线性变换进行图像增强。 应用MATLAB的函数imadjust 将图像0.3×255~0.7×255灰度之间的值通过线性变换映射到0~255之间。 解:分别取:a=0.3×255,b=0.7×255, a'=0,b'=255。 * clear all; close all clc A=imread('pout.tif'); %读入图像 imshow(A); %显示图像 figure, imhist(A); %显示图像的直方图 J1=imadjust(A,[0.3 0.7],[0,1 ]); %函数将图像在0.3*255~0.7*255灰

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值