Académique Documents
Professionnel Documents
Culture Documents
To Color Demosaicing
King-Hong Chung
Yuk-Hee Chan
EIE Department
The Hong Kong Polytechnic University
Hong Kong
EIE Department
The Hong Kong Polytechnic University
Hong Kong
II.
I.
INTRODUCTION
(a)
Fig. 1
This work was supported by a grant from the Research Grants Council of
the Hong Kong Special Administrative Region, China (PolyU 5130/09E).
(b)
(c)
(d)
Four Bayer regions with their center pixels having (a)-(b) green, (c)
red and (d) blue Bayer samples respectively
~
The CD gradient EX Y (m, n) provides supplementary
edge detection information by evaluating the CD change of
two successive pixels along the same eastbound direction. In
formulation, it is defined as
~
1
EX Y (m, n) = d XY (m, n + l ) d XY (m, n + l + 1)
(4)
2 l = 0,1
where dXY(m,n) represents the X-Y CD value at position (m,n).
The value of dXY(m,n) is obtained by applying filter
F=[1,3,4,3,1]/6 along the mth row of the Bayer CFA image
as shown in Fig. 2. Filter F is actually a combination of
F1=[1,2,1]/2 and F2=[1,1,1]/3. F1 is for CD estimation
while F2 is for noise removal.
III.
~
Due to the absolute value nature of EX Y (m, n) and the
~
fact that dXY(m,n) = - dYX(m,n), we have EX Y (m, n)
~
= EY X (m, n) . Accordingly, the gradient information carried
by i,E j , Wi, j , i,N j and i,S j are all extracted from the same CI
and CD planes. This implies that they are all compatible for
comparison.
For the case shown in Fig. 1(b), the EIG holds two more
CI gradients from the R and B planes as compared with the IG
proposed in [8]. This provides more information to detect the
edge direction and hence helps to improve the demosaicing
performance.
For the pixel (i, j) in cases shown in Figs. 1(a), 1(c) and
1(d), their directional EIGs are defined similarly as above.
One can replace the Bayer samples with the corresponding
color samples and follow the same procedures as those used
for computing the directional EIGs of the pixel (i,j) shown in
Fig. 1(b).
( Ri , j Ri , j + 2 ) (Gi , j 1 2Gi , j +1 + Gi , j +3 )
G iE, j = Gi , j +1 +
+
2
8
(
)
(
2
R
R
G
G
i, j
i, j 2
i , j 3
i , j 1 + Gi , j +1 )
G iW, j = Gi , j 1 +
+
2
8
(
)
(
2
R
R
G
G
i
,
j
i
2
,
j
i
3
,
j
i 1, j + Gi +1, j )
N
G i , j = Gi 1, j +
+
2
8
(
)
(
2
R
R
G
G
i, j
i + 2, j
i 1, j
i +1, j + Gi +3, j )
G iS, j = Gi +1, j +
+
2
8
(5)
(6)
(7)
(8)
Fig. 2
g iH, j =
Fig. 3 Workflow of the proposed demosaicing method
379
w G
k
k{ E ,W }
k
i, j
k{ E ,W }
(9)
g iV, j =
g
where g
D
i, j
H
i, j
w G
k
k{ N , S }
k{ E ,W , N , S }
V
i, j
and g
D
i, j
(10)
k{ N , S }
w G ik, j
k
, g
k
i, j
(11)
k{ E ,W , N , S }
iE, j
+ W
i, j
V =
iN, j
+ iS, j
and
g i , j = Ri , j di , j ,
(15)
E = max(H / V , V / H ) .
(12)
The pixel is then classified according to the nature of its local
region based on the classification criteria shown in Fig. 4. If
the pixel is classified to be in an edge region, it will be
processed in Pass 1. Otherwise it will be handled in Pass 2.
The threshold T is studied empirically. Study result shows that
the proposed demosaicing method attains a promising result
when T=1.9.
~
d i , j = d i , j + (1 ) d i , j ,
(16)
~
di, j
wE d
W
i, j + 2 + w di, j 2
if Diri , j = H
w E + wW
S
wN d
i 2, j + w d i + 2, j
if Diri , j = V
=
w N + wS
E
W
N
S
w d i , j + 2 + w d i , j 2 + w d i 2, j + w d i + 2, j
w E + wW + w N + w S
if Diri , j = D
(17)
1
and D = iD, j +2t iD, j + iD+2t , j iD, j ,
2 t
Fig. 4
(14)
380
J2 =
(di, j dik, j ) 2
k{E ,W , N ,S }
ik, j ,
(22)
the referred neighbor is on. Note that dik, j are all known at
and finalized to be g i , j .
IV.
The proposed method was compared with ten state-of-theart demosaicing methods including AP [15], AF [16],
LMMSE [17], AHDA [4], VCD[5], DFPD [6], HPHD [7],
RAD [18], SSD [19] and (IGD) [8] to evaluate its
performance. Twenty-four digital full color images as shown
in Fig. 5 were used in the simulations. These full color images
were first sub-sampled according to the Bayer pattern to form
a set of testing Bayer images. They were then reconstructed to
full color images with various demosaicing methods for
comparison. For fair comparison, whenever there is a
refinement scheme recommended by the authors of a
particular demosaicing method to enhance its demosaicing
results, the scheme was performed in the simulation as
suggested. Table I tabulates the CPSNR and the S-CIELAB
[20] measures of various demosaicing methods. The proposed
algorithm provides the best performance in terms of both
measures.
k1{ N ,S },k2{E ,W }
1 2
(18)
NW
SE
where diNE
, j = d i 1, j +1 , d i , j = d i 1, j 1 , d i , j = d i +1, j +1 and
k1 k 2
diSW
, j = d i +1, j 1 . i , j is the EIG along a diagonal direction
and it is estimated as
(19)
SIMULATION RESULT
(20)
ri , j = Gi , j + di , j ,
(21)
Fig. 5
381
and
REFERENCES
[1]
[2]
[3]
[4]
For studying the contribution of the EIG to the red and the
blue plane interpolation, Table III shows the average PSNR
performance of the red and the blue planes attained by various
interpolation schemes. In this simulation, the green plane
obtained by the proposed demosaicing method (with green
plane enhancement) is used as a reference for the bilinear, a
hue-based [2], an edge-based [6] and our EIG-based schemes
to reproduce their red and blue planes for fair comparison. The
simulation results reveal that the proposed EIG can effectively
improve the quality of the red and the blue planes.
[5]
[6]
[7]
[8]
[9]
[10]
[11]
objectively
[12]
[13]
CONCLUSION
[14]
[15]
[16]
[17]
[18]
[19]
[20]
382
VCD
39.02
1.475
DFPD
38.23
1.625
HPHD
39.32
1.421
RAD
38.58
1.580
SSD
37.36
1.701
IGD
39.55
1.388
Ours
39.70
1.372
AHDA
39.10
VCD
39.54
DFPD
39.20
HPHD
39.64
IGD
40.09
Ours-LI
40.16
Ours
41.14
TABLE III AVERAGE PSNR PERFORMANCE (IN DB) OF VARIOUS RED/BLUE PLANE INTERPOLATION SCHEMES
PSNR of the R plane
PSNR of the B plane
Bilinear
28.70
28.59
Hue-Based [2]
38.67
38.66
(a) Original
(b) AP
(c) AF
(d) SSD
(e) LMMSE
(f) AHDA
(g) VCD
(h) IGD
(i) DFPD
(j) HPHD
(k) RAD
(l) Ours
Fig. 6 Part of the demosaicing results of image 22 obtained with various demosaicing methods
383