Научная статья на тему 'An improved gray-scale transformation method for pseudo-color image enhancement'

An improved gray-scale transformation method for pseudo-color image enhancement Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
450
294
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
pseudo-color image enhancement / gray-scale transformation / contrast ratio.

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Haibo Gao, Wenjuan Zeng, Jifeng Chen

Image enhancement is a very important process of image preprocessing and it plays a critical role in the improvement of image quality and the follow-up image analysis, which makes the research of image enhancement algorithm a hot research field. Image enhancement not only needs to strengthen image determination and recognition, but also needs to avoid the consequential color distortion. Pseudo-color enhancement is the technique to map different gray scales of a black-and-white image into a color image. As humans have extremely strong ability in distinguishing different colors visually and relatively weak capacity in discriminating gray scales, so, color the gray-scale changes which cannot be differentiated by human eyes so that they can tell them apart. The mapping function in conventional gray-scale transform method is not working well in dark and low-contrast images. So, this paper comes up with an improved gray-scale transformation algorithm. This algorithm can achieve the enhancement, preserve the image colors, process dark and low-contrast images, reinforce the enhancement and improve the blocking effect. The experiment proves that the enhanced image obtained by the method of this paper can have improved average brightness, natural colors and more detail information and it has good application value.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «An improved gray-scale transformation method for pseudo-color image enhancement»

An improved gray-scale transformation method for pseudo-color image enhancement

H. Gao1, W. Zeng1, J. Chen1

1 College of Information Science & Engineering, Hunan International Economics University, Changsha 410205, China

Abstract

Image enhancement is a very important process of image preprocessing and it plays a critical role in the improvement of image quality and the follow-up image analysis, which makes the research of image enhancement algorithm a hot research field. Image enhancement not only needs to strengthen image determination and recognition, but also needs to avoid the consequential color distortion. Pseudo-color enhancement is the technique to map different gray scales of a black-and-white image into a color image. As humans have extremely strong ability in distinguishing different colors visually and relatively weak capacity in discriminating gray scales, so, color the grayscale changes which cannot be differentiated by human eyes so that they can tell them apart. The mapping function in conventional gray-scale transform method is not working well in dark and low-contrast images. So, this paper comes up with an improved gray-scale transformation algorithm. This algorithm can achieve the enhancement, preserve the image colors, process dark and low-contrast images, reinforce the enhancement and improve the blocking effect. The experiment proves that the enhanced image obtained by the method of this paper can have improved average brightness, natural colors and more detail information and it has good application value.

Keywords: pseudo-color image enhancement, gray-scale transformation, contrast ratio.

Citation: Gao H, Zeng W, Chen J. An improved gray-scale transformation method for pseudocolor image enhancement. Computer Optics 2019; 43(1): 78-82. DOI: 10.18287/2412-6179-2019-43-1-78-82.

Acknowledgments: This work was supported in part by Hunan Provincial Education Science five-year plan funded project(No:XJK014BGD046) and 2017 Hunan Education Department Scientific Research Project (NO:17B151, 17C0900,17C0899).

1. Introduction

Image enhancement is mainly aimed to make image after being processed more suitable for human visual system or computer recognition system so as to enhance the reorganizability of the image. Pseudo-color image processing is to change the black and while gray scales into different colors. If more layers are separated, more information human eyes can extract so as to achieve image enhancement. This is a kind of image enhancement technique which leads to significant visual effect and which is not very complex. The pseudo-color enhancement methods mainly include gray-scale stratification method, grayscale-pseudo-color transformation method, frequency-domain filtering method and so on [1]. The display of color image relies on three basic elements: brightness, contrast and color. Among the above-mentioned methods, the pseudo-color processing method of gray-scale-pseudo-color transformation method is to turn gray-scale image into continuous color image with multiple color gradients. This method first introduces gray-scale image into three transformation matrixes: red, green and blue with different transformation characteristics. Then, it sends different outputs of these three matrixes into the red, green and blue of the color imaging matrix respectively. Finally, it mixes into a certain color. It performs different transforms on the same gray scale with three transformation matrixes and leads to different outputs so that the gray scales with different sizes can be combined into different colors. The image transformed by this method has excellent visual effect. As the use of color

image is becoming more and more popular, color image enhancement technique is also becoming more and more important and many processing techniques based on grayscale image are also improved to meet the requirements of color image processing [2, 3].

Common image enhancement processing approaches include gray-scale transformation, histogram modification, image sharpening, de-noising, geometric distortion correction, frequency-domain filtering and color enhancement. The applications of image enhancement algorithms are well targeted and there is not a universal enhancement algorithm fit for various applications. Generally, image enhancement improves the image contrast, which involves detail definition. Image enhancement, according to its action scope, can be divided into spatial domain enhancement and transformation domain enhancement [4]. The former includes various filter techniques such as histogram equalization, specification processing and difference equation and the latter can be divided into DCT domain, DFT domain and wavelet domain according different action scopes. Most of early gray-scale image enhancement only performs stretch processing on contrast. With the diversified development of image applications, although conventional enhancement technology has improved the image quality to some extent, its applications have also met some restrictions. For a long time, pseudo-color technology hasn’t been applied to such related fields as image processing. Traditional pseudo-color processing method has a low resolution and insufficient color sensitivity, so it cannot meet the users’ requirements [5], [6]. Therefore, this paper has

improved the conventional pseudo-color image enhancement, made research on the image after being conducted with pseudo-color enhancement from perspectives of details of object and comfort of human eyes and drawn some valuable conclusions.

This paper is mainly about pseudo-color image enhancement. While stating the basic image enhancement methods, this paper makes study and comparison on several typical pseudo-color image enhancement methods, analyzes their different strengths and weaknesses and enhances the resolution by performing pseudo-color transformation on gray-scale image as human eyes have a lower resolution on gray-scale image than color image. But conventional pseudo-color technology works just soso on enhancing the detail information of the image. Therefore, this paper has proposed an improved grayscale transformation method and explained the characteristics of this algorithm. The final experiment result has proven that the method of this paper is very effective, that it has excellent visuality and that it has enhanced the definition of the image details.

2. Pseudo-color image enhancement method

There are several pseudo-color processing techniques, including gray-scale stratification method, gray-scale-pseudo-color transformation method and frequency-domain filtering method.

2.1. Grav-scale stratification method

Gray scale is the most direct visual feature to describe the content of gray-scale image. it refers to the color depth of the pixels in black-and-white image, ranging from 0 to 255 with white as 255 and black as 0. The numbers in the middle represent the intermediate colors from black to white, i.e. different gray scales. A monochromatic gray-scale image is divided into different regions according to the gray scales and every region is given a color so as to achieve stratified display. Grayscale stratification method is to divide the gray scales of a gray-scale image into N regions 1(1 = 1, 2,...,N) from 0 (black) to M0 (white), assigns a color Ci to every region and turns a gray-scale image into a pseudo-color image. By stratifying the monochromatic image according to its gray-scale value, it divides it into different regions (the size of the region can be adjusted at will) and assigns new colors to every region so that some detail differences can be highlighted in different regions[ 7].

Assume that the gray-scale range of the original black-and-white image is

0 < f (x, y)< L.

Divide this range into k regions with (k + 1) gray scales

I0, I1,..., IkI0 = 0 (black ), Ik = L (white).

Map every region into one color and the mapping relationship is

g (x, y) = ci (I (i-1)< f (x, y)< I (i); i = 1, 2...k). (1)

Here, g(x, y) is the output pseudo-color image and Ci is the color mapped by the gray scale in [I(i - 1), I(i)]. After such mapping, the original black-and-white image f (x, y) has become a pseudo-color image g(x, y). If the gray scales of the original image f (x, y) are distributed throughout the foregoing k gray-scale regions, then the pseudo-color image g(x, y) has k colors [8].

2.2. Gray-scale-pseudo-color transformation method

According to the principle of colorimetry, divide the gray-scale range of the original image f (x, y) into multiple regions and turns it into three primary colors 1R (x, y), 1G (x, y) and 1B (x, y) after three different transformations of red, green and blue: TR, TG and TB. Then, use them to control the red, green and blue in the color display and

combine into a color image device [9]. Fig.1 is a group scale-color transformation.

Mw)

a) 0 L/2 L f(xy)

/в(х,у)

in the screen of color display of transfer function of gray-

fa(x,y)

Fig. 1. Transfer functions of grayscale-color transformation

The (a), (b) and (c) in Fig. 1 represent the transfer functions of red, green and blue and (d) is to combine all three color transfer functions. It can be seen from (a) that the pixels with a gray scale smaller than L / 2 will be transformed into dark red as many as possible while those with a gray scale ranging from L / 2 to 3L / 4 are the linear transformations from dark red to bright red. All pixels with a gray scale bigger than 3L / 4 will be transformed into the brightest red. Through the above mapping transformation curves, the gray-scale image can be colored. Finally, add the value of every pixel obtained through three channels and perform pseudo-color processing on every pixel. At the end, get the pseudo-color image [9], [10].

2.3. Frequency-domain filtering method

All the images we can see are the representation in spatial domain and we cannot recognize the images in frequency domain. To perform filtering in frequency domain, first it requires Fourier transform. Second, it directly performs filtering. Finally, it changes back to the spatial domain with inverse Fourier transform. Frequency-domain filtering method is to transform the image from the space or the spatial domain into the frequency domain, in which different filters can be constructed. In the frequency domain, use three filters with different transfer characteristics to separate into three independent

components. Then, perform inverse Fourier transform, obtain three monochromatic images which represent different frequency components and perform further processing on these three images. Finally, add them to the red,

green and blue display channels as three primary color components respectively and obtain a color image [11].

The following Fig. 2 is pseudo color images of MacBook Pro x-ray scanning diagram.

(a)

(b)

(c)

Fig. 2. Pseudo color images of MacBook Pro x-ray scanning diagram

3. An improved gray-scale transformation method for pseudo-color image enhancement

Each pixel value of the image is actually an index or code, the code value as the color look-up table CLUT (Color Look-Up Table) in one of the entrance of the address, according to this address, it can find out the intensity values that include the actual R, G, and B. CLUT is a pre - made table, and the entry address of the table item is also called the reference number. There is a transformation relationship between the pixel value of the color image itself and the cord number of the CLUT, which can be defined by a defined transformation relationship. The color displayed by the found value is true, but not the real color of the image itself. Assume that a gray-scale image f (x, y) can be seen as a density function of coordinate (x, y). Divide the gray of the image into several scales; in other words, segment this density function with some planes parallel with the coordinate plane in the intersecting area. For example, divide it into N regions Lb L2,...,Ln and distribute a color to every region. In another word, assign a color Ci (i = 1, 2,., N) to every grayscale region to turn the gray-scale image into a pseudocolor image with N colors.

The pseudo-color transformation in gray-scale transformation method is to put the gray-scale image f (x, y) into three transformation matrixes: red, green and blue with different transformation characteristics and then send the different outputs of these three matrixes to red, green and blue formulas respectively. According to the principle of colorimetry, any color can be combined with proper ratios of three primary colors: red, green and blue. So, pseudo-color processing generally can be described as R( x, y) = TR [ f (x, y)]'

G(x, y) = Tg [ f (x, y)] >. (2)

B( x, y) = Tb [ f (x, y)] ^

The following formulas indicate the color value of R, G and B channels of R (x, y), G (x, y) and B (x, y) and f (x, y) represents the gray-scale value of the gray-scale image of a specific pixel.

When 0 < f< 63,

R (x,y) = 0, G(x,y) = 4 f (x,y), B(x,y) = 255. (3) When 64 < f< 127,

R (x, y) = 0, G (x, y) = 255,

B ( x, y ) = 511 - 4 f (x, y). (4)

When 128 <f< 191,

R(x,y) = 4f (x,y)-511, G(x,y) = 255,

B (x, y ) = 0. (5)

When 191 <f< 255,

R(x,y) = 255, G(x,y) = 1023 -4f (x, y),

B (x, y ) = 0. (6)

Here, f (x, y) is the gray-scale value of the original image while Tr[ f (x, y)], Tg[ f(x, y)], Tb[ f(x, y)] represent the mapping relations between the value of three primary colors and the gray-scale vale respectively and R (x, y), G (x, y), B (x, y) are the numerical values of three components: red, green and blue of the pseudo-color image.

Formula (2) - (6) shows that transformation method is to realize three independent transforms on the input image gray-scale value and maps into three primary color value: red, green and blue of different sizes to produce corresponding color display. The mapping relationship Tr[ f (x, y)], Tg[ f (x, y)], Tb[ f (x, y)] can either be linear or non-linear. Red transformation maps any gray scales lower than L / 2 into the darkest red. Red input increases linearly within the range of L / 2 ~ 3L / 4. The gray scales within the range of 3L / 4 ~ L remain the same, equal to the brightest red. Other color mapping can also be explained with similar methods. If f (x,y) = 0, then fR (x,y) =fG (x,y) = 0, fB (x, y)=L and blue is displayed, if f (x, y)=L / 2, then fR (x, y) =fB (x, y) = 0, fG (x, y) = L and green is displayed and if f (x,y) = L, fR (x,y) = L, fR (x,y) =f (x,y) = 0 and red is displayed. Therefore, it can be seen that the pure primary colors can only be mapped in both ends and the exact center of the gray-scale axis.

Pseudo color is generally used in the display mode below 65K color, the standard color palette is to select 16 or 256 colors evenly in the 256K chromatogram. Some images tend to be biased toward one or several hue, and if the standard palette is used, the color distortion is more. Therefore, for the same image, the use of different palette may shows that different color effects.

4. Experimental test

The contrast of an image greatly affects the quality of the image. A contrast which is too big or too small may lead to unclear image details and variance contrast can re-

flect the subjective feeling of contrast of complex image. While observing the variance contrast of the image, we can evaluate the enhancement by integrating the average brightness of the image. r, g and b are the matching coefficients of these three components respectively. By adjusting the coefficients, we can control the colors and brightness of the processed pseudo color and obtain the pseudo-color image of different color keynotes. Fig.3 and Fig.4 below are the pseudo-color images transformation of the same image under different matching coefficients.

(a)

(b)

(c)\

I (d)

Fig. 3. Improved pseudo-color transformation result 1: (a) Original image, (b) r = 1, g (c) r = -1, g = -0.5, b = 0.8, (d) r = -1, g = 1, b = 0.5

=-1, b = 0.5,

(a) I

(b)

(c)

I (d)

Fig. 4. Improved pseudo-color transformation result 2: (a) Original image, (b) r = 1, g -(c) r = -1, g = -0.5, b = 0.8, (d) r = -1, g = 1, b = 0.5

-1, b = 0.5,

It can be found from the results of Fig. 3 and Fig. 4 that the colors in (b) are a little bit red, and colors in (c) are a little bit blue, the chromaticity in (d) change the least, (b) and (c) have more changes in its chromaticity and they has preserved their colors better with significant changes in the brightness and contrast and outstanding details. In visual effect, the images have bright colors, proportionate contrast and brightness and well-preserved chromaticity. Therefore, it can be concluded that if proper parameter setting is selected, the processed image quality has been improved to a certain degree and the information increased compared with the original image. It has not only obtained a clear color image, but also better preserved its colors. Meanwhile, while enhancing the global brightness, it can also suppress the bright part of the image and overcome the vignetting effect. The image has clear details and has no color distortion and the operational efficiency is also improved.

5. Conclusion

In the image processing, image enhancement technology has played a significant role in improving the image quality. It selectively emphasizes certain information of the image and suppressing other information so as to improve the visual effect of the image. Pseudo-color enhancement refers to the technology to transform different

gray scales of black-and-white image into different colors according to linear or non-linear mapping functions and obtain a color image. This paper has proposed an improved gray-scale transformation method for image enhancement to overcome the defects in pseudo-color image enhancement. While performing color image enhancement, this method conducts the processing in RGB space and improves color missing to a large extent. Through experiment and analysis, it can be found that the improved algorithm can obtain better image enhancement on most dark images.

References

[1] He Z, Shen Y, Wang Q. Boundary extension for Hilbert-Huang transform inspired by gray prediction model. Signal Processing 2012; 92(3): 685-697. DOI: 10.1016/j.sigpro.2011.09.010.

[2] Hu S, Xu C, Guan W, Tang Y, Liu Y. Texture feature extraction based on wavelet transform and gray-level cooccurrence matrices applied to osteosarcoma diagnosis. Bio-Medical Materials and Engineering 2014; 24(1): 129143. DOI: 10.3233/BME-130793.

[3] Jan F, Usman I, Khan SA, Malik SA. Iris localization based on the Hough transform, a radial-gradient operator, and the gray-level intensity. Optik 2013, 124(23): 59765985. DOI: 10.1016/j.ijleo.2013.04.116.

[4] Zhang Chao, Sun Changming, and Su Ran et al. Clustered nuclei splitting via curvature information and gray-scale

distance transform. J Microsc 2015; 259(1): 36-52. DOI: 10.1111/jmi.12246.

[5] Bergues GJ, Canali L, Schurrer C, Flesia AG. Sub-pixel gray-scale though transform for an electronic visual interface. IEEE Latin America Transactions 2015; 13(9): 31353141.

[6] Khalil K, Mahdi D. Identification of vibration level in metal cutting using undecimated wavelet transform and gray-level co-occurrence matrix texture features. Proceedings of The Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture 2015; 229(2): 205213. DOI: 10.1177/0954405414526577.

[7] Rajput UK, Ghosh SK, Kumar A. Multi-sensor satellite

pan-sharpening based on IHS and window pseudo Wigner distribution integrated approach: Application to WorldView-2 imagery. International Journal of Image and Data Fusion 2016; 7(2): 119-147. DOI:

10.1080/19479832.2015.1135828.

[8] Lo TY, Sim KS, Tso CP, Nia ME. Improvement to the scanning electron microscope image adaptive canny optimization colorization by pseudo-mapping. Scanning 2014; 36(5): 530-539. DOI: 10.1002/sca.21152.

[9] Kavurmaci SS, Bekbolet M. Non-selective oxidation of humic acid in heterogeneous aqueous systems: a comparative investigation on the effect of clay minerals. Environmental Technology 2014; 35(18): 2389-2400. DOI: 10.1080/09593330.2014.906508.

[10] Pan L, Yunjun Y, Weijian C, Duan Y. Magnetic resonance perfusion imaging evaluation in perfusion abnormalities of the cerebellum after supratentorial unilateral hyperacute cerebral infarction. Neural Regeneration Research 2012; 7(12): 906911. DOI: 10.3969/j.issn.1673-5374.2012.12.005.

[11] Doi R. Improved discrimination among similar agricultural plots using red-and-green-based pseudo-colour imaging. International Agrophysics 2016; 30(2): 151-163. DOI: https://doi.org/10.1515/intag-2015-0086

Authors’ information

Haibo Gao (b. 1979) graduated from Central South University in 2007, majoring in Computer Application Technology. Currently, he is an associate professor of Hunan International Economics University, China. His research interests include computer graphics processing,information security and algorithm research and analysis.

Wenjuan Zeng (b. 1979) received the Master's degree in Computer and Communication, Hunan University, China in 2009. Currently, she is an assistant researcher of Hunan International Economics University, China. His research interests include information security, image processing and algorithm research and analysis.

Jifeng Chen (b. 1966) graduated from Xi 'an Jiaotong University with a doctor's Degree in Computer Science in 2006. Currently he is with the College of Information Science and Engineering, Hunan International Economics University, China. His research interests include software testing and algorithm research and analysis.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Received October 25, 2018. The final version - January 03, 2019.

i Надоели баннеры? Вы всегда можете отключить рекламу.