560 likes | 739 Views
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.
E N D
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
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
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 Dm, the maximum gray level.
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
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.
Nonlinear Monotonic Point Operations 1. Increase the midrange gray levels while leaving dark and light pixels little changed. (C=0.004, Dm=255)
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.
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.
POINT OPERATIONS AND THE HISTOGRAM • The output histogram , Approximation to the integral yields Solve the output histogram, we obtain
Let approaches zero, we have And thus
Examples • Linear Point Operation For linear point operation If then
Second-Order Point Operation A square-law point operation Input histogram Then Which is shown in the following figures
A Sigmoid Transformation Input histogram
General cases (some examples) Histograms of image Lenna after point operations
其它情形 • *若灰度变换函数存在0斜率,则输出直方图将产生尖峰; • *若灰度变换函数存在斜率无穷大,则输出直方图将部分区域扩展为一定宽度; • *若灰度变换函数不存在反函数,可以将输入直方图划为几段,然后输出直方图为几部分之和。
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.
Fig.1 Fig.2 Fig.3 Histogram of Fig.1 Histogram of Fig.2 Histogram of Fig.3
Equalization of Fig.1 Equalization of Fig.2 Equalization of Fig.3 Corresponding histograms
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
Photometric Calibration A point operation can be used to compensate for the effects of digitizer nonlinearity, the block diagram is shown below: Nonlinear image Calibrated image Linear image Film image Digitizer trans-formation Ideal digitizer Point operation A(x,y) B(x,y) C(x,y) f(D) g(D)
If • The Digitizer’s gray-scale transfer function f(D) can be measured.
Display Calibration • Can be done in a similar way as photometric calibration. • 光电转换特性 • Γ(gamma)校正 • 摄象机:γ=0.5 • 显示器: γ=2.5 • 人眼的生理特点 • 电影: γ=1.5 • 电视或计算机: γ=1.25 • 参考免费软件: gammalaunch
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).
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).
An example of GST for contrast enhancement s=T(r) s=T(r) Thresholding r r m m Dark Light Dark Light
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.
Power Law Transformations • Power law transformation • Gamma correction • Power law transformation are also useful for general-purpose contrast manipulation
Piecewise-linear transformation • Piecewise-linear transformation for contrast stretching (r2,s2) (r1,s1)
Summary of important points • Point operations transform the gray scale of an image • Point operations are useful for photometric calibration,display calibration,enhancement, and histogram modification. • A point operation is specified by the gray-scale transformation function that expresses the mapping between input and output gray-level values. • The histogram of an image following a specified point operation can be computed from a formula.
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
6 要点总结 • 1)点运算由输入象素灰度和输出象素灰度之间映射的灰度变换函数确定。 • 2)线性点运算可以改变数字图象的对比度。 • 3)线性点运算后的直方图由下式确定: • 4)数字图象均衡化的灰度变换函数可由累积分布函数确定: • 5)数字图象匹配的灰度变换函数由下列函数确定:
习题 • P.82第1题;
习题 • P.82第2题;
习题 • P.82第5题;