Download presentation
Presentation is loading. Please wait.
Published byMelanie Merritt Modified over 9 years ago
1
Chapter 6 Point Operations INTRODUCTION A point operation takes a single input image into a single output image in such a way that each output pixel ’ s gray level depends only on the gray level of the corresponding input pixel. Contrast enhancement, contrast stretching, gray-scale transformation(GST). A point operation my be expressed as
2
Applications of Point Operations Photometric Calibration Remove the effects of image sensor nonlinearity Contrast Enhancement A point operation might be used to expand the contrast of the features of interest in an image. Display Calibration One may employ a point operation to ensure that the features of interest fall into the maximum- visibility range of the display Compensating the nonlinearity of display devices Gamma of Television CRT monitors
3
Contour Lines A point operation can add contour line to an image.This is useful for defining boundaries or for making mask for subsequent operations. Clipping Set negative values to zero and limits positive values to D m, the maximum gray level.
4
Types of Point Operations Linear Point Operations Some special cases of linear point operations:, identity operation, copying A into B. If, the contrast will be increased
5
If, the contrast will be reduced. If and b is nonzero, the operation merely shifts the gray level values of all pixels up or down. If, the image is complemented.
6
Nonlinear Monotonic Point Operations 1. Increase the midrange gray levels while leaving dark and light pixels little changed. (C=0.004, D m =255)
7
2. Sigmoid (S-shape) GST has slope greater than 1 in the midrange and less than 1 towards the end. This GST can increase the contrast within midrange objects at the expense o light and dark objects.
8
3. GST has slope less than 1 in the midrange and greater than 1 near the ends. With the opposite effect on images to S-shape GST.
9
Some examples
12
POINT OPERATIONS AND THE HISTOGRAM The output histogram, Approximation to the integral yields Solve the output histogram, we obtain
13
POINT OPERATIONS AND THE HISTOGRAM
14
Let approaches zero, we have And thus
15
Examples Linear Point Operation For linear point operation If then
16
Input histogram Output histogram
17
Example 1:Lenna
18
213≈1.2*138+50
19
Second-Order Point Operation A square-law point operation Input histogram Then Which is shown in the following figures
20
Input histogram Output histogram
21
Example 2
22
A Sigmoid Transformation Input histogram
24
General cases (some examples) Histograms of image Lenna after point operations
25
其它情形 * 若灰度变换函数存在 0 斜率,则输出直方图将产生尖 峰; * 若灰度变换函数存在斜率无穷大,则输出直方图将 部分区域扩展为一定宽度; * 若灰度变换函数不存在反函数,可以将输入直方图 划为几段,然后输出直方图为几部分之和。
26
Applications of point operations Histogram equalization Based on the relation between histogram and point operation, the equation will make the output histogram flat with number of pixels equal to, and this leads to Where P(D) is the CDF of the image.
28
Examples of histogram equalization
29
Fig.1Fig.2Fig.3 Histogram of Fig.1Histogram of Fig.2Histogram of Fig.3
30
Equalization of Fig.1Equalization of Fig.2Equalization of Fig.3 Corresponding histograms
31
Histogram Matching Make the histogram of an image A(x,y) to match a specified functional form or that of another image C(x,y) This can be done in two steps: A(x,y) B(x,y) C(x,y), where B(x,y) has flat histogram. We have
32
Photometric Calibration A point operation can be used to compensate for the effects of digitizer nonlinearity, the block diagram is shown below: Ideal digitizer Digitizer trans- formation Point operation Film image Linear image Nonlinear image Calibrated image A(x,y)B(x,y)C(x,y) f(D)g(D)
33
If The Digitizer ’ s gray-scale transfer function f(D) can be measured.
34
Display Calibration Can be done in a similar way as photometric calibration. 光电转换特性 Γ ( gamma )校正 摄象机: γ=0.5 显示器: γ=2.5 人眼的生理特点 电影: γ=1.5 电视或计算机: γ=1.25 参考免费软件: gammalaunch
35
Appendix: Image Enhancement in the Spatial Domain Image enhancement is to process an image so that the result is more suitable than the original image for a specific application. A general form of a spatial domain process is expressed as Where n() is a neighbor of pixel A(x,y), when n() is the neighbor, the transform is reduced to a point operation or a gray-scale transformation (GST).
36
When n() takes a larger neighbor than, the enhancement technique is often referred to as mask processing or filtering. The neighbor is called a mask (or a filter, a template).
37
An example of GST for contrast enhancement DarkLightDarkLight mm Thresholdings=T(r) rr
38
Some basic GST used for image enhancement Log transformation s=clog(1+r) The Log transformation maps a narrow range of low gray-level values in the input image into a wider range of output levels, and the opposite is true of higher values of input levels. Expanding the values of dark pixels while compressing the values of light pixels.
40
Display Fourier spectrum by a Log transformation
41
Power Law Transformations Power law transformation Gamma correction Power law transformation are also useful for general-purpose contrast manipulation
42
Power law transformations with different gamma
43
An example of display gamma correction
44
Piecewise-linear transformation Piecewise-linear transformation for contrast stretching (r 1,s 1 ) (r 2,s 2 )
45
Summary of important points 1. Point operations transform the gray scale of an image 2. Point operations are useful for photometric calibration,display calibration,enhancement, and histogram modification. 3. A point operation is specified by the gray- scale transformation function that expresses the mapping between input and output gray-level values. 4. The histogram of an image following a specified point operation can be computed from a formula.
46
5. A linear point operation can only stretch or compress the histogram and shift it right pr left. 6.The cumulative distribution function (normalized area function) is the point operation that flattens the histogram. 7.The histogram of an image can be brought into a a desired form by the concatenation of a point operation that flattens the original histogram, followed by the inverse of one that flattens the desired histogram
47
6 要点总结 1 )点运算由输入象素灰度和输出象素灰度之间映射的灰 度变换函数确定。 2 )线性点运算可以改变数字图象的对比度。 3 )线性点运算后的直方图由下式确定: 4 )数字图象均衡化的灰度变换函数可由累积分布函数确 定: 5 )数字图象匹配的灰度变换函数由下列函数确定 :
48
习题 P.82 第 1 题;
49
习题 P.82 第 2 题;
50
习题 P.82 第 5 题;
51
习题 P.82 第 6 题;
52
上机实习 1 )应用 MATLAB 软件提供的函数,编制读取 BMP 文件, 并使其直方图均衡化 ( 请勿直接调用 histeq 函数 ) ,并存 为另一幅 BMP 文件。然后使用 MATLAB 本身提供的直 方图均衡化函数,判别自编程序与该函数的区别。 2 )应用 MATLAB 软件提供的函数,编制读取 BMP 文件, 并使其直方图匹配的函数。
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.