imadjust
来源:互联网 发布:冰点降低数据法 编辑:程序博客网 时间:2024/05/21 17:17
imadjust - Adjust image intensity values or colormap
This MATLAB function maps the intensity values in grayscale image I to new
values in J such that 1% of data is saturated at low and high intensities of I.
J = imadjust(I)
J = imadjust(I,[low_in; high_in],[low_out; high_out])
J = imadjust(I,[low_in; high_in],[low_out; high_out],gamma)
newmap = imadjust(map,[low_in; high_in],[low_out; high_out],gamma)
RGB2 = imadjust(RGB1,___)
gpuarrayB = imadjust(gpuarrayA,___)
(本博客系原创,转载请注明出处:http://blog.csdn.net/xuexiyanjiusheng/article/details/46944395)
(博主cnblogs中对应文章:http://www.cnblogs.com/pfli1995/p/4657302.html)
Description
J = imadjust(I) maps the intensity values in grayscale image I to new values in J such that 1% of data is saturated饱和的at low and high intensities of I. This increases the contrast of the output image J. This syntax is equivalent to imadjust(I,stretchlim(I)).
J = imadjust(I,[low_in; high_in],[low_out; high_out]) maps the values in I to new values in J such that values between low_in and high_in map to values between low_out and high_out.
Note If high_out is less than low_out, imadjust reverses the output image, as in a photographic negative.
J = imadjust(I,[low_in; high_in],[low_out; high_out],gamma) maps the values in I to new values in J, where gamma specifies the shape of the curve describing the relationship between the values in I and J.
newmap = imadjust(map,[low_in; high_in],[low_out; high_out],gamma) transforms the m-by-3 array colormap associated with an indexed image. low_in, high_in, low_out, and high_out must be 1-by-3 vectors. gamma can be a 1-by-3 vector that specifies a unique gamma value for each channel or a scalar that specifies the value used for all three channels. The rescaled colormap newmap is the same size as map.
RGB2 = imadjust(RGB1,___) performs the adjustment on each plane (red, green, and blue) of the RGB image RGB1. If low_in, high_in, low_out, high_out, and gamma are scalars, imadjust applies the same mapping to the red, green, and blue components of the image. To specify unique mappings for each color component of the image, specify low_in, high_in, low_out, high_out, and gamma as 1-by-3 vectors.
网上的问题
- % GRAY TRANSFORM
clc;I=imread ('pout. if')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 lineally 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], [1 0], 1); % If TOP<BOTTOM, the output% image is reversed, as in a photographic negative.Figure;Imshow (J);
第1次使用imadjust命令,将图像I的[0.3 0.7]之间的灰度值扩展到[0 1]之间,然后保存成图像J;
第2次使用imadjust命令,将图像I的[0.3 0.7]之间的灰度值扩展到[0 1]之间,然后保存成图像J;不过图像更亮一些,因为最后一个参数是小于1的;
第3次使用imadjust命令,将图像I的[0.3 0.7]之间的灰度值扩展到[0 1]之间,然后保存成图像J;不过图像更暗一些,因为最后一个参数是大于1的;
第4次使用imadjust命令,因为参数区间是[1 0],因此就会得到一个反色图像,也就是黑白颠倒的图像!
- 已知图像像素的灰度值主要集中在[50,200],因此图像的灰度变换的思想是先将灰度值小于50像素点赋0,大于200赋255,然后在把灰度在[50,200]中的像素进行灰度拉伸到[0,255],这样达到突出图像有用信息,抑制无用信息的目的。
可是imadjust里的灰度范围是0到1 怎么办呢?
我觉得应该是 [0 255] 相当于 [0 1] 吧,那么 [50 200]就对应的为 [50/255 200/255],相当于[0.196 0.784]也就是J=imadjust(I,[0.196 0.784],[])
Examples:
- Adjust Contrast of Grayscale Image
Read a low-contrast grayscale image into the workspace and display it.
I = imread('pout.tif');
imshow(I);
Adjust the contrast of the image so that 1% of the data is saturated at low and high intensities, and display it.
J = imadjust(I);
figure
imshow(J)
- Adjust Contrast of Grayscale Image Specifying Contrast Limits
Read a low-contrast grayscale image into the workspace and display it.
I = imread('pout.tif');
imshow(I);
Adjust the contrast of the image, specifying contrast limits.
K = imadjust(I,[0.3 0.7],[]);
figure
imshow(K)
- Adjust Contrast of RGB Image
Read an RGB image into the workspace and display it.
RGB = imread('football.jpg');
imshow(RGB)
Adjust the contrast of the RGB image, specifying contrast limits.
RGB2 = imadjust(RGB,[.2 .3 0; .6 .7 1],[]);
figure
imshow(RGB2)
- imadjust
- histeq && imadjust
- imadjust,imcomplement
- MATLAB imadjust函数理解
- imadjust的用法
- imadjust使用opencv实现
- matlab imadjust 用 opencv改写
- matlab imadjust 用 opencv改写
- 灰度变换--imadjust和stretchlim
- 灰度变换:imadjust and stretchlim
- Matlab中 imadjust函数用法
- Matlab中imadjust函数的用法
- Matlab中imadjust函数的用法
- 图像处理函数详解——imadjust
- 图像预处理 对比度调整函数imadjust
- 图像处理-灰度变换函数imadjust和stretchlim
- Digital Image Processing(M):2.2.1 imadjust和stretchlim
- matlab 用imadjust函数实现图像灰度变换
- Servlet中Web.xml的配置详解
- 选用神经网络还是支持向量机
- 我的人生和我的程序
- linux源码,list_entry阅读心得
- android 如何添加一种新的语言
- imadjust
- css中设置图片的显示与隐藏
- mac osx 系统安装镜像 dmg 文件及 xcode 下载集合
- java函数
- Asp.Net 4.5网站使用IIS发布 uploadify插件 上传文件大小问题
- 堆排序-java
- 调用有道词典查词
- mac svn命令 linux同样适用
- kill 命令