國 立 交 通 大 學
電 控 工 程 研 究 所
碩 士 論 文
近紅外線影像之非均勻校正與壞點修復
Non-Uniformity and Bad Pixel Correction for NIR image
研 究 生 : 彭 彥 凱
指 導 教 授: 張 志 永
近紅外線影像之非均勻校正與壞點修復
Non-Uniformity and Bad Pixel Correction for NIR image
學 生 : 彭彥凱 Student : Yen-Kai Peng
指導教授 : 張志永 Advisor : Jyh-Yeong Chang
國立交通大學
電機工程學系
碩士論文
A Thesis
Submitted to Department of Electrical Engineering
College of Electrical and Computer Engineering
National Chiao-Tung University
in Partial Fulfillment of the Requirements
for the Degree of Master in
Electrical and Control Engineering
July 2012
Hsinchu, Taiwan, Republic of China
中 華 民 國 一百零一 年 七 月
近紅外線影像之非均勻校正與壞點修復
學生:彭彥凱 指導教授: 張志永博士
國立交通大學電機與控制工程研究所
摘要
摘要
摘要
摘要
本論文使用非均勻校正(NUC)與壞點修正演算法修正近紅外線影像。在非均 勻現象上,我們採用了 2 點式校正與最小平均平方法,此 2 種方法分別為非均勻 校正中主要使用的 2 大類:基於參考平面與基於環境 2 種方式,兩點校正是一個 高度精確的方法,不幸的是,他需要精密的儀器來測量參考圖像;最小平均平方 法不需使用參考圖像,但演算法之速度難以使用在即時影像中,我們將測試並分 析 2 種演算法。
為了提高壞點校正效能,我們使用改進基於同儕濾波器(peer group filter) 之壞點修正法。在紅外線焦平面探测器所偵測影像中,經常出現團狀之壞點,我 們必須執行一種特別的影像校正法。我們採用可自動調整濾波器遮罩大小來修正 團狀之壞點。我們預設使用之濾波器遮罩大小為 3×3 之遮罩,可以盡可能的保持 圖像清晰度;在遇到無法修正之壞點時,濾波器遮罩之大小將會自動增加,以提 高修正能力。通過這項計劃,它是更準確地找出壞像素,將由同儕濾波器的中值 取代壞點。
Non-Uniformity and Bad Pixel Correction for NIR
image
STUDENT: Yen-Kai Peng ADVISOR: Dr. Jyh-Yeong Chang
Institute of Electrical and Control Engineering National Chiao-Tung University
ABSTRACT
In this thesis, we use non-uniformity correction (NUC) and bad pixel correction to correct infrared image of a NIR sensor. We employ Two-point calibration and Least Mean Squares method, there are mainly used two categories of the calibration for non-uniformity correction, reference-based and scene-based correction algorithm. Two-point correction is a highly accurate method, unfortunately, it needs sophisticated instruments to measure the reference image; LMS method only need the readout infrared data captured by the imaging system and compensate the non-uniform response of pixels during its normal operation, But the speed of the algorithm is difficult to use in real-time video. We will test and analyze the two kinds of algorithms.
For bad pixel correction, in order to improve the performance of bad pixel correction, we have improved bad pixel correction which is based on the peer filter. Because bad pixels in the infrared images which are detected by infrared focal plane array sensor are frequently in blobs than kinds of images, we must implement a specific method of image correction. We employ adjustable window size that can
increase the window automatically where bad pixels are in blobs. We use 3×3 window as default working window for sharpness maintenance, if the small window does not correct a bad pixel, the window size will increase automatically to enhance the correction capability. By this scheme, it is more accurate to locate bad pixel, and bad pixels will be replaced by the median of the peer group.
ACKNOWLEDGEMENTS
I would like to express my sincere gratitude to my advisor, Dr. Jyh-Yeong Chang for valuable suggestions, guidance, support and inspiration he provided. Without his advice, it is impossible to complete this research. Thanks are also given to all of my lab members for their suggestion and discussion.
Finally, I would like to express my deepest gratitude to my family for their concern, supports and encouragements.
Contents
摘要 摘要 摘要 摘要 ...………... i ABSTRACT ……….…... ii ACKNOWLEDGEMENTS ……….. iv Contents ………...….…vList of Figures ……….. viii
List of Tables ………. xii
Chapter 1 Introduction ………1
1.1 Motivation ………1
1.2 Non-uniformity Correction ……….………2
1.3 Bad Pixel Correction ………..………4
1.4 Thesis Outline ………..………6
Chapter 2 Non-uniformity Correction .………...……7
2.1 Two-point Correction …...……….………7
2.2 Least Mean Squares...………..….………9
2.2.1 Regularization………12
2.2.3 Adaptive Learning Rate...………..15
Chapter 3 The Improvement of Bad Pixel Correction ...………..……17
3.1 Bad Pixel Correction ...…….……….…..……17
3.1.1 Vector Median Filters………...17
3.1.2 Vector Directional Filters……….19
3.1.3 Directional Distance Filters………..20
3.1.4 Peer Group Filter………..22
3.1.5 Fuzzy Modified Peer Group Filter………...23
3.1.6 Fast Similarity-Based Impulsive Noise Removal Vector Filter…25 3.1.7 Fast Impulsive Noise Filter Using Fuzzy Metrics……….27
3.1.8 Fuzzy Peer Group Averaging Filter………..28
3.2 Proposed Filtering ...………..………..……32
Chapter 4 Experimental Results ...……….…38
4.1 Results of NUC ………..……38
4.1.1 Result of Two-point Correction ………38
4.1.2 Result of Least Mean Squares ……..……….…………..…41
Chapter 5 Conclusion ……….……65
List of Figures
Fig. 1.1. The flowchart of our NIR sensor. ………..4
Fig. 2.1. (a) The completely off image. (b) The 75% exposure image. ..…………...9 Fig. 2.2. The offset of the correction curve. ………...………….………...15
Fig. 3.1. The concept of the peer group centered at x( )1 (m = 5). ………. 23
Fig. 3.2. (a) First the cumulative similarity value M0 between the central pixel
and its neighbors is calculated. (b) Then pixel F0 is rejected from the filter window
and the cumulative similarity values Mk, k = …1, ,nof the pixels F1,…,Fn are
determined. ………...……….…………. 27
Fig. 3.3. The noise maps of the sensor. (a) Sample 1. (b) Sample 2. (c) Zoomed
“sample 2”. ……….. ………..………33−34
Fig. 3.4. Noise types in sensor. (a) – (p) are basic type; (q) – (s) are basic type
combinations. ………...35
Fig. 3.5. Block diagram of the method. ………...36
Fig. 3.6. The working window W size of n x n, (n=3,5,7,…). ………..….37
Fig. 4.1. (a) The raw image of “Monitor”, (b) The corrected image of “Monitor”; (c)
The raw image of “Words”, (d) The corrected image of “Words”; (e) The raw image
of “Two-persons”, (f) The corrected image of “Two-persons”. ……...38−39
corrected image of “Monitor”; (c) The raw image of “Words”, (d) The corrected
image of “Words”; (e) The raw image of “Two-persons”, (f) The corrected image of
“Two-persons”. ……….………40
Fig. 4.3. IR image of (a) Sleeping person. (b) Walking to the bed person. ...42
Fig. 4.4. PSNR for the LMS algorithm and its proposed modifications versus frame
number. ’NOR’ indicates LMS method, ’MOM’ indicates LMS method plus
momentum, ’REG’ indicates LMS method plus regularization, ’MOM+REG’
indicates LMS methods plus momentum and regularization, and ’ALR+MOM+REG’
indicates LMS methods plus momentum, regularization and adaptive learning
rate. ……….…...43
Fig. 4.5 Fig. 4.5. PSNR for the LMS algorithm and its proposed modifications
versus frame number. (a) Sleeping person. (b) Walking to bed person. ’NOR’
indicates LMS method, ’MOM’ indicates LMS method plus momentum, ’REG’
indicates LMS method plus regularization, ’ALR’ indicates LMS method plus
adaptive learning rate, ’MOM+REG’ indicates LMS methods plus momentum and
regularization, ’ REG+ALR’ indicates LMS methods plus regularization and adaptive
learning rate, ’ MOM+ALR’ indicates LMS methods plus momentum and adaptive
learning rate, and ’ALR+MOM+REG’ indicates LMS methods plus momentum,
Fig. 4.6. (a) Original image of frame 3. (b) The corrected frame of the frame 3. (c)
The corrected frame of the frame 300. ………....46
Fig. 4.7. Frame 240 of the “walking to bed person” (a) Original image of frame 3. (b)
Corrupted image. (c) Corrected image with the proposed NUC method using adaptive
learning rate plus momentum and regularization. ………47
Fig. 4.8. Bad pixel correction results of Lena image filtered by different impulse noise
filters. (a) Original image. (b) Corrupted image with 5% impulse noise. (c)−(k) are
filtering results. Image filtering results filtered by (c) our proposed filter. (d) Vector
median filter (VMF). (e) Basic vector directional filter (BVDF). (f) Directional
distance Filter (DDF). (g) Fast Peer Group Filter (FPGF). (h) Fuzzy Modified Peer
Group Filter (FMPGF). (i) Fast similarity-based impulsive noise removal vector filter
(FSVF). (j) Fuzzy metric FSVF (FMFSVF). (k) Fuzzy Peer Group Averaging Filter
(FPGA). (l) is zoomed parts of (b). (m)−(u) are zoomed “Lena” filtering results.
Zoomed results filtered by (l) our proposed filter. (m) VMF. (n) BVDF. (o) DDF. (p)
FPGF. (q) FMPGF. (r) FSVF. (s) FMFSVF. (t) FPGA. ………...51−55
Fig. 4.9. Bad pixel correction results of Lena image filtered by different realistic noise
filters. (a) Corrupted image with 1% realistic noise. (b)−(j) are filtering results. Image
filtering results filtered by (b) our proposed filter. (c) Vector median filter (VMF). (d)
Peer Group Filter (FPGF). (g) Fuzzy Modified Peer Group Filter (FMPGF). (h) Fast
similarity-based impulsive noise removal vector filter (FSVF). (i) Fuzzy metric FSVF
(FMFSVF). (j) Fuzzy Peer Group Averaging Filter (FPGA). (k) is zoomed parts of (a).
(l)−(t) are zoomed “Lena” filtering results. Zoomed results filtered by (l) our
proposed filter. (m) VMF. (n) BVDF. (o) DDF. (p) FPGF. (q) FMPGF. (r) FSVF. (s)
List of Tables
TABLE 4.1 The evaluation results of Lena image filtered by the following filter: (a) Corrupted image with 5% impulse noise, (b) Corrupted image with 10% impulse noise, (c) Corrupted image with 15% impulse noise, (d) Corrupted image with 20%
impulse noise………..………..59−61
TABLE 4.2 The evaluation results of Lena image filtered by the following filter: (a)
Corrupted image with 1% realistic noise, (b) Corrupted image with 4% realistic noise,
(c)Corrupted image with 7% realistic noise, (d) Corrupted image with 10% realistic
Chapter 1 Introduction
1.1
Motivation
With the rapid technological development, the visible light technology has become popular. Recently infrared sensing has also been widely applied in various domains of low/no light environments. One spectrum of infrared is near infrared (NIR), whose bandwidth is close to visible red light band, with a higher reflective image sensing capability under low/no light environments. In addition, NIR band also widely used in the military application providing high resolution images the sensing device of NIR is. It can be used as the enemy recognition systems and surveillance systems, in low/no light or fog or smoke in the environments.
It is well known that near infrared focal plane array (NIR FPA) has non-uniformity and bad pixels in the produced sensor cells. Hence, the infrared image must do non-uniformity correction (NUC) and bad pixel correction. Bad pixel is the pixel that does not respond (non responsive) i.e., dark situation (commonly) or always responsive i.e. In the NIR sensor bad pixel saturation is most often observed.
In the low light military applications, infrared image processing must be fast and efficient. Because military NIR sensor has to be lightweight and easy to used, there in NUC, the most popular reference-based correction method, so-called “two-point” correction method in which two uniform sources of known intensity are sequentially imaged [1], [2] is widely used.
Bad pixel replacement of infrared focal plane arrays is also known as Dead Pixel Correction. Bad pixels are non-responsive, permanently dark or saturating. Bad pixels in infrared digital images might still remain uncorrected after non-uniformity
correction, so we need to correct bad pixels afterward. Because dead pixels in the infrared images are frequently in blobs than kinds of images, we must implement a specific method of image correction.
In this thesis, we use two-point correction to correct infrared images, non-uniformity and correct bad pixel. In the noise reduction scheme developed for better bad pixel detection, we propose a new impulse noise filter based on peer group concept. We employ adjustable window size that can increase the window automatically where bad pixels are in blobs. We use 3×3 window as default working window for sharpness maintenance, if the small window does not correct a bad pixel, the window size will increase automatically to enhance the correction capability. By this scheme, it is more accurate to locate bad pixel, and bad pixels will be replaced by the median of the peer group.
1.2
Non-uniformity Correction
With the development of infrared imaging technology, near infrared focal plane arrays (NIR FPA) imaging system has become the focus the next generation infrared imaging system. Compared with other thermal imaging systems, NIR FPA has simple structure, high reliability, high detection sensitivity and high frame rate, The NIR FPA is widely applied to various fields of military, medical, civil, and forest fire prevention.
Unfortunately, due to the limitations of semiconductor materials and process conditions, the output response of the detector is not the same, which resulted in the NIR FPA response non-uniformity. In general, the non-uniformity is called fixed pattern noise (FPN) will be striped or grid-like noise model. Therefore, how to
effectively track and remove the device non-uniformity, non-uniformity correction (NUC) is the key to improve the NIR FPA imaging quality.
There are several calibration methods for the NUC of an NIR FPA. In general, there are two categories of the calibration methods, reference-based and scene-based correction algorithm. Reference-Based (or calibration-based) NUC techniques are based on the use of uniform infrared sources. The most used one is the Two-Point Calibration method [3], which employs at least two blackbody sources at different luminance to calculate the gain and the offset of each detector on the NIR FPA. Unfortunately, when the system is in use of increased working hours, its performance would be decreased for the working environment may change, Correction parameters which were measured before cannot meet the correct situation. Such kinds of Reference-Based NUC methods require to halt the operation of the system, and re-do the procedure and re-set the correction parameters to operate again.
For these reasons, Scene-Based NUC techniques are actually becoming more popular, since they only need the readout infrared data captured by the imaging system and compensate the non-uniform response of pixels during its normal operation. The constant statistics constraint method is the most referred scene-based technique However, its algorithm structure is complex, hardware implementation is difficult, thus reduces its engineering applications.
In this thesis, we propose to utilize two-point correction and adaptive scene-based NUC method [4] to correct infrared image that has non-uniformity. We also present varying-size impulse noise filter to correct bad pixels, and NIR sensor flowchart is illustrated in Fig. 1.1 below.
Fig 1.1 The flowchart of our NIR sensor.
1.3
Bad Pixel Correction
In many practical situations, the sensing devices and the transmission process tend to degrade the quality of the digital images by introducing noise, images are corrupted by the so-called impulsive noise of short duration and high energy. The presence of noise in an image may be a drawback in any subsequent processing to be done over the noisy image such as edge detection, image segmentation or pattern recognition. As a consequence, filtering the image to reduce the noise without degrading its quality, preserving edges, corners and other details is a major step in
imaging systems such as image content retrieval, medical image processing, industrial visual inspection [5]. This type of noise occurs mostly in the over-the-air transmission such as in standard broadcasting and satellite transmission. Common sources of impulse noise include lightening, industrial machines, car starters, faulty or dusty insulation of high-voltage powerlines and various unprotected electric switches [6–8].
In order to recovery the original image pixel values, the vector median filter
(VMF) [9], which is probably the most well-known vector filter, uses the L1
(City-Block) or L2 (Euclidean) norm to define the above distance function. The
filtering method sorts pixels vectors in the working window by space vector distance sum. On this basis, the Basic Vector Directional Filtering (BVDF) [10] sorts color vector by vector angle sum. Distance Directional Filtering (DDF) [11] sorts color vector by product of vector distance and vector angle. The above methods are too much smoothing, which results in an extensive blurring of the output image. This undesired property is caused by the unnecessary filtering of the noise-free samples that should be passed to a filter output without any change. To remove this drawback, a switching mechanism has been introduced into the structure of the robust smoothing filters, [12,13]. Such a switching filter detects if the pixel under consideration is affected by the noise process and if it is found to be noisy, then it is being replaced by the output of some robust filter, otherwise it is left unchanged. For example, Adaptive center-Weighted vector directional filter (ACWVDF) [14], and robust switching vector median filtering (RSVMF) [15]. When the noise ratio is low, the class switch-type methods have achieved good results.
In this thesis, we use improved peer group filter to correct infrared image that has non-uniformity and correct bad pixel.
1.4
Thesis Outline
The thesis is organized as follows. The basic concepts and technique concerning the NUC introduced in Chapter 2. The basic concepts and technique concerning the bad pixel correction are describled in Chapter 3. In Chapter 4, the results of our NIR methods which are introduced in Chapter 2 and Chapter 3 are shown and compared. At last, we conclude this thesis with a discussion in Chapter 5.
Chapter 2 Non-uniformity Correction
There are two calibration methods for the NUC of an NIR FPA, reference-based and scene-based correction algorithm. We will introduce one of reference-based correction algorithm, two-point correction, and one of reference-based correction algorithm, least mean squares algorithm.
2.1
Two-Point Correction
One of the most developed methods is the two-point calibration method [3], which is earlier for the NUC in infrared imaging systems. In the method, it assumes that the response of the detector is linear in range of illumination, and the response of the detector is more stable and less affected by random noise. Non-uniformity can be said for the results of the multiplicative noise and additive noise. At this point, the response model of the detection unit ij-th can be expressed as:
( )
( )
( )
( )
1 1 2 2 , , , , ij ij ij ij P i j T i j P i j T i j = α + β = α + β (2.1)where P i j1
( )
, and P i j2( )
, represent the ij-th pixel value in completely off imageand 75% exposure image, respectively. The αij and βij represent gain and offset of
the ij-th pixel. The T1 and T2 represent illumination level. In order to calculate the
values of the gain and offset , we chose two illumination level. By using Eq. (2.1), we can assume T i j2
( )
, =kT i j1( , ), then:( ) ( )
2 1 1 , , (k 1) ( , ) ij P i j P i j T i j − α = − (2.2)( )
2( ) ( )
(
)
1 1 , , , k 1 i ij P i j P i j P i j − β = − − (2.3) We hope that all the output values of the detector are the same after correction, so we calculate the averages of the completely off image and 75% exposure image,the results are shown in Figs. 2.1(a)−(b) as P1 and P2, respectively. In other word,
we correct all the output as:
2 1 2 1( , ) ( , ) ij ij ij ij ij ij ij ij P A T i j B P A T i j B = α + β = α + β (2.4)
and we combine the Eq. (2.4) with Eq. (2.2) and Eq. (2.3):
( ) ( )
2 1 2 1 2 1 2 1 ( ) , , ij ij P P P P A T T P i j P i j − − = = α − − (2.5)( )
(
1 1)
1 , ij ij ij ij B = P− α A T i j β (2.6)Finally, we would like to correct infrared image which is under unknown
illumination level Tx, then :
( )
,( )
,x ij x ij
Consequently, corrected pixel output signal should be:
( )
( )
(
)
( )
1( )
2 1 1 2 1 , , ( ) , , x P i j P i j P P P P i j P i j − − = + − (2.8)Therefore, we can correct directly without any other illumination level that always needs reference image from the laboratory.
(a) (b)
Fig. 2.1 (a) The completely off image; (b) The 75% exposure image.
2.2
Least Mean Squares
A commonly used bias-gain linear model for an FPA sensor is given by:
( )
( )
( )
( )
ij ij ij ij Y n =a n ×X n +b n (2.9)( )
,( )
,( )
, 1 1( )
, C ij ij x ij ij ij ij x ij ij P i j = α A T i j + β B = α A T i j + − αP A T i jwhere aij
( )
n and b nij( )
are the gain and the offset of the ij-th detector at frame n,( )
ij
X n is the real incident infrared radiation collected by the respective detector, and
( )
ij
Y n is the measured output signal. The main idea of the NUC scene-based methods
relies on estimating the gain and the offset parameters of each detector on the NIR
FPA with only the readout data Y nij
( )
. The algorithm has the ability of adaptingsensor’s parameters over time under a frame by frame basis. To understand how the neural network based approach proposed, Eq. (2.9) must be reordered as following:
( )
( )
( )
( )
ij ij ij ij
X n =g n ×Y n +o n (2.10)
where the new parameters gij
( )
n and o nij( )
are related to the real gain and offsetparameters of the detectors, as expressed in the following expression:
( )
1( )
ij ij g n a n =( )
( )
( )
ij ij ij b n o n a n = − (2.11)In order to minimize some error functions that allow good estimations for the real infrared data Xij
( )
n , the parameters gij( )
n and o nij( )
must be recursively updated.Then, using linear regression to perform the parameter estimation, the error
function E nij
( )
for each neuron is usually defined as the difference between a( )
( )
ij( )
ij ij
E n =T n −X n (2.12)
The unknown parameters are estimated by using the neural network method, and the desired target value can be calculated as the local spatial average (mean filter) of the output data Xij
( )
n .Thus, to minimize the error Eij
( )
n in the mean squares error sense, a functional( )
n ij J is defined as following:( )
(
( )
)
2(
( )
( )
)
2 n n n ij ij ij ij J =∑
E n =∑
T n −X n (2.13)Then, we can get gradients relative to each parameter in Eq. (2.14).
2 ij ij ij ij J E Y g ∂ = − × ∂ ɵ 2 ij ij ij J E o ∂ = − ∂ (2.14)
The steepest descent algorithm is a good way to solve this Least Mean Squares (LMS) optimization problem. In this gradient-based search algorithm, the parameters to be estimated are recursively updated with a portion of each respective error gradient. The parameter learning procedure is finally described as following:
(
1)
( )
( )
( )
ij ij
ij ij
ɵij
(
1)
ɵij( )
ij( )
o n+ =o n + η×E n (2.15)
where
η
is a fixed parameter known as the learning rate.Basic LMS method for NUC of sensor array pixels is described above. Then we use three improvements on LMS method [4], which include regularization, momentum term and adaptive learning rate as explained below.
2.2.1.
Regularization
To test the algorithm, we note that the gain is usually much larger than the offset, and gain value is usually around 1. When the gain value is much larger than the offset value, it is difficult to select the appropriate learning rate. In the LMS algorithm, when the learning rate is very small, the numerical convergence is slow; when the learning rate is large, the iteration would not converge. This makes the algorithm encounter an obstacle in practical applications. According to above analysis, the gain value was normalized to improve the calibration of artificial neural network algorithm. When the gain and offset are adjusted, you can get the same adjustment in the same order of magnitude. the issues of the difficulty in selecting the learning rate are resolved, and that also eliminates the obstacles of the LMS algorithm in practical applications. Thus, the purpose of regularization is to eliminate the difference in the magnitude of the gain and offset adjustment. Parameter adjustment is as following:
( )
( )
1 1 1 1 N M ij i j r n g n NM = = = λ ⋅ − ∑∑
(2.16)( )
( ) ( )
ij ij g n =g n +r n( )
( )
1 1 1 1 N M ij ij i j g n g n NM = = = + λ ⋅ − ∑∑
(2.17)where λ is the regularization constant, N×M is the number of pixels on the
NIR FPA, and g n ( )ij is the normalized gain.
2.2.2.
Momentum
Another possible enhancement to the steepest descent algorithm is the well-known momentum. The gradient descent can be very slow of if the learning constant eta is small and can oscillate widely if eta is too large. This problem essentially results from error-surface valleys with steep sides but a shallow slope along the valley floor. Other efficient and commonly used method that allows larger learning constant without divergent oscillations occurring is the addition of a momentum term to the normal gradient-descent method. The idea is to give each weight some inertia or momentum so that it tends to change in the direction of the average downhill force that it feels. This scheme is implemented by giving a contribution from the previous time step to each weight change:
(
1)
( )
( )
( )
(
( )
(
1)
)
ij ij ij ij ij ij g n+ = g n − η×E n ×Y n + α ⋅ g n −g n−( )
( )
( )
( )
ij ij ij ij g n E n Y n g n = − η× × + α ⋅∆ (2.18)
ɵij
( )
ij( )
ɵij( )
o n E n o n
= − η× + α ⋅∆ (2.19)
where α∈[0,1] is a momentum parameter and a value of 0.9 is often used. For
example, Figure 2.1 shows the offset of the correction curve. Note that the trajectory without momentum (the left curve) has larger oscillations than the one with momentum (the right curves). We further observe from the right curves in Fig. 2.1 that the momentum can enhance process toward the target point if the weight update is in the right direction (point A to A' in Fig. 2.1). On the other hand, it can redirect movement in a better direction toward the target point in the case of overshooting (point B to B' in Fig. 2.1). This observation indicates that the momentum term typically helps to speed up the convergence and to achieve an efficient and more reliable learning profile.
The use of momentum could improve the performance of the adaptive algorithm, improving its stability and probably reducing the production of ghosting artifacts, and it can leave some beneficial fluctuation in trajectory.
ɵij
(
1)
ɵij( )
ij( )
(
ɵij( )
ɵij(
1)
)
Fig. 2.
2.2.3.
Adaptive Learning Rate
In the neural network
calculation of the error Eij n
(
ij
T n
Ideal T nij
( )
is the output neighborhood averaging neighborhood average, theweakened. However, in particular,
Fig. 2.2. The offset of the correction curve.
Adaptive Learning Rate
neural network algorithm, desired target value T nij
( )
( )
ij E n as follows:)
(
( )
)
( )
1 1 1 1 , 8 k l Xi k j l n Xij n T n =∑ ∑
=− =− + + −output value of the 2-points correction algorithm method is the image smoothing filter the variance becomes small, and the noise
n particular, the boundary of the image may become blurred is used in the
(2.20)
algorithm. In fact, smoothing filter. After doing noise intensity is may become blurred.
Thus, based on the knowledge that the local spatial average is not always a good estimation for the desired target response of an adaptive NUC method, the proposed
adaptive learning rate ηij
( )
n showed in Eq. (2.21) is designed to be dependent, andinversely proportional to the local spatial variance of the input image
ij 2 Y σ (n).
( )
2( )
1 1 ij ij Y n K n η = ⋅ + σ (2.21)Therefore, if input image of the working window is smooth enough, the desired averaged target value at the output is more confident, and the learning rate gets larger. On the other hand, if a given sliding window size of the input image is not smooth enough, the local variance is too high, like in a object border, and the learning rate
gets a smaller. To add this adaptive learning rate to the adaptive NUC algorithm,
η
in equation (2.15) must be replaced by its counterpart ηij
( )
n in Eq. (2.20), where Kis a constant that limits the maximum learning rate. The local variance
ij 2 Y
σ (n) can be
calculated with any desired window size, and a 3 × 3 window size would be assumed along this paper.
Chapter 3 The Improvement of Bad Pixel
Correction
After the Non-uniformity Correction, the infrared images often have bad pixels because the manufacturing process is not perfect, Most of the bad pixels are impulse noise. A few of dead pixels will be gathered in blobs, and that results in the difficulty and hence the failure of bad pixel correction. We proposed a new method can correct bad pixels observed in NIR sensor array.
In order to remove the noise of the NIR sensor, we use some color image filter for impulse noise. Although the NIR images are grayscale, we will improve filter from grayscale filter to color filter. When the filter can remove the noise in color images, grayscale image should also have good results. In Section 3.1, we introduce some basic and state-of-the-art impulse removing filter, and Section 3.2 will introduce our method.
3.1
Bad Pixel Correction
From Sec. 3.1.1 to Sec. 3.1.3, we will describe the basic impulse noise filter, and then from Sec. 3.1.4 to Sec. 3.1.8, we will introduce switching filters.
3.1.1 Vector Median Filters
Let y x
( )
:Zl →Zm represent a multichannel image, where l is an imagecolor images, parameters l and m are equal to 2 and 3, respectively. Let
{ i l; 1, 2, , }
W = x ∈Z i= … N represents a filter window of a finite size N , where
1, 2, , N
x x … x is a set of noisy samples. The central sample x(N+1)/2 determines the
position of the filter window. Let us consider that each input vector xi is associated
with the distance measurement:
1 - for 1, 2, , N i i j j L x x i N γ = =
∑
= … (3.1)where
γ
represents the selected norm, e.g. absolute (γ =1), Euclidean (γ =2), etc.The quantification of the distance between two -channel samples
1 2
( , , , )
i i i im
x = x x … x and xj =(xj1,xj2,…,xjm) given by the expression xi −xj γ
follows from the generalized Minkowski metric (Plataniotis and Venetsanopoulos, 2000) defined by 1 1/ m i j i j k x x x x γ γ γ = − = −
∑
(3.2)where
γ
characterizes the used norm, m is the dimension of vectors and xik is thek-th element ofxi.
If distance measures L L1, 2,…,LN serve as ordering criterions, i.e.
1 2 ( )r (N)
it means that the same ordering is implied to the input set x x1, 2,…,xN which results in ordered input sequence
(1) (2) ( )r (N)
x ≤x ≤…≤x ≤…≤x (3.4)
The sample x(1)∈W associated with the minimum vector distance L (1)
constitutes an output of the well-known vector median filter (VMF) introduced by Astola et al. [9]. Equivalently, the VMF output of the set x x1, 2,…,xN is defined as the sample xVMF∈{ ,x x1 2,…,xN} that satisfies the following expression:
1 1 N N VMF j i j i i x x x x γ = γ = − ≤ −
∑
∑
for j=1, 2,…,N (3.5)where
γ
characterizes the used norm.3.1.2 Vector Directional Filters
Vector directional filters (VDFs) [8] operate on the direction of image vectors and the VDF output is determined according to these directions in the vector space. By above operation, image vectors with atypical directions in the vector space are eliminated and VDFs lead to optimal estimates in the sense vectors’ directions, so that VDFs preserve the color chromaticity well.
Let each input sample xi, for i=1, 2,…,N, be associated with a sum of vector
(
)
1 , for 1, 2, , N i i j j A x x i N = α =∑
= … (3.6) where(
)
1 1 , cos cos T i j i j i j x x A x x x x − − = ⋅ ⋅ (3.7)represents the angle between two m -dimensional vectors xi =(x xi1, i2,…,xim) and
1 2
( , , , )
j j j jm
x = x x … x .
If α α …α1, 2, N , i.e. the sums of vector angles, serve as ordering criterions, i.e.
( )
(1) ( 2) N
α ≤ α ≤ ≤ α⋯ (3.8)
and the same ordering is applied to the input set x x1, 2,…,xN . This operation results
in Eq. (3.4). The sample x(1) , i.e. the sample that minimizes the sum of angles with
other vectors, represents the output of basic vector directional filter (BVDF) [10]. Since the BVDF passes to the filter output the sample associated with minimal angle
distance α(1), it preserves the color chromaticity better than the VMF.
Directional Distance Filters (DDF) combine advantage of VMF and BVDF [11], the Algorithm is as following: If the minimization formula is expressed through a minimization of products for 1, 2, , i Li i i N Ω = ×α = … (3.9)
(
)
1 1 , for 1, 2, , N N i i j i j j j x x A x x i N γ = = Ω = − = … ∑
∑
(3.10)and the filter output is given by the sample x(1) associated with Ω(1), i.e. the
minimum value from products Ω Ω … Ω1, 2, , N, and such their ordered set is simply
written as
( )
(1) (2) N
Ω ≤ Ω ≤ ≤ Ω⋯ (3.11)
then the sample x(1) determines the output of DDF.
Although the minimization of products Li×αi, for i=1, 2,…,N , does not
necessarily imply a minimum for either Li and αi, it results in very small values for
both of them [10]. For that reason, the product minimization will select as the filter output the vector-valued sample that results in a very small sum of vector distances Eq. (3.1) and a very small sum of vector angles Eq. (3.6), simultaneously.
3.1.4 Peer Group Filter
These are adaptive switching filters based on the peer group concept [16]. Essentially, the peer group of pixels in a given window represents the set of neighbor pixels that are sufficiently similar to each pixel according to a particular measurement. In the Peer Group Filter (PGF) [16] the pixels in the window are sorted in ascending
order according to their distances to the center pixel. The center pixel x(1) of the peer
group is then determined as the filtering window W pixels that rank the lowest in this sorted sequence. In order to remove the effect of the impulsive noise, if the distance
between x(1) and the central pixel of W xi is not exceeding threshold d, the
central pixel is free of noise. Otherwise, the center pixel of W is considered noisy
(see fig. 3.1). In this case, the center pixel is replaced with the VMF output x(1);
otherwise it remains unchanged. The range of the threshold d is set to [40,60]. Equation is expressed as follows:
( ) ( ) ( ) 1 1 2 out 1 2 , if , PG if F i i i x x x d x x x d − > = − ≤ (3.12)
The following proposed method is the improvement of PGF, known as Fast Peer Group Filter (FPGF) [17]. The FPGF is a fast modification of the PGF in which the center pixel is considered to be noise-free as soon as m pixels in the window are
determined to be sufficiently similar. The peer group P x m d( , , )i will denote the set
2 ,
i j j
x −x ≤d x ∈W . In other
and distance between xi
determined to belong to the peer noise in the image is not very
originally necessary in PGF can be dramatic follows:
out
FPGF
Fig. 3.1. The concept of the peer group centered at
3.1.5 Fuzzy Modified
Fuzzy Modified Peer
concept is adapted to the use of a novel fuzzy metric. The use of the fuzzy metric is considered because it has been proved to be an appropriate alternative to some
In other words, if the central pixel of W xi has m i
x and neighbors is not exceeding d, the central pixel
the peer group P x m d( , , )i . If m is low, and the amount of noise in the image is not very much, the number of distance computations
originally necessary in PGF can be dramatic reduced. Equation is expressed as
( )
(
)
out 1 , if , , otherwis , e i i i x x P x m d x ∈ = 1. The concept of the peer group centered at x( )1 (m
odified Peer Group Filter
eer Group Filter (FMPGF) describe in [18], the peer group concept is adapted to the use of a novel fuzzy metric. The use of the fuzzy metric is considered because it has been proved to be an appropriate alternative to some has m neighbors,
central pixel xi is If m is low, and the amount of computations which is is expressed as
(3.13)
(m = 5).
, the peer group concept is adapted to the use of a novel fuzzy metric. The use of the fuzzy metric is considered because it has been proved to be an appropriate alternative to some
classical measures [19] and in order to further introduce it in the area. This fuzzy metric may be also useful in other approaches based on fuzzy techniques, which are interesting in image processing. Due to the non-stationarity of images and the difficulty in distinguishing between noise and edges, fuzzy modeling is considered
quite appropriate in image filtering [20]. The fuzzy similarity between two pixels xi
and x can be computed as: j
(
)
{
{
}
}
1 min min , , max max , p i j i i i p i i x y K M x x x y K = + = +∏
(3.14)They denote by P x d( , )i the set
(
)
(
)
{
xj∈P x di, ,Mp x xi, j ≥d}
(3.15) In order to increase computing speed, FMPGF use non-overlap window, FMPGF algorithm is as follows:(1) The image under processing is divided into 1 2
2
N N n
×
disjoint n n× windowsW .
Let xi denote the central pixel of one of these windows. Then, the following rule
is computed for each central pixelxi:
IF ∃P x m d( , , )i ⊂W ; THEN ( , , )
j i
x P x m d
∀ ∈ ; x is declared as non-corrupted and j
, ( , , )
k k i
x W x P X m d
ELSE
i
x is declared as provisionally corrupted and
,
j
x ∈W j≠i; x is declared as non-diagnosed. j
(2) Each non-diagnosed pixel xi is now considered centered in a n n× window W
and the following rule is computed: If ∃P x m d
(
i, ,)
⊂W, THEN ( , , ) j i x P x m d ∀ ∈ , x is declared as non-corrupted. j ELSE i x is declared as corrupted.(3) In this step the switching filtering to compute the outputs y from the inputs x is
carried out in a n n× window W as follows:
, if is non-corrupted. ,over the non-corrupted pixels in if is corrupted.
i i i out i x x y AMF W x =
3.1.6 Fast Similarity-Based Impulsive Noise Removal
Vector Filter
According to the family of filters introduced by Smolka et al. in [21–24], the fast
similarity-based impulsive noise removal vector filter (FSVF) is defined as follows:
where n is the number of neighbors of the central pixel F0. It is considered a
similarity function µ:[0; )∞ →R which is non-ascending and convex in [0; )∞ and
satisfiesµ
( )
0 =1, and limx→∞µ( )
x =0. The similarity between two pixels of thesame color should be 1, and the similarity between pixels with very different colors
should be very close to 0. The function defined as µ
(
Fi−Fj)
where i denotesthe specific vector norm (typically the L1 or L2 vector norms) can easily satisfy the
above conditions when it is a decreasing function and µ
( )
0 =1. The cumulated sumk
M of similarities between a given pixel F kk( = …0, , )n and all other pixels
belonging to the window W is defined as
(
)
(
)
0 0 1 1 , , , n n j k k j j j j k M F F M F F = = ≠ = µ∑
= µ∑
(3.16)which means that for those Fk which are neighbors of F0, the similarity between
k
F and F0 is not taken into account (see fig. 3.2), which privileges the central pixel.
Hence, the reference pixel F0 is replaced by one of its neighbors if
0 k, 1, ,
M <M k= … n , only when it is really noisy, preserving the original
undistorted image structures. If this is the case then, F0 is replaced by that F for k*
which *
arg arg maxk k
k = M . Equation is expressed as follows:
*, 0 * , k k F M M F M M < ≥ (3.17)
Fig. 3.2. (a) First the cumulative similarity value M0 between the central pixel
and its neighbors is calculated. (b) Then pixel F0 is rejected from the filter
window and the cumulative similarity values Mk, k = …1, ,nof the pixels F1,…,Fn
are determined [22].
Several convex functions fulfilling the above conditions have been proposed in [21–24]. The best results were achieved [22] for the simplest similarity function
(
)
(
)
(
)
7 , for , 1 , , otherwise 0, i j i l i j F F F F h F F h ρ ρ < − µ = (3.17)Where h∈ ∞(0, ), and
ρ
denotes the particular distance function, typically the L1or L2 distances. This function allows to construct a fast noise reduction algorithm
[21–24].
The filter of the paper [19] is similar to FSVF, but similarity function just like FMPGF. The proposed fuzzy metric has been combined with the FSVF technique [21–24] to define a computationally efficient filter. This filter is faster than FSVF since the filtering process is simpler and the fuzzy metric used is faster than the
classical metrics used in FSVF [21–24]. The fuzzy similarity between two pixels xi
and x can be computed as: j
{
}
{
}
1 min min , ( , ) max max , p i i p i i i x y K M x y x y K α α = + = + ∏
(3.18)wherex=
(
x1,..,xp)
, y=(
y1,..,yp)
, the particular case of the proposed fuzzy metricMap suitable for 3-channel image processing tasks will be M3α, and then M3α( ,F Fi j)
will denote the fuzzy distance between the pixels Fi and F in the image. j
In the proposed filtering, the cumulated sum Mk of similarities between a given
pixel F kk( = …0, , )n and all other pixels belonging to the window W is defined as
0 3 0 3 1 1 ( , ), ( , ) n n j k k j j j j k M Mα F F M Mα F F = = ≠ =
∑
=∑
(3.19)the reference pixel F0 is replaced by F ifk* M0<Mk, the equation is the same
as Eq. (3.17).
In the paper [25], they introduced the concept of fuzzy peer group for a color image pixel which extends the concept of peer group in the fuzzy setting. This novel concept aims to represent the set of all pixel neighbors to a given pixel which are similar to it. Since the similarity between color pixels is an imprecise concept, they have represented it using fuzzy similarities. For this, they have introduced a method based on fuzzy logic that builds the fuzzy peer group of a color image pixel by first determining the members of the fuzzy peer group and then assigning their corresponding membership degrees. The proposed method is able to accurately determine the fuzzy peer group of any color image pixel overcoming shortcomings of previous peer group approaches.
The fuzzy peer group averaging filter (FPGA) can correct impulse noise and Gaussian noise, but we just use it for impulse noise here. The filter method is as follows:
1. Determine the fuzzy peer group
2. Determine the best number of members for a fuzzy peer group.
3. Using above results to detect and replace impulses.
where CFR 2 will be discussed later.
In order to establish our concept of fuzzy peer group we will define two fuzzy sets on the ordered set of pixels . Firstly, we consider the proposition “ is similar to .” In the approach presented in this paper, they propose to use a fuzzy similarity function, , as the function above which, following the above terminology, is given by
(
)
2 , , , 0,1, 2, , 1 i j F F F i j F F e σ i j n − − ρ = = … − (3.20)where · denotes the Euclidean norm and Fσ >0 is a parameter which will be discussed later. Notice that now
ρ
takes values in [0,1] and that ρ(
F F0, ( )i)
=1 ifand only if F0 =F( )i . Again, as discussed above, the color vectors Fi∈W are sorted
in a descending order with respect to its similarity to , which results in an ordered
set W' defined
{
( ) ( ) ( )2}
'
0 , 1, , n 1
W = F F … F − as follows: such that ρ
(
F F0, (0))
(
0 (1))
(
0 2)
(n 1)
, ,
F F F F −
≥ ρ ≥…≥ ρ , whereF( )0 =F0.
Secondly, they define the accumulated similarity forF( )i , denotedAF0 ( )
i F , as ( )
( )
(
( ))
{
}
0 2 0 , , 0,1, , 1 i F i i k k A F F F i n = = ρ∑
∈ … − (3.21)For computing its certainty, author used a fuzzy membership function, LF0,on
( ) ( ) ( )
{
F0 ,F1,…,Fn2−1}
. In this work author prefer to define 0F
L as a function of AF0
by means of a custom membership function defined on that fulfills the following requirements:
1.
(
F0( )
( ))
0i
A F
µ = for the minimum possible value of AF0, that is,µ
( )
1 =0.2.
(
F0( )
( ))
1i
A F
µ = for the maximum possible value of AF0, that is,µ
( )
n2 =1.Author prefer the membership function to be more sensitive in the low value
range than in the high value range, and, therefore, author devise
µ
so that thederivative of
µ
should be a strictly decreasing function. The function is given by( )
(
)
2(
)
(
2)
2 1 1 2 1 1 x x x n n µ = − × − − + − (3.22)( )
( )
(
( )
( ))
(
)
(
( )
( ))
(
( )
( ))
0 0 0 0 2 2 2 1 1 2 1 1 F F F F i i i i L F A F A F A F n n = µ = − × − − + − 2 0,1, 2, , 1 i= … n − (3.23)According to the above, they determine the best number of members for a fuzzy peer group. The best number of members of a peer group for a given pixel will be determined by choosing so that all similar pixels are included in the set and the rest of the pixels are not. In other words, if a pixel has similar neighbors, the best number of
members for its peer group is m , and vice versa. Author proposal is based on
determining m as the value for which F0
i
P is the largest set that contains only
similar pixels. The best number of members m of F0
i
P will be the value of
2
{1, 2, , 1}
w
m∈N = … n − maximizing the certainty of the following fuzzy rule.
Fuzzy Rule 1: Determining the certainty of to be the best number of members
for F0 m P IF “F( )m is similar to F0” and “
( )
( ) 0 F m A F is large”THEN “the certainty of to be the best number of members is high”. The mathematical equation is as follows:
( )
1 w m N FR m=argmax ∈ C m (3.24)( )
0( )
( ) 0( )
( ) 1 F F FR m m C m =C F L F (3.25) ( )( )
(
( ))
0 0, F i i C F = ρ F F (3.26)According to the above, we can formulate this condition in terms of fuzzy peer
groups as follows: a pixel is free of impulse noise if for the fuzzy peer group
0 F m FP it is satisfied that “ 0
( )
( ) F m A F is large” and “ ( ) m F is similar toF0”. Thefollowing Fuzzy Rule 2 represents this condition:
Fuzzy Rule 2: Determining the certainty of the pixel to be free of impulse noise
IF “ 0
( )
( ) F m A F is large” and “ ( ) m F is similar to F0”THEN “F0 is free of impulse noise”.
The mathematical equation is as follows:
( )
( )
( )
0 0 F F FR 2 0 C F C F L F m m = (3.27)They use to detect and replace impulses according to threshold-based rule are shown in Eq. (3.28) [28],
( )
FR 2 0 t 0
0 out
if C F F , then F is free of impulse noise else F is an impulse and it is replaced with VMF
≥
(3.28)
3.2
Proposed Filtering
When the noise is impulse noise and noise of the low density, above the noise filter usually can achieve good results. In fact, the noises which are detected by NIR sensor are frequently in blobs. Fig. 3.3 shows the noise maps of the sensor, noise types as shown in fig. 3.4. From type 1 to type 16 is a basic type, others are basic type combinations.
(a)
Fig. 3.3. The noise maps “sample 2”.
When concentration of working window is enough pixels in working window noise. In order to detect window. Because the number window, bad pixels can be
large size of the working window will be blurred; small size
detect a group of bad pixels in blobs, we use a 3 × 3 working window size. The
(c)
maps of the sensor. (a) Sample 1. (b) Sample 2. (c) Zoomed
concentration of the impulse noise is not high, peer group filter with is enough; however, when bad pixels are blobs, the number of bad pixels in working window is too much, bad pixels may be misjudgment
dead pixels in blobs, we use the larger size number of dead pixels becomes a minority in a can be detected. But the boundary in the image working window can detect a group of bad pixels, but
size of the working window can keep the details ad pixels. We propose a method: we hope that the
3 × 3 working window; the noises are in blobs, we use The block diagram of the method is as follows:
(a) Sample 1. (b) Sample 2. (c) Zoomed
filter with 3 × 3 blobs, the number of bad misjudgment as free of of the working in a large working is blurred. The , but the details details, but cannot the noises are not in blobs, we use larger as follows:
Fig. 3.4. Noise types combinations.
We use PGF with 5×5 working window to detect bad pixel, because 3 window cannot detect bad pixels in blobs.
We calculate the vector median
types in sensor. (a) – (p) are basic type; (q) – (s)
5 working window to detect bad pixel, because 3 window cannot detect bad pixels in blobs. Peer group filter algorithm as
vector median of all pixels within the working window
(s) are basic type
5 working window to detect bad pixel, because 3×3 working as section 3.1.4. window W (section
3.1.1). Vector is composed of RGB three dimensions, if the distance between x(1)
and the central pixel of W xi is not exceeding threshold d , the central pixel is
free of noise. Otherwise, the center pixel of W is considered noisy.
When the pixel is detected as a bad pixel, we will use the vector median of the 3 × 3 working window to correct (see Fig. 3.5, Fig. 3.6). If the distance between
(1)
x and the central pixel of W xi is not exceeding threshold d , the central pixel
is free of noise. Otherwise, the center pixel of W is considered noisy. After Correction, we use peer group with 5 × 5 working window to detect central pixel of
W xi again. If xi is still bad pixel, we increase the size of the working window.
After Correction, We will detect xi whether xi is bad pixel or not again, and so on,
Fig. 3.5. Block diagram of the method.
Fig. 3.6. The working window W size of n x n, (n=3,5,7,…)
The purpose of this method is as much as possible to keep the details of image, and we use a 5 × 5 PGF at the right time, let bad pixels in blobs be corrected.
5×5 sliding window
Chapter 4 Experimental Results
The experimental results
results of NUC in Section 4.1, and we show e correction in Section 4.2.
4.1
Results of NUC
We show the result of two of two the result of LMS method in Section 4.1.2.
4.1.1 Result of T
Applying two-point correction to images of Figs. 4.1 (a), (c), and
and (f), respectively.
(a)
Experimental Results
results are divided into two parts, we show the of NUC in Section 4.1, and we show experimental results
Results of NUC
We show the result of two of two-point correction in Section 4.1.1, and we the result of LMS method in Section 4.1.2.
Two-point Correction
point correction to “Monitor,” “Words,” and
(c), and (e), the corrected images are shown in Figs. 4.1
(b)
we show the experimental esults of bad pixel
point correction in Section 4.1.1, and we show
and “Two-persons” , the corrected images are shown in Figs. 4.1(b), (d),
(c) (d)
(e) (f)
Fig. 4.1 (a) The raw image of The raw image of “Words
of “Two-persons”, (f) The corrected
To further validate the effectiveness of NUC, we exploit
with a sensitive threshold to test raw images and NUC corrected images above,
leading to Figs. 4.2 (a)−(f)
(c) (d)
(e) (f)
The raw image of “Monitor”, (b) The corrected image of Words”, (d) The corrected image of “Words”; (e)
The corrected image of “Two-persons”.
To further validate the effectiveness of NUC, we exploit Sobel edge detection old to test raw images and NUC corrected images above,
(f), respectively.
image of “Monitor”; (c) The raw image
Sobel edge detection old to test raw images and NUC corrected images above,