Research and Implementation of Digital Image Enhancement Algorithms

From the viewpoint of technique orientation, this article has realized several image enhancement techniques, which have been proved to be effective, by means of Delphi8.0 language. The experiment indicated that this procedure may be fast and accurately carried on the gradation transformation to the gradation picture and center the value filter and that can make the picture contrast gradient strengthened, the noise eliminated and the picture quality was improved.


Introduction
Image enhancement processing is related with a series of techniques to improve information of the focused region, weaken or remove the unnecessary information, or even to convert the whole image into more suitable information model for human and machine postprocessing such as perception, analysis and recognition in the special application fields.Given that various external factors like illumination and sensor resolution have an impact on images, the original image obtained may suffer from blurred edges or reduced local or global contrast to a certain degree [1] .Thus, a good image enhancement algorithm should be able to deblur edges, improve the contrast, and effectively suppress noises of images so that the processed images are made more suitable for human eye observation or machine analysis processing.

Gray Transformation
Gray transformation, as an important image enhancement method, enjoys the advantage of accentuating image features by broadening the dynamic range of the image and increasing the contrast while maintaining spacial relations in the image [2] .Gray scale transformation can be denoted by g(x,y)=T[f(x,y)].

Linear Transformation
Increasing contrast is a relatively simple method which can be achieved through the linear transformation of tonal range.Suppose the gray scale range of the original image f(x,y) is [a,b] and the gray scale range of the image obtained after transformation is expected to be enlarged to [c,d].Then, the following linear transformation can be used to achieve this target: This linear transformation is able to forcibly transform pixels whose gray scale values are smaller than a into ones with the gray scale value of b and transform pixels whose gray scale values are larger than b into ones with the gray scale value of d.
Implementation steps of the algorithm are described as follows.First, define the original image fxy and the obtained image gxy after linear transformation as a twodimensional array, respectively [3] .Then, call the image gray scale solving procedure and linear transformation procedure: procedure initfxy; procedure initxbh; During the linear transformation, a = 65, b=100, c=0, d=255 are used; both rows and columns start looping from 0 to 255.If the tonal range of the original image is in a≤fxy≤b, then the image gxy=c+[(c-d)/(b-a)][f(x, y)-a] is the output; if fxy<a, then gxy=c; if fxy>b, then gxy=d.Finally, the transformed image gxy is displayed.Figure 1 is the original image.Figure 2 is the image obtained after linear transformation.

Piecewise Linear Transformation
Piecewise linear transformation can be used to accentuate the tonal range where the interested object resides in and suppress the uninterested tonal range.Suppose that the original image f(x,y) is in [0,Mf], the tonal range of the interested object is [a,b] which is expected to be enlarged to [c,d].The mathematical expression of this transformation is as follows: First, define the original image fxy and the obtained image gxy after piecewise linear transformation as a twodimensional array, respectively. [3] [4]: Then, call the image gray scale solving procedure and piecewise linear transformation procedure.

Nonlinear Transformation
Certain nonlinear functions like exponential functions and logarithmic functions can be used as mapping functions to implement nonlinear transformation of image gray scale [5] .

Logarithmic Transformation
The general expression of logarithmic transformation is where a, b and c are parameters introduced for adjusting the position and shape of the curve.When the lower gray scale area is expected to be significantly stretched while higher gray scale area is expected to be compressed, logarithmic transformation can be used to make the gray scale distribution compatible with human visual characteristics.

Exponential Transformation
The general expression of exponential transformation is Parameters a, b and c are used to adjust the position and shape of the curve.This transformation is able to significantly stretch the higher gray scale area of an image.Figure 4 shows the image obtained after nonlinear transformation.

Histogram Equalization
Histogram equalization is one of the most frequently used and important image enhancement spatial domain methods.Histogram equalization revises the histogram of the original image into one with evenly distributed gray scale by using the gray scale transformation function and then revises the original image according to this obtained histogram [6][7][8] .
Histogram equalization is a histogram modification method based on cumulative distribution function transformation.Suppose that the transformation function is where ω is the integration variable while T(r) is r's cumulative distribution function.The cumulative distribution function here is a function of r, which monotonically increases from 0 to 1.So this transformation function meets the condition that the monodromy of T(r) monotonically increases in 0≤r≤1.It can be proved that using the cumulative distribution function of r as the transformation function can produce an image with evenly distributed gray scale and probability density.As a result, the dynamic range of pixel values has been expanded.The image enhancement technology for the purpose of obtaining an even histogram is called histogram equalization processing or histogram linearization processing.The cumulative distribution function can be expressed in the discrete form as:

Median Filtering
Noise jamming of a certain degree exists in any original image.Eliminating these noises is known as image filtering.The purpose of image filtering is to improve the image quality and to make it ready for feature extraction [8][9][10] .Median filtering is an edge-preserving algorithm with excellent performance.Median filtering replaces local average with the local median.Suppose that [f(x,y)] represents a digital image array, the value of f(x,y) represents gray scale.Then, the image obtained after median filtering is [g(x,y)], where g(x,y) is the median of gray scales of all pixels covered by the N×N window with (x,y) as its center point.The distribution of gray scale values of the first small area in the image is shown as follows: a1 a2 a3 a4 a5 a6 a7 a8 a9 The new value of Point a5 after median filtering is equal to the fifth numerical value after the sequencing.The image processed by median filtering is then displayed.Figure 6 is an example of median filtering.

Conclusion
Image enhancement is an essential link in image processing.The three image enhancement methods discussed above are fundamental.In practice, the problems of images must be analyzed first before deciding which method or group of methods should be used for image enhancement.