英语翻译82 Chapter 3 Intensity Transformations and Spatial FilteringHistogram equalization is implemented in the toolbox by functian histeq,which has the syntaxg = histeq(f,nlev)where f is the input image and n Iev is the number of intensity leve
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/16 02:57:58
英语翻译82 Chapter 3 Intensity Transformations and Spatial FilteringHistogram equalization is implemented in the toolbox by functian histeq,which has the syntaxg = histeq(f,nlev)where f is the input image and n Iev is the number of intensity leve
英语翻译
82 Chapter 3 Intensity Transformations and Spatial Filtering
Histogram equalization is implemented in the toolbox by functian histeq,
which has the syntax
g = histeq(f,nlev)
where f is the input image and n Iev is the number of intensity levels specified
for the output image.If nlev is equal to L (the total number of possible levels
in the input image),then histeq implements the transformation function,
T(r),directly.If nlev is less than L,then histeq attempts to distribute the
levels so that thcy will approximate a flat histngram.Unlike imhist,the de-
fault value in histeq is nlev = 64.For the most part,we use the maximum
possible number of levels (generally 256) for nlev because this produces a
true implementation of the histogram-equalization method just described.
Figure 3.8(a) is an electron microscope image of pollen,magnified approx-
imately 700 times.In terms of needed enhancement,the most important fea-
tures of this image are that it is dark and has a low dynamic range.This can be
seen in the histogram in Fig.3.8(b),in which the dark nature of the image is ex-
pected because the histogram is biased toward the dark end of the gray scale.
The low dynamic range is evident from thefact that the "width" of the his-
togram is narrow with respect to the entire gray scale.Letting f denote the
input image,the following sequence of steps produced Figs.3.8(a) through (d):
>> imshow( f)
>> figure,imhist(f)
>> ylim('auto')
>> g = histeq(f,256);
>> figure,imshow(g)
>> figure,imhist(g)
>> ylim('auto')
The images were saved to disk in tiff format at 300dpi using imwrite,and the
plots were similarly exported to disk using the print function discussed in
Section 2.4.
The image in Fig.3.8(c) is the histogram-equalized result.The improve-
ments in average intensity and contrast are quite evident.These features also
are evident in the histogram of this image,shown in Fig.3.8(d).The increase in
contrast is due to the considerable spread of the histogram over the entire in-
tensity scale.The increase in overall intensity is due to the fact that the average
intensity level in the histogram of the equalized image is higher (lighter) than
the original.Although the histogram-equalization method just discussed does
not produce a flat histogram,it has the desired characteristic of being able to
increase the dynamic range of the intensity levels in an image.
As noted earlier,the transformation function T(r) is simply the cumulative
sum of normalized histogram values We can use function cumsum to obtain the
transformation function,as follows:
>> hnorm = imhist(f),/numel(f);
>> cof = cumsum(hnorm);
英语翻译82 Chapter 3 Intensity Transformations and Spatial FilteringHistogram equalization is implemented in the toolbox by functian histeq,which has the syntaxg = histeq(f,nlev)where f is the input image and n Iev is the number of intensity leve
82 第 3 章强度变形和空间的过滤
柱状图均等在工具箱中被 functian histeq 实现,
哪一有语法
g=histeq(f,nlev)
f 是输入图像哪里,而且 n Iev 是被叙述的强烈水平的数字
对于输出,图像.如果 nlev 和 L 相等 ( 可能的水平总数
在输入中,图像),然后 histeq 实现变形功能,
T(r),直接地.如果 nlev 比 L 更少,那么 histeq 尝试分配那
水平以便 thcy 将会接近平坦的 histngram.不像 imhist,de-
histeq 的过失价值是 nlev=64 .大致上,我们使用最大值
nlev 的水平 ( 通常 256) 的可能数字因为这生产一
被仅仅描述的柱状图- 均等方法的真实落实.
图 3.8(一) 是花粉的一个电子显微镜图像,大概放大-
imately 700 次.以需要的提高口吻,最重要的 fea-
这一个图像的 tures 是它很黑暗并且有低的动态范围.这可能是
在图 3.8(b) 的柱状图中看到,在哪一个图像的黑暗性质是前任
pected 因为柱状图偏袒向灰色刻度的黑暗结束.
低的动态范围从 thefact 是显然的 "宽度" 那他的-
togram 是有关于整个的灰色刻度的狭窄部份.让 f 指示那
输入图像,步骤的下列各项序列生产了 Figs.3.8(一) 经过:(d)
>> imshow(f)
>> 演算,imhist(f)
>> ylim('汽车')
>> g=histeq;(f,256)
>> 演算,imshow(g)
>> 演算,imhist(g)
>> ylim('汽车')
图像在 300 dpi 以一口的格式被解救到磁盘片使用 imwrite,和那
情节同样地被输出到磁盘片使用被讨论的版功能在
第 2.4 节.
图 3.8(c) 的图像是柱状图结果相等的.那改良-
平均的强烈 ments 和差别相当显然.这些特征也
是显然的在这一个图像的柱状图中,在图 3.8 中显示.(d)
差别是由于在整个者上的柱状图的相当传布在-
紧张刻度.全部的强烈增加是由于事实平均
被图像相等的柱状图的强烈水平是比较高的 (点火者) 比较
最初者.虽然柱状图- 均等方法刚刚讨论
不生产一个平坦的柱状图,它有能够的被需要的特性
增加一个图像的动态范围的强烈水平.
如着名的更早地,变形只是动作 T(r) 是那累积的
使常态化的柱状图的总数评价我们能使用功能 cumsum 获得那
变形功能,如追从:
>> hnorm=imhist(f),/numel;(f)
>> cof=cumsum;(hnorm)