TELKOM
NIKA Indonesia
n
Journal of
Electrical En
gineering
Vol. 13, No. 2, Februa
ry 20
15, pp. 238 ~ 246
DOI: 10.115
9
1
/telkomni
ka.
v
13i2.704
8
238
Re
cei
v
ed Au
gust 2, 201
4; Re
vised Sept
em
ber
18, 20
14; Accepted
Octob
e
r 16, 2
014
Similarity and Variance of Color Difference Based
Demosaicing
R.Nirub
a
n*
1
, T.Sree Ren
g
a Raja
2
, R.Deepa
3
1
Sath
yabam
a Univers
i
t
y
, C
h
e
nna
i
2
Electrical a
nd
Electron
ics En
gin
eeri
ng, Ann
a
Univ
ersit
y
(BI
T
Campus), T
i
ruchir
apa
lli, Ind
i
a
3
Computer Sci
ence a
nd En
gi
neer
ing, Princ
e
Dr
.K.Vasudev
an Co
lle
ge of
Engi
neer
in
g an
d T
e
chnolo
g
y
,
Che
nna
i, India.
*Corres
p
o
ndi
n
g
author, e-ma
i
l
: nirub
anme
@
gmail.c
o
m
1
, renga
_raj
a@re
di
ffmail.com
2
,
rkdee
pa1
4@
g
m
ail.com
3
A
b
st
r
a
ct
T
he a
i
m of th
e pr
oject
is t
o
fin
d
the
mi
ssing c
o
l
o
r sa
mp
les
at e
a
c
h
pix
e
l
loc
a
tio
n
by
th
e
combi
natio
n
of si
mil
a
rity a
l
go
rithm an
d th
e
varia
n
ce
of co
lour
differe
nce
alg
o
rith
m. M
a
ny d
e
m
osa
i
cin
g
alg
o
rith
ms fi
nd
ed
ges
in
h
o
ri
z
o
n
t
al
a
nd v
e
r
t
ical
directi
ons
, w
h
ich ar
e
n
o
t suita
b
l
e
for
other
d
i
rectio
ns.
Henc
e us
in
g t
he s
i
mil
a
rity a
l
gorit
hm the
e
dges
are
fou
n
d
i
n
d
i
fferent
directi
ons. But
in
this s
i
mil
a
r
i
ty
alg
o
rith
m so
metimes the
hori
z
o
n
t
al
and v
e
rti
c
al dir
e
ctio
ns a
r
e misle
ad. He
nce this
prob
le
m ca
n be r
e
ctifi
e
d
usin
g the v
a
ria
n
ce of c
o
lo
ur
differenc
e a
l
go
rithm.
It is
pro
v
ed ex
per
imen
tally that th
is n
e
w
de
mos
a
ici
n
g
alg
o
rith
m b
a
se
d on si
mi
larity
and var
i
a
n
ce o
f
colouyr d
i
fference h
a
s bette
r colour p
eak si
gna
l to nois
e
r
a
ti
o
(C
PSN
R
)
. It has b
e
tte
r
o
0
b
j
e
c
ti
ve
an
d
su
bj
e
c
ti
ve
pe
rfo
r
m
a
nce
.
It i
s
an
a
n
a
l
ysi
s stud
y o
f
bo
th
sim
i
l
a
ri
ty and
colour variance algor
ithm
s.
Ke
y
w
ords
:
colo
ur filter array, demosa
i
ci
ng, unifi
ed hi
gh frequ
ency
ma
p, peak si
gna
l to noise
ratio
,
acqu
isitio
n
Copy
right
©
2014 In
stitu
t
e o
f
Ad
van
ced
En
g
i
n
eerin
g and
Scien
ce. All
rig
h
t
s reser
ve
d
.
1. INTRODUCT
I
ON
Digital ca
meras be
com
e
a
nd many pe
ople are
ch
o
o
sin
g
to take
picture
s
wit
h
digital
came
ra
s in
st
ead of film cameras.
Wh
en a digital i
m
age i
s
re
corde
d
, the camera nee
ds to
perfo
rm a si
gnifica
nt am
ount of pro
c
essing to
p
r
ovide the user a viewabl
e image. Th
is
pro
c
e
ssi
ng in
clud
es white
balance adj
ustment
s,
ga
mma co
rre
cti
on, comp
re
ssion an
d mo
re
.
Most co
nsu
m
er digital cameras
capt
ure colou
r
in
formation
with a single li
ght sen
s
o
r
a
nd a
colo
ur filte
r
a
rray
(CFA). T
he
CFA i
s
co
mpoun
d by
a
set
of spe
c
trally se
l
e
ctive filters,
a
rra
ng
ed
in an
interl
ea
ved mo
sai
c
p
a
ttern,
so th
a
t
in ea
ch
pixe
l sa
mple
s o
n
l
y
one
of the
comp
one
nts
of
the col
o
u
r
sp
ectru
m
is cap
t
ured i
n
ste
ad
of capt
u
r
in
g three
color
sa
mples(typicall
y red,green,a
nd
blue) at ea
ch
pixel locatio
n
,these cam
e
ra
capt
u
r
e a
so call
ed ‘m
osai
c’ imag
e, where only one
colo
r is
sa
m
p
led at e
a
ch
locatio
n
. Th
e two mi
ssi
n
g
col
o
rs mu
st be inte
rpo
l
ated from th
e
surro
undi
ng
sampl
e
. A ve
ry impo
rtant
part
of this
i
m
age
processing
is called
col
o
r filter
a
rray
interpol
ation
or dem
osaici
ng.
A colo
r ima
g
e
re
quires
atleast th
ree
co
lor
sampl
e
s
at each pixel
locatio
n
. Co
mpute
r
image
s often
use red, bl
ue and g
r
ee
n. A camera
would n
eed
three sepa
rate sen
s
o
r
s to
compl
e
tely measure the i
m
age. Using
multiple se
n
s
ors to dete
c
t different pa
rts of the visi
ble
spe
c
tru
m
re
q
u
ire
s
splitting
the light ent
ering th
e ca
mera,
so that
the scene i
s
image o
n
to
each
sen
s
o
r
. Precise re
gistration is then required
to align the thre
e image
s. These additio
nal
requi
rem
ents
add a larg
e e
x
pense to the system. Th
u
s
, many cam
e
ra
s use a si
ngle se
nsor
with
a colo
r filter
array. The color filter a
r
ray allo
ws onl
y one pa
rt of the spe
c
tru
m
to pass to
the
sen
s
o
r
so th
at only on
e
colo
r i
s
me
a
s
ured
at ea
ch pixel. Thi
s
mean
s that t
he
came
ra
must
eliminate
the
missin
g two
col
o
r value
s
at e
a
ch pixe
l. This p
r
o
c
e
s
s is
kno
w
n
as
dem
osaici
ng.
The
choi
ce
of the be
st colo
r filter a
r
ray is very
im
port
ant for the fin
a
l image
qu
ality and differe
nt
solutio
n
. The
best
col
o
r filt
er a
r
ray is th
e baye
r
p
a
ttern
whi
c
h i
s
proved a
s
th
e standard p
a
ttern.
The sa
mple b
a
yer pattern is sh
own belo
w
in Figu
re 1.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Sim
ilarity and
Varian
ce of Colo
r Di
ffere
nce Ba
sed
Dem
o
saici
ng (R.Niruba
n)
239
G
00
R
01
G
02
R
03
G
04
R
05
B
10
G
11
B
12
G
03
B
14
G
15
G
20
R
21
G
22
R
23
G
24
R
25
B
30
G
31
B
32
G
33
B
34
G
35
G
40
R
41
G
42
R
43
G
44
R
45
B
50
G
51
B
52
G
53
B
54
G
55
Figure 1. Bayer pattern
Digital still co
lor cam
e
ras are
ba
se
d
o
n
a sin
g
le ch
a
r
ge
coupl
ed device
(
CCD) array
o
r
compl
e
me
nta
r
y metal oxid
e se
micond
u
c
tor
(CMOS)
sen
s
o
r
s an
d
captu
r
e
col
o
r informatio
n
b
y
usin
g three
or more colo
r filters, each
sample
poi
n
t
capturin
g o
n
ly one sam
p
le of the co
lor
spe
c
tru
m
. In a three
-
chip color
came
ra,
the light entering the ca
mera is split a
nd
proje
c
ted o
n
to
each spe
c
tral
sen
s
o
r
. Each
sen
s
o
r
requi
res its
pr
o
p
e
r
driving el
ect
r
ons, a
nd the
sen
s
o
r
s
have
to
be regi
ste
r
ed
pre
c
isely. Th
ese a
ddition
a
l
r
equi
reme
nts had a la
rge
expense to the syste
m
. To
redu
ce
co
st
a
nd co
mplex
i
t
y
,
digit
a
l came
ra man
u
f
a
ct
u
r
er
s u
s
e a si
n
g
le C
CD/
CM
OS
sen
s
o
r
wi
t
h
a colo
r filter a
rray (CFA) to
captu
r
e all th
e th
ree primary c
o
lors
(R,
G
,B) at the s
a
me time.
Colo
r filter a
r
rays
contai
ni
ng on
e or m
o
re
colo
rs for liquid
cry
s
tal displays a
nd othe
r
opto-el
ect
r
oni
c devices a
r
e made by u
s
ing a la
se
r
to ablate po
rtions of a coat
ing on eithe
r
a
colo
red
or tra
n
sp
are
n
t sub
s
trate.
Colo
r
filter
materi
al
are
pla
c
ed i
n
to the a
b
lat
ed op
enin
g
s
and
cured. T
h
e
n
u
mbe
r
of
la
ser–a
b
lated
o
penin
g
s in th
e coated
sub
s
trate
varie
s
,
depe
nding
o
n
the
quality and type of colo
r de
sire
d.
2.
Rev
i
e
w
of Similarit
y
Based Demos
a
icing Algorithm
Similarity based dem
osaici
ng algo
rithm
s
has
two forms. one i
s
th
e without
refi
nement
form an
d the
other i
s
the
with refinem
ent
form.
In
this UHF map acquisitio
n
and simila
rity
based
interpol
ation come
s und
er
without refin
e
ment
a
nd gl
obal e
dge
cl
assificatio
n
o
f
hori
z
ontal
a
nd
vertical
direct
ion
come
s u
nder with
refinement
meth
od. In the
wi
thout refinem
ent meth
od
we
cal
c
ulate the
map index u
s
ing the high frequ
en
cy
co
mpone
nts an
d usin
g this map value
s
we
are inte
rpol
a
t
ing the missing pixel
s
i
n
hori
z
o
n
tal and verti
c
al
dire
ction u
s
i
ng glob
al ed
ge
cla
ssifie
r
sep
a
rately in th
e
refining
met
hod. Thi
s
furt
her
gives
bet
ter color
pea
k si
gnal to
n
o
ise
ratio (CPSNR) value. This i
s
the simila
rit
y
based d
e
m
o
sai
c
in
g algo
rithm.
In this alg
o
rit
h
m the u
n
ifie
d high f
r
eq
u
ency m
ap i
s
formed
by takin
g
the av
erag
e of
every sampl
e
of
red, blue
and green
co
mpone
nt
s ind
epen
dently a
nd the
n
eve
r
y sam
p
le val
ues
are
ind
epen
d
ently su
btra
ct
ed from th
e a
v
erage
val
ue.
The
n
we
ha
ve to n
o
te th
at these val
u
es
are l
a
rger tha
n
zero
o
r
le
sser th
an
ze
ro.
If the value
s
l
a
rge
r
th
an
ze
ro th
en
we
h
a
ve to pl
ot th
at
particula
r val
ue a
s
one
a
n
d
if the
differenced val
ue i
s
le
sse
r
tha
n
zero th
en
we
have
to pl
ot
the
value a
s
ze
ro
. Like thi
s
th
e
unified
high
frequ
en
cy ma
p is fo
rme
d
.
Based
on
this the di
re
ction
of
the edge i
s
found out an
d the missing
sa
mples a
r
e int
e
rpol
ated.
ʎ
(i,j)
=
0,
,
0
1,
(1)
W
h
er
e
ʎ
(i,j) i
s
the
ma
p in
dex to b
e
cal
c
ulate
d
a
nd
h
(
i,j) i
s
the
diff
eren
ce
bet
we
en the
individ
ual
pixels
and
th
e ave
r
ag
e of
the total
pix
e
ls. T
he
ma
p ind
e
x
cal
c
ulation
s
a
r
e
sho
w
n
bel
ow in
Figure 2.
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 13, No. 2, Februa
ry 2015 : 238 – 246
240
153
134
208
145
151
178
40
83
147
145
161
197
147
165
203
75
98
159
69
101
160
23
68
95
19
62
93
63
139
155
28
65
99
18
33
69
(a)
Map Index calcul
ation
s
1 1
1 1
1 1
0 1
1 1
1 1
0 1
0 1
1 1
0 0
0 0
1 1
0 0
0 0
0 1
0 0
0 0
0 0
(b)
Unified High Freq
uen
cy
Map
Figure 2. Flow ch
art of ma
p index cal
c
ul
ations
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Sim
ilarity and
Varian
ce of Colo
r Di
ffere
nce Ba
sed
Dem
o
saici
ng (R.Niruba
n)
241
In the above
figure the
ma
p value for e
a
ch
pixel is f
ound
out by takin
g
the diff
eren
ce
betwe
en the
i
ndividual
pixels
and th
e a
v
erage
of the
total pixels a
r
e
sho
w
n.
While plotting
the
map in the differenced val
ue is gre
a
ter
than ze
ro
the
n
the particul
a
r map value
is plotted as 1
and if the differen
c
e
d
valu
e is less than
zero
then that
particul
a
r val
ue is plotted
as 0.
No
w after forming the ma
p the missing
pixels
are interpol
ated u
s
i
ng the map d
i
rectio
n.
Initially the green
sam
p
le
s are i
n
terpola
t
ed by u
s
ing
the co
mpa
r
ison of the
ma
p value
s
of t
he
neigh
bori
ng g
r
een
sa
mple
s. If they are same then
the
formula to fin
d
the mi
ssi
ng
gree
n
sampl
e
s
are given b
e
l
o
w.
∑
/2
.
1,
0,
(
2
)
The diag
ram
for interpol
ating the missi
n
g
gree
n sam
p
les a
r
e sh
o
w
n belo
w
in Figure 3
in which
1
and
values are
the same then the green
values are interpol
ated b
y
using the
formula (2).
A
0
G
0
A
1
G
1
A
C
G
2
A
2
G
3
A
3
(a)
CFA
Data
λ
0
λ
1
λ
C
λ
2
λ
3
(b)
UHF
M
a
p
Figure 3. Interpolatio
n of missi
ng green
sampl
e
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 13, No. 2, Februa
ry 2015 : 238 – 246
242
If the map value
s
are no
t the same then we h
a
ve
to interpolat
e the missi
n
g
gree
n
sampl
e
s a
s
b
e
low.
ρ
=
G
l
(3)
After interpol
ating the missing g
r
ee
n sample
s, the missi
ng re
d and blue
sa
mples a
r
e
interpol
ated b
y
compa
r
ing
the map valu
es. The missi
ng red a
nd bl
ue sam
p
le
s are interp
olate
d
as
by inte
rpo
l
ating the
missing
re
d a
nd
blue
sam
p
le
s in the
g
r
ee
n
sa
mple
s
whi
c
h
are
al
rea
d
y
pre
s
ent. Th
e
n
the mi
ssi
ng
red
sa
mple
s are i
n
terpola
t
ed in the
blu
e
sa
mple
s p
r
ese
n
t and
th
en
the mi
ssi
ng
b
l
ue
sam
p
les
are
interpolat
ed in
the
re
d
sa
mple
s
whi
c
h
are al
rea
d
y
pre
s
e
n
t. Th
e
missi
ng red a
nd blue
samp
les are interp
ol
ated a
s
by the formul
a gi
ven belo
w
.
Now
the
mi
ssin
g
red
sample
s
in
the
blue
sam
p
les
pre
s
ent
a
nd
the
missing
blue sample
s in the red sa
mples p
r
e
s
e
n
t
are interp
ola
t
ed usin
g the formula give
n
below.
,
,
∑
,
.
,
,
,
.
,
1,
,
,
0,
(
4
)
Here al
so if the map valu
e
s
are not the
same
th
en we have to int
e
rpol
ate the
missi
ng
sam
p
les
as bel
ow:
∑
,
,
,
(
5
)
No
w the missing red an
d bl
ue sam
p
le
s in t
he green
sample
s, whi
c
h are already
present
are obtai
ned
usin
g the formula given b
e
low.
a(s
,t)=
G
(s
,t)+{(A(s
,t-1)-G(s,t-1))+
(A
(s
,t+1)-G(s
,t+
1))}/2
(6)
a(s,t)
=G
(
s
,t)+
{
(A(
s
-
1
,t)-G
(
s
-1,t))
+
(A
(s
+1,
t
)-G
(s
+1
,t))}/2
(7)
3.
Rev
i
e
w
of V
a
riance o
f
Color Differen
ce Algorithm
In this vari
an
ce of
col
o
r
differen
c
e
algo
ri
thm the mi
ssi
ng g
r
ee
n sa
mples are int
e
rpol
ated
in ra
ste
r
scan
mann
er a
s
shown
b
e
low.
Initially the green
sam
p
le i
s
inte
rpol
ated
in a
ra
ste
r
scan
manne
r and
then the missing red and
blue com
p
o
nents a
r
e int
e
rpol
ated ba
sed on the g
r
een
sampl
e
s which we al
rea
d
y interp
olated.
Figu
re
4
sho
w
n
belo
w
i
s
t
he b
a
yer
pattern
with
re
d
as
centre,blue a
s
ce
ntre an
d gree
n as
cen
t
re re
spe
c
tive
ly using which the missing
green
sam
p
l
e
s
are inte
rpol
ated in a ra
ster
scan man
n
e
r
.
Figure 4. Interpolatio
n of missi
ng
green sampl
e
s
in ra
ster scan
ma
nner
To find the missi
ng g
r
ee
n sampl
e
s in
a raste
r
sca
n
manne
r it is ne
ce
ssary to find the
edge di
re
ctio
n whi
c
h m
a
y be ho
rizonta
l
or vertic
al. If the edge di
rectio
n is
horizontal the
n
the
gree
n sa
mple
s are inte
rp
ol
ated acco
rdin
g to the formula (8
) belo
w
.
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Sim
ilarity and
Varian
ce of Colo
r Di
ffere
nce Ba
sed
Dem
o
saici
ng (R.Niruba
n)
243
,
,
,
,
,
,
(
8
)
In this equati
on sm
all g repre
s
e
n
ts th
e gre
en sam
p
les to be in
terpolate
d
an
d the G
rep
r
e
s
ent
s th
e green
sa
m
p
les
whi
c
h
are already p
r
e
s
ent. If the e
dge di
re
ction
is verti
c
al th
en
the formula to
find the missi
ng gre
en sam
p
le is sho
w
n
Equation (9).
,
,
,
,
,
,
,
,
(9)
After interpol
ating the mi
ssi
ng g
r
ee
n
sampl
e
s
accordin
g to the
edge
dire
cti
on, the
missi
ng
re
d
and
blue
sa
mples a
r
e i
n
terpol
ated. T
h
e form
ula to
find the
missi
ng
red
an
d b
l
ue
sampl
e
s i
s
gi
ven belo
w
in the Equation
(10) an
d (1
1) resp
ectively.
,
,
,
,
,
,
(
1
0
)
,
,
,
,
,
,
(
1
1
)
In the above
equation
r and b
represents the mi
ssing
red a
n
d
blue sa
mple
s to be
interpol
ated. G,R,B rep
r
e
s
ents the g
r
ee
n, bl
ue, and red sam
p
le
s which a
r
e al
rea
d
y present.
4. Proposed
Algorithm
In the similarity base
d
demosaici
n
g
al
gorit
hm
t
he missin
g
colo
r sa
mples a
r
e
interpol
ated i
n
ho
rizontal,
v
ertical
and
in diag
onal
dire
ction. Bu
t it sometim
e
s mi
sle
ad t
h
e
hori
z
ontal
an
d vertical
direction
s
. In varian
ce
of co
lor differen
c
e
algorith
m
on
ly the hori
z
o
n
tal
and vertical d
i
rectio
ns a
r
e
detecte
d. So in this al
go
rithm it is the analysi
s
of the both similarity
based d
e
mo
saicin
g alg
o
rit
h
m an
d varia
n
ce
of col
o
r
differen
c
e al
g
o
rithm in
whi
c
h by
com
b
in
ing
both the
alg
o
r
ithm a
ne
w
a
l
gorithm
calle
d dem
osaici
n
g
ba
se
d o
n
si
milarity an
d v
a
rian
ce
of
col
o
r
differen
c
e is f
ound o
u
t.
In this
new algorithm
initially the unified
high
freq
uen
cy map
is formed a
nd
ba
sed o
n
that the edg
e dire
ction
s
are dete
c
ted.
Afte
r detecting the edg
e
directio
n the missi
ng g
r
een
sampl
e
s a
r
e
interpolate
d
based o
n
the simila
rity algorithm a
nd the missi
ng red an
d blue
sampl
e
s
are i
n
terpol
ated a
c
cordi
ng to th
e sam
e
simil
a
rity algo
rithm. Now
usi
n
g the varia
n
ce of
colo
r diffe
ren
c
e
algo
rithm
again
the mi
ssi
ng
gre
en
sampl
e
s a
r
e
interpol
ated i
n
a
ra
ster scan
manne
r, trhe
n the missing
red an
d blu
e
sampl
e
s a
r
e
interpol
ated
according to
the interp
olat
ed
gree
n sa
mple
s usi
ng the varian
ce of col
o
r differe
nce algorith
m
.
The ne
w met
hod by combi
n
ing the
simil
a
rity bas
ed d
e
mosaici
ng a
l
gorithm a
nd
the varian
ce
of
colo
r differe
n
c
e alg
o
rithm
given belo
w
in Equation (1
2), (13
)
.
Similarity image=m
e
rged i
m
age
(12
)
Merg
ed imag
e=recon
s
tru
c
t
ed col
o
r vari
a
n
ce ima
ge
(13)
In this ne
w al
gorithm by
combinin
g the
similarity ba
sed d
e
mo
sai
c
ing al
go
rith
m and the
varian
ce of color differe
nce algorithm t
he edge
di
re
ction
s
are d
e
t
ected pe
rfectly without any
mislea
ding in
any edge di
rectio
ns.
Usi
ng this a
naly
s
is
of both similarity and
colo
r varia
n
ce
algorith
m
the edge di
re
ctio
ns are dete
c
ted in hor
i
z
o
n
tal, vertical an
d diago
nal direction
s
.
5. Experimenta
l
Results
The exp
e
rim
ental results
of the de
mo
saicin
g ba
se
d
on
similarity
and va
rian
ce
of color
differen
c
e a
r
e sh
own bel
ow. Th
e pe
a
k
si
gnal to
n
o
ise
ratio
of this ne
w al
g
o
rithm i
s
sho
w
n
belo
w
. The formula u
s
e
d
to find the peak signal to noi
se ratio is
sho
w
n bel
ow in
Equation (14).
10
log
∑∑
,
,
(14)
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 13, No. 2, Februa
ry 2015 : 238 – 246
244
Where o(s
,t)=
[
o(s
,t)0,o(s
,
t
)
1,o(s,t)2]
an
d the
x(s,t)=[x(s
,t)0,x(s,t
)
1,x(s,t)2] de
noted th
e
co-
ordin
a
tes
(s,t
) of origin
al
and resto
r
ed
image
re
sp
ectively. The
comp
ari
s
on
tabulation of
the
s
i
milarity algorithm, varianc
e
of
c
o
lor diffe
re
nce a
l
gorithm
an
d
the
pro
p
o
s
e
d
alg
o
rithm
are
sho
w
n.
The test ima
ges u
s
e
d
for
the analysi
s
are
sho
w
n a
bove in the F
i
gure
5. In this the 24
image
s are tested fo
r the
three alg
o
rit
h
ms a
nd ex
p
e
rime
ntally it is proved th
at the pro
p
o
s
ed
algorith
m
ha
s the better re
sult wh
en co
mpared to
the simila
rity and colo
r varia
n
c
e alg
o
rithm.
Figure 5. Kodak test ima
g
e
s
used for ex
perim
ent
In the tabular
colum
n
belo
w
it is proved that
the prop
o
s
ed al
gorith
m
has the bette
r re
sult
for the red, g
r
een, blu
e
sa
mples. Th
e b
e
st value
s
are marked in b
o
ld.
Table 1. Co
m
pari
s
on of si
milarity algori
t
hm,
color va
riance algo
rith
m and propo
sed algo
rithm
Image
number
Similarity
based
demosaicing
algorithm
Variance of color difference
algorithm
Proposed metho
d
R
G B
R
G
B
R
G B
1
34.02
34.48
34.04
25.23
33.48
26.36
34.02
34.48
34.04
2
36.43
39.52
37.98
15.02
39.82
25.36
40.44
43.41
43.81
3
39.78
41.27
39.67
23.28
41.13
20.48
44.12
45.07
43.38
4
36.75
40.38
40.08
18.49
40.36
30.39
40.13
43.52
44.84
5
34.48
34.11
34.33
25.65
34.58
25.33
39.46
38.16
38.98
6
35.31
35.86
35.29
28.61
34.42
23.23
40.49
39.33
39.40
7
39.62
40.25
39.02
26.40
40.75
24.35
43.96
43.88
42.53
8
31.03
32.17
31.17
26.56
31.01
26.83
37.10
36.01
37.73
9
38.09
40.30
39.75
30.70
40.18
27.07
43.88
44.28
44.22
10
39.07
40.25
39.63
29.98
39.93
31.06
43.77
44.00
43.74
11
36.14
36.89
36.74
25.46
36.19
28.90
40.10
40.37
41.08
12
39.75
40.96
39.94
27.12
40.50
23.92
44.23
44.69
43.71
13
31.93
31.48
31.47
28.75
30.17
23.08
37.14
34.32
35.11
14
34.17
36.20
34.23
24.30
36.35
21.07
38.81
39.87
39.49
15
36.48
39.25
38.76
20.16
38.23
27.85
39.84
42.66
43.84
16
38.56
39.32
38.48
33.18
38.04
28.46
44.67
42.94
42.50
17
38.86
39.27
38.71
32.36
38.54
30.96
43.39
42.30
42.62
18
34.37
35.56
35.34
25.89
33.00
23.52
38.87
38.20
39.21
19
35.36
36.58
36.23
28.63
34.89
25.28
39.70
40.47
40.44
20
38.67
39.13
37.84
32.64
37.58
24.41
43.68
42.20
41.72
21
36.02
36.32
35.63
26.59
34.71
27.00
40.68
39.43
39.68
22
35.81
37.33
35.84
26.01
36.27
23.43
39.64
40.48
40.44
23
39.74
41.52
40.32
20.16
39.17
19.17
44.23
45.36
45.44
24
33.39
33.99
32.32
29.01
32.42
26.00
38.81
36.85
36.58
Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM
NIKA
ISSN:
2302-4
046
Sim
ilarity and
Varian
ce of Colo
r Di
ffere
nce Ba
sed
Dem
o
saici
ng (R.Niruba
n)
245
Figure 7. PSNR
comp
ari
s
on of blue sa
mples fo
r sim
ilarity, color v
a
rian
ce a
nd p
r
opo
se
d
algorith
m
s
Figure 8. PSNR
comp
ari
s
on of red
sam
p
les
for
simila
rity, color vari
ance and p
r
o
posed
algorith
m
s
Figure 9. PSNR
comp
ari
s
on of gree
n sample
s
for si
milarity, color variance and
propo
se
d
algorith
m
s
15
20
25
30
35
40
45
50
1
2
3
4
5
6
7
8
9
1
0
1112
1314
1516
1718
1920
2122
2324
PSNR
values
images
Blue
PSNR
bps
nr
cv
bps
nr
mebps
nr
0
5
10
15
20
25
30
35
40
45
50
1
3
5
7
9
11
13
15
17
19
21
23
PSNR
values
images
Re
d
PSNR
rp
sn
r
cv
r
p
s
n
r
mer
p
s
n
r
0
5
10
15
20
25
30
35
40
45
50
1
2345
6789
1
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
1
9
2
0
2
1
2
2
2
3
2
4
PSNR
values
images
Gr
een
PSNR
gpsnr
cv
gps
n
r
megps
n
r
Evaluation Warning : The document was created with Spire.PDF for Python.
ISSN: 23
02-4
046
TELKOM
NI
KA
Vol. 13, No. 2, Februa
ry 2015 : 238 – 246
246
The gra
p
h
s
comp
ari
ng the simila
rity algorithm, colo
r varian
ce algorithm
and the
prop
osed alg
o
rithm are shown in belo
w
. Figure
7
sho
w
s the compa
r
ison of blue sampl
e
for
three
algo
rith
ms. Fig
u
re 8
sh
ows th
e
compa
r
ison
of re
d
sampl
e
f
o
r th
ree
alg
o
r
ithms.
Figu
re 9
sho
w
s the co
mpari
s
o
n
of green
sam
p
le for thre
e algo
rithms.
6. Conclu
sion
In this pap
er,
we introdu
ce
a new
algo
ri
thm by combi
n
ing
similarity
and colo
r varian
ce
algorith
m
s ca
lled
simila
rity and
colo
r dif
f
eren
ce
ba
se
d de
mosaici
n
g.we
co
nfirm
ed th
roug
h t
h
e
experim
ents that the
propo
sed
alg
o
rithm
ha
s b
e
tte
r
q
uality improvement th
an t
he
simila
rity and
colo
r varian
ce algorithm
s.
Exploration of the pr
opo
sed alg
o
rithm
s
with the sit
uation identif
ying
the paramete
r
s in
whi
c
h
si
milarity and
color va
ri
an
ce
algorith
m
s
a
r
e ad
aptively impleme
n
ted
in
real life is worth for further i
n
vestigatio
n.
Referen
ces
[1]
Adel
e Dr
obl
as
Green
berg,
S
e
th Gree
nb
erg
.
Digit
al
Ima
g
e
s: A pr
actical
gu
ide. T
a
ta
McGra
w
Hi
ll
pub
licati
ons li
mited. 199
5.
[2]
Ba
yer BE. Col
o
r imagi
ng arr
a
y.
19
76. U.S.Patent 39
71 06
5
.
[3]
Gunturk BK, A
l
tunb
ask Y, M
e
rsere
au. C
o
l
o
r pl
ane
i
n
terp
o
l
atio
n us
in
g
alt
e
rnati
n
g
pro
j
ec
tions.
IEEE
transactio
n
s on
ima
ge pr
ocess
i
ng
. 20
02; 11(
9
)
: 997-10
13.
[4]
Dani
el M, Stef
ano. A. Dem
o
s
i
acin
g
w
i
t
h
dir
e
ctiona
l filteri
n
g
and posteri
ori
decisi
on.
IEEE transaction
on i
m
a
ge pr
ocessin
g
. 200
7; 16(1); 132-
14
1.
[5]
Hamilton JF, Adams JE. Adaptive
col
o
r pl
a
ne inter
pol
atio
n in sin
g
le s
e
n
s
or electro
n
ic
camera. U.S.
Patent. 198
7; 5: 629 67
8.
[6]
Chu
ng-Ye
n S,
W
en C
h
u
ng
K. Effective d
e
mosa
icin
g us
i
ng s
ubb
an
d c
o
rrelati
on.
IEE
E
transacti
on.
200
9; 55(1): 19
9-20
4.
[7]
King-K
ong-c
h
u
ng, Yuk-H
ee
Cha
n
. Col
o
r
demos
aici
ng u
s
ing var
i
a
n
ce
of color d
i
fferences.
IE
EE
transactio
n
on
Imag
e proc
essi
ng.
[8]
Kuo
Lia
n
g
C
h
u
n
k, W
en-Je
n Y
ang
W
en-Mi
ng
Yan,
C
h
u
ng-C
houW
a
ng.
De
mosaici
n
g
of c
o
lor
filter
arra
y
captured im
ages using
gradient edge
detec
tion masks
and adaptive
he
terogeneit
y
pr
ojection.
IEEE
transactio
n
on i
m
a
ge pr
ocessi
ng
. 200
8; 17(1
2
): 2356-
23
67.
[9]
Milan
So
nka,
Vaclav
Hl
avac,
Ro
ger
Bo
yl
e.
Digita
l
imag
e
process
i
ng
a
n
d
com
puter
vis
i
on.
C
e
ng
age
Lear
nin
g
. 2
0
08.
[10]
Rafae
l
C Go
n
z
ales, R
i
char
d
E W
oods. Di
gital
im
ag
e pr
ocessi
ng. Pe
ar
son Ed
ucati
on,
Inc, Prentice
Hall p
u
b
licati
o
n
.
2009.
[11]
Rafae
l
C
Gon
z
ales, S
l
ev
en
L Ed
di
ns, Ric
h
a
rd
E
W
o
o
d
s. Digita
l
imag
e process
i
ng
us
i
ng
MAT
L
AB.
Pearso
n Educ
ation, Inc, Pren
tice Hall
pub
lic
ation.
[12]
Xi
n Li, Mic
h
e
a
l
T
Orchard.
Ne
w
e
dge
direct
ed Interp
ol
atio
n.
IEEE transactionon im
age
process
i
ng
.
200
1; 10(1
0
): 1521-
152
7.
[13]
Xi
n L.
D
e
mosa
i
c
ing
b
y
succes
s
ive appr
o
x
im
a
t
ion.
IEEE transaction on image
proc
essing
. 200
5;
2
0
0
5
;
14(3): 37
0-3
7
9
.
[14]
Yuji Itoh. Simil
a
rit
y
b
a
se
d de
mo
saici
ng us
in
g unifi
ed h
i
gh f
r
equ
enc
y ma
p.
IEEE transaction on imag
e
process
i
ng
. 2
0
12; 57(2): 5
97-
605.
Evaluation Warning : The document was created with Spire.PDF for Python.