ref 13

Upload: charusree-thiagarajan

Post on 05-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Ref 13

    1/6

    A real-time contrast enhancement algorithm forinfrared images based on plateau histogram q

    Wang Bing-jian *, Liu Shang-qian, Li Qing, Zhou Hui-xin

    School of Technical Physics, Xidian University, Xian 710071, China

    Received 30 November 2004Available online 20 July 2005

    Abstract

    In this paper, a new self-adaptive contrast enhancement algorithm based on plateau histogram equalization forinfrared images is presented. By analyzing the histogram of image, the threshold value is got self-adaptively. Thisnew algorithm can enhance the contrast of targets in most infrared images greatly. The new algorithm has very smallcomputational complexity while still produces high contrast output images, which makes it ideal to be implemented byFPGA (Field Programmable Gate Array) for real-time image process. This paper describes a simple and effective imple-mentation of the proposed algorithm, including its threshold value calculation, by using pipeline and parallel compu-

    tation architecture. The proposed algorithm is used to enhance the contrast of infrared images generated from aninfrared focal plane array system and image contrast are improved significantly. Theoretical analysis and other exper-imental results also show that it is a very effective enhancement algorithm for most infrared images. 2005 Elsevier B.V. All rights reserved.

    Keywords: Self-adaptive plateau histogram equalization; Image enhancement; Small computational amount; FPGA; Real-time

    1. Introduction

    An infrared image is created from infrared radi-ation of objects and their backgrounds. Generallythe temperature difference between target objects

    and their background is small, and the tempera-ture of background is high, which result in the fact

    that most infrared images have highly bright back-ground and low contrast between background andtargets. In order to recognize targets correctlyfrom these images, good enhancement algorithmsmust be applied firstly. Gray stretch [1], histogramequalization [1,6,7] are general image enhancementalgorithms. And histogram equalization is a widelyused enhancement algorithm, in which the contrast

    1350-4495/$ - see front matter 2005 Elsevier B.V. All rights reserved.doi:10.1016/j.infrared.2005.04.008

    q Sponsored by National Natural Science Foundation ofChina (No. 60377034).* Corresponding author.

    E-mail address: [email protected] (B.-j. Wang).

    Infrared Physics & Technology 48 (2006) 7782

    www.elsevier.com/locate/infrared

    mailto:[email protected]:[email protected]
  • 8/2/2019 Ref 13

    2/6

    of an image is enhanced by adjusting gray levelsaccording to its cumulative histogram. Buthistogram equalization algorithm is not applicable

    to many infrared images, because the algorithmoften mainly enhances image background insteadof targets [2]. In an effort to overcome this prob-lem, Virgil E. Vichers and Silverman, proposedtwo new histogram-based algorithms: plateau his-togram equalization [3] and histogram projection[4,5], respectively. Plateau histogram equalizationhas been proven to be more effective, whichsuppresses the enhancement of background byusing a plateau threshold value. But the plateauthreshold value is an empirical value in generalwhich limits the algorithms practical usage. In

    this paper, a modification is made to plateau histo-gram equalization. By analyzing the histogram ofinfrared images, an estimated value of plateauthreshold value is got self-adaptively. This modi-fied algorithm is able to enhance the contrast oftarget objects in most infrared images more effec-tively than the original algorithm. It has very smallcomputational complexity while still produceshigh contrast output images, which makes it idealto be implemented by FPGA for real-time imagingapplications. This paper describes an implementa-

    tion of our proposed algorithm, including its pla-teau threshold value calculation by using pipelineand parallel computation architecture. The pro-posed algorithm has been used to enhance infraredimages generated from an infrared focal plane ar-ray system and the contrast of image has been im-proved significantly.

    2. The principles of self-adaptive plateau

    histogram equalization

    2.1. Plateau histogram equalization

    Plateau histogram equalization is a modifica-tion of histogram equalization, proposed by VirgilE. Vichers and Silverman. An appropriate thresh-old value is selected firstly, which is represented asT. A modification is made as follows, if the valueofP(k) is greater than T, then it is forced to equalT, otherwise it is unchanged, where P(k) is the his-togram of an image.

    PTk Pk; Pk 6 T;

    T; Pk > T;

    1

    where k represents the gray level of an image,

    0 6 k6 255. Then an image enhancement is madeby PT(k) as follows:

    FTk Xkj0

    PTj; 0 6 k6 255; 2

    DTk 255 FTk

    FT255

    ; 3

    where FT(k) is cumulative histogram of an image,DT(k) is the value of k after enhancement, andb c represents truncation to the next lower integer.While T equals to 1, previous enhancement algo-

    rithm is histogram projection, and while T equalsto Pmax(k), it is histogram equalization.

    2.2. Selection of self-adaptive plateau threshold

    value

    Selection of plateau threshold value is veryimportant in the infrared image enhancementalgorithm of plateau histogram equalization. Itwould have effect on the contrast enhancementof images. Appropriate plateau threshold value

    would greatly enhance the contrast of image. Inaddition, some plateau value would be appropriateto some infrared images, but not appropriate toothers. As a result, the plateau threshold valuewould be selected self-adaptively according to dif-ferent infrared images in the process of imageenhancement.

    It is known from Eq. (1) that when plateauthreshold value T is greater than the main peakvalue of histogram, for "k2 [0,255] PT(k) = P(k)plateau histogram equalization is histogram equal-

    ization in nature. So, the plateau threshold valuemust be less than the main peak value of histogramwhich is represented as P(kB) corresponds to back-grounds in image. At the same time, in order to en-hance targets greatly, the plateau threshold valuemust be greater than the peak value which is rep-resented as P(k0) correspond to targets in image.According to this principle, a new algorithm ofcalculating plateau threshold value is presentedin this paper. The processes of this algorithm areas follows:

    78 B.-j. Wang et al. / Infrared Physics & Technology 48 (2006) 7782

  • 8/2/2019 Ref 13

    3/6

    (1) Histogram P(k) of original image is counted,where 0 6 k6 255. And median filter of 3-neighbours is applied to histogram P(k).

    Then the nonzero units are selected from fil-tered histogram. And a new congrega-tion {F(l)j0 6 l6 L} are formed, where Lis the number of nonzero units in filteredhistogram.

    (2) Local maximum values and global maximumvalue of F(l) are found out by the followingmethod. Difference operation is applied toF(l), F(1)(m) = F(m) F(m 1), 1 6 m 6 L.A sub-congregation {F(li)} which satisfiesthe following conditions in the congregationF(l) is formed:

    (a) jF1mj 0.And F(li) are local maximum values, where0 6 li6 L, 0 6 i6 N, and N is the numberof local maximum values. The global maxi-mum value F(lk) is found out from F(li).

    (3) Median Fk is derived from sub-congregation{F(li)jk6 i6 N}. Then Fk is the plateauthreshold value which is evaluated.

    3. Hardware design and implementation

    FPGA (Field Programmable Gate Array) is alarge scale programmable logic device. It may be

    used in any digital logic systems. It has specialadvantages in real-time processing systems. It isnow widely used in data process, communication,

    industry control, instruments, military and naviga-tion fields etc. Here, EP1K100QC208 of AlteraAcex1k series is used. This device has internal 12EABs (Embedded Array Block). Every EAB con-sists of 4096 RAM bits. These features result inminiature circuit.

    The hardware configuration of self-adaptiveplateau histogram equalization includes histogramstatistics unit, plateau threshold value computa-tion unit, plateau histogram equalization unit,control unit, and three dual-ported RAMs.Fig. 1 illustrates this configuration. Data received

    from infrared camera are stored into externaldual-ported RAM1 (DRAM1). Control unit inFPGA generates addresses, control signals ofDRAM1, and reads data into FPGA. So the sta-tistical histogram can be gotten and written intodual-ported RAM2 (DRAM2). The plateauthreshold value can be derived from histogram.At last, a loop-up table is derived from plateauthreshold value and histogram. Then it is writteninto dual-ported RAM3 (DRAM3). The inputdata are used as the addresses of DRAM3, and

    the output data of DRAM3 are the enhanceddata. These data are converted to analog signal,formed into video signal, then sent to monitor tobe displayed. In Fig. 1, the control unit generates

    Histogram

    statistics

    Plateau

    value

    computation

    Plateau

    histogram

    equalizationDRAM2

    Image outDRAM1

    FPGA

    data

    address

    data

    address

    data

    address

    Plateau

    value

    Control unit

    DRAM3

    address

    data

    address

    Fig. 1. Hardware configuration of self-adaptive plateau histogram equalization.

    B.-j. Wang et al. / Infrared Physics & Technology 48 (2006) 7782 79

  • 8/2/2019 Ref 13

    4/6

    dual-ported RAM1 and other control signals inFPGA.

    In Fig. 1, plateau threshold value is derived bythe algorithm presented in this paper. Fig. 2 showsthe detailed hardware configuration of this algo-rithm. In Fig. 2, the decision unit decides whetherthe input value is local maximum value, and storesthe local maximum value into dual-ported RAM(DRAM) according to the result of differenceoperation unit. The maximum look-up unit findsout the global maximum value and its address inDRAM. The ordering unit finds out plateau valuefrom DRAM, and export it.

    There are two kinds of operation process corre-

    sponding to this hardware configuration. One uti-lizes the previous images histogram as the presentimages histogram according to strong correlationof serial images, then makes plateau histogramequalization. The other counts the present imageshistogram and makes plateau histogram equaliza-tion. The first one will lose the first image. Itcounts histogram during the period of imagedisplay, and reads the data in DRAM only once.Plateau value calculation and the generation ofloop-up table would be accomplished during dis-

    play of odd, even image. The second one will notlose any image. Histogram count, plateau valuecalculation and the generation of loop-up tablewill be accomplished during the field blank be-tween the ends of even field image display andthe start of odd field of next image display.

    To avoid losing image and long delay, thispaper employs the second method. Histogramcount, plateau threshold value calculation andthe generation of loop-up table are accomplishedduring the blank between two continuous images.

    The size of infrared image being processed is128 128. The frame rate is 25 frames per second.Monitor can display 625 lines. But the fieldblank occupies 50 lines. There leaves 575 validlines. And the displaying image only holds 128lines. So the field blank can be postponed to15.872 ms (millisecond). A crystal of 15 MHz(Megahertz) is selected. It takes approximately1093 ls (microsecond) to read 16k data fromexternal dual-ported ram, and approximately17 ls to count 256 data. So, it takes 1110 ls glob-ally to count histogram. Median filter, differenceoperation, maximum value finding, making deci-sion and writing data into dual-ported ram take

    approximately 18 ls. The number ordering takesno more than 1 ms. So it takes as long as 1018 lsto calculate plateau value. It is known that it takesas longest as 2128 ls to count histogram and gen-erate the last loop-up table from previous analysis.It is far less than the field blank between frames.

    Eq. (1) shows that when T is greater than themain peak value of histogram, plateau histogramequalization turns into histogram equalization,and when T equals to 1, plateau histogram equal-ization turns into histogram projection. So, by

    changing the value of T in Fig. 1, it will easilyimplement histogram equalization and histogramprojection.

    4. Results and analysis

    In this paper, images are enhanced by histo-gram equalization, self-adaptive plateau histogramequalization respectively. Then a comparison ismade between the original image and the enhanced

    Median

    filter

    Difference

    operation

    Decision

    unitDRAM

    Plateau

    value

    calculation

    unit

    Maximum value

    computation

    Histogramdata

    address

    data

    address

    data

    Plateau

    value

    Fig. 2. Hardware configuration of plateau value calculation.

    80 B.-j. Wang et al. / Infrared Physics & Technology 48 (2006) 7782

  • 8/2/2019 Ref 13

    5/6

    images. Figs. 3 and 4 show the original images, en-hanced images and their histograms.

    Fig. 3(a) is a glass half filled with hot water, andits contrast is low. Fig. 3(d) is the histogram of

    Fig. 3. (a) Original image; (b) enhanced image by histogram equalization; (c) enhanced image by plateau histogram equalization(T= 80); (d) histogram of image (a); (e) histogram of image (b); (f) histogram of image (c).

    Fig. 4. (a) Original image; (b) enhanced image by histogram equalization; (c) enhanced image by plateau histogram equalization(T= 64); (d) histogram of image (a); (e) histogram of image (b); (f) histogram of image (c).

    B.-j. Wang et al. / Infrared Physics & Technology 48 (2006) 7782 81

  • 8/2/2019 Ref 13

    6/6

    Fig. 3(a). The original histogram has three peaksthat respectively represent the background, theupper part and the nether part of the glass. And

    it is compact and only occupy a fraction of thewhole gray levels. Fig. 3(b) is the enhanced imageby histogram equalization. It is obvious fromFig. 3(b) that background and noises are enhancedmore greatly than the glass by histogram equaliza-tion. Fig. 3(e) is the histogram of image (b). InFig. 3(e), the first peak correspond to backgroundoccupy half of the gray levels, but the last peak cor-respond the nether part of glass only occupy a verysmall part of the gray levels. So the enhanced effectis bad. Fig. 3(c) is the enhanced image by self-adaptive plateau histogram equalization. The

    threshold value is 80 computed by the algorithmpresented in this paper. It is obvious that targetsare mainly enhanced and the background is sup-pressed. Fig. 3(f) is the histogram of image (c). InFig. 3(f), the major part of gray space is occupiedby the glass. So the image enhanced by self-plateauhistogram equalization is better than the imageenhanced by equalization histogram.

    Fig. 4 shows a ship in the sea and its enhancedimages by histogram equalization and self-adap-tive plateau histogram equalization. Fig. 4(a) is

    the original image. The whole images bright and

    contrast is low. Fig. 4(d) is the histogram of image(a). It is compact and only occupy a fraction of thewhole gray space. Fig. 4(b) is the enhanced imageby histogram equalization. The ship is too brightand the background of the sea surface and thesky are greatly enhanced. And they made oneuncomfortable. Fig. 4(e) is the histogram of image(b). In Fig. 4(e), the first peak correspond to back-grounds occupy approximately the whole gray lev-els, and the last peak in Fig. 4(c) disappeared in

    Fig. 4(e). So the backgrounds are mainly enhancedby histogram equalization. Fig. 4(c) is the en-hanced image by self-adaptive plateau histogramequalization. The threshold value of Fig. 4(c) is

    60 which is calculated by the algorithm proposedin this paper. Fig. 4(f) is the histogram ofFig. 4(c). In Fig. 4(f), the first peak only occupy

    a half of the gray space. The visual effect ofFig. 4(c) is best.

    5. Conclusion

    Infrared images can be enhanced effectively bythe algorithm proposed in this paper. It has advan-tages over histogram equalization. And the pla-teau threshold value can be self-adaptive selectedin this algorithm. By using pipeline and parallel

    computation architecture, the system can process25 frames of 128 128 8 bits infrared images inevery second. And the experimental results showthat the quality of enhanced image by self-adaptiveplateau histogram equalization is better than thequality of enhanced image by histogram equaliza-tion. It works well in the infrared image processsystem.

    References

    [1] J.Y. Zhang, Image Processing and Analysis, TsingHuaUniversity Press, 1999.

    [2] Zh.C. Liu, Zh.G. Li, A review on image process techniqueof thermal imager, Infrared Technol. 22 (6) (2000).

    [3] V.E. Vichers, Plateau equalization algorithm for real-timedisplay of high-quality infrared imagery, Opt. Eng. 35 (7)(1996) 19211926.

    [4] J. Silverman, Signal processing algorithms for display andenhancement of IR images, SPIE, 1993.

    [5] J. Silverman, Display and enhancement of infrared images,in: M.A. Karim (Ed.), Electro-Optical Displays, New York,1992, pp. 585651 (Chapter 15).

    [6] S.S.Y. Lau, Global image enhancement using local infor-

    mation, Electron. Lett. 30 (2) (1994).[7] J. Alex Stark, Adaptive image contrast enhancement using

    generalizations of histogram equalization, IEEE Trans.Image Process. 9 (5) (2000).

    82 B.-j. Wang et al. / Infrared Physics & Technology 48 (2006) 7782