<s>
Directional	B-Algorithm
Cubic	I-Algorithm
Convolution	I-Algorithm
Interpolation	I-Algorithm
(	O
DCCI	O
)	O
is	O
an	O
edge-directed	O
image	B-Algorithm
scaling	I-Algorithm
algorithm	O
created	O
by	O
Dengwen	O
Zhou	O
and	O
Xiaoliu	O
Shen	O
.	O
</s>
<s>
By	O
taking	O
into	O
account	O
the	O
edges	O
in	O
an	O
image	O
,	O
this	O
scaling	O
algorithm	O
reduces	O
artifacts	O
common	O
to	O
other	O
image	B-Algorithm
scaling	I-Algorithm
algorithms	O
.	O
</s>
<s>
Copy	O
the	O
original	O
pixels	B-Algorithm
to	O
the	O
output	O
image	O
,	O
with	O
gaps	O
between	O
the	O
pixels	B-Algorithm
.	O
</s>
<s>
Calculate	O
the	O
pixels	B-Algorithm
for	O
the	O
diagonal	O
gaps	O
.	O
</s>
<s>
Calculate	O
the	O
pixels	B-Algorithm
for	O
the	O
remaining	O
horizontal	O
and	O
vertical	O
gaps	O
.	O
</s>
<s>
Evaluation	O
of	O
diagonal	O
pixels	B-Algorithm
is	O
done	O
on	O
the	O
original	O
image	O
data	O
in	O
a	O
4×4	O
region	O
,	O
with	O
the	O
new	O
pixel	B-Algorithm
that	O
is	O
being	O
calculated	O
in	O
the	O
center	O
,	O
in	O
the	O
gap	O
between	O
the	O
original	O
pixels	B-Algorithm
.	O
</s>
<s>
This	O
can	O
also	O
be	O
thought	O
of	O
as	O
the	O
7×7	O
region	O
in	O
the	O
enlarged	O
image	O
centered	O
on	O
the	O
new	O
pixel	B-Algorithm
to	O
calculate	O
,	O
and	O
the	O
original	O
pixels	B-Algorithm
have	O
already	O
been	O
copied	O
.	O
</s>
<s>
Edge	O
in	O
up-right	O
direction	O
—	O
interpolates	B-Algorithm
along	O
down-right	O
direction	O
.	O
</s>
<s>
Edge	O
in	O
down-right	O
direction	O
—	O
interpolates	B-Algorithm
along	O
up-right	O
direction	O
.	O
</s>
<s>
Smooth	O
area	O
—	O
interpolates	B-Algorithm
in	O
both	O
directions	O
,	O
then	O
multiples	O
the	O
values	O
by	O
weights	O
.	O
</s>
<s>
To	O
avoid	O
division	O
and	O
floating-point	B-Algorithm
operations	O
,	O
this	O
can	O
also	O
be	O
expressed	O
as	O
100	O
*	O
(	O
1	O
+	O
d1	O
)	O
>	O
115	O
*	O
(	O
1	O
+	O
d2	O
)	O
,	O
and	O
100	O
*	O
(	O
1	O
+	O
d2	O
)	O
>	O
115	O
*	O
(	O
1	O
+	O
d1	O
)	O
.	O
</s>
<s>
For	O
an	O
edge	O
in	O
the	O
up-right	O
direction	O
,	O
one	O
interpolates	B-Algorithm
in	O
the	O
down-right	O
direction	O
.	O
</s>
<s>
The	O
pixel	B-Algorithm
value	O
will	O
need	O
to	O
be	O
forced	O
to	O
the	O
valid	O
range	O
of	O
pixel	B-Algorithm
values	O
(	O
usually	O
0	O
to	O
255	O
)	O
.	O
</s>
<s>
For	O
an	O
edge	O
in	O
the	O
down-right	O
direction	O
,	O
one	O
interpolates	B-Algorithm
in	O
the	O
up-right	O
direction	O
.	O
</s>
<s>
The	O
pixel	B-Algorithm
value	O
will	O
need	O
to	O
be	O
forced	O
to	O
the	O
valid	O
range	O
of	O
pixel	B-Algorithm
values	O
(	O
usually	O
0	O
to	O
255	O
)	O
.	O
</s>
<s>
In	O
the	O
smooth	O
area	O
,	O
edge	O
strength	O
from	O
up-right	O
will	O
contribute	O
to	O
the	O
down-right	O
sampled	O
pixel	B-Algorithm
,	O
and	O
edge	O
strength	O
from	O
down-right	O
will	O
contribute	O
to	O
the	O
up-right	O
sampled	O
pixel	B-Algorithm
.	O
</s>
<s>
The	O
pixel	B-Algorithm
value	O
will	O
need	O
to	O
be	O
forced	O
to	O
the	O
valid	O
range	O
of	O
pixel	B-Algorithm
values	O
(	O
usually	O
0	O
to	O
255	O
)	O
.	O
</s>
<s>
Evaluating	O
the	O
remaining	O
pixels	B-Algorithm
is	O
done	O
on	O
the	O
scaled	O
image	O
data	O
in	O
a	O
7×7	O
region	O
,	O
with	O
the	O
new	O
pixel	B-Algorithm
that	O
is	O
being	O
calculated	O
in	O
the	O
center	O
.	O
</s>
<s>
These	O
calculations	O
either	O
depend	O
on	O
the	O
original	O
pixels	B-Algorithm
of	O
the	O
image	O
or	O
on	O
a	O
diagonal	O
pixel	B-Algorithm
calculated	O
in	O
the	O
previous	O
step	O
.	O
</s>
<s>
Edge	O
in	O
horizontal	O
direction	O
—	O
interpolates	B-Algorithm
along	O
vertical	O
direction	O
.	O
</s>
<s>
Edge	O
in	O
vertical	O
direction	O
—	O
interpolates	B-Algorithm
along	O
horizontal	O
direction	O
.	O
</s>
<s>
Smooth	O
area	O
—	O
interpolates	B-Algorithm
in	O
both	O
directions	O
,	O
then	O
multiples	O
the	O
values	O
by	O
weights	O
.	O
</s>
<s>
Consider	O
a	O
7×7	O
diamond-shaped	O
region	O
centered	O
on	O
the	O
pixel	B-Algorithm
to	O
calculate	O
,	O
using	O
only	O
pixel	B-Algorithm
values	O
from	O
the	O
original	O
,	O
and	O
pixel	B-Algorithm
values	O
added	O
from	O
the	O
diagonal	O
direction	O
.	O
</s>
<s>
To	O
calculate	O
d1	O
,	O
take	O
the	O
sum	O
of	O
the	O
absolute	O
differences	O
of	O
the	O
horizontal	O
edges	O
,	O
sampling	O
these	O
pixel	B-Algorithm
values	O
:	O
</s>
<s>
To	O
calculate	O
d2	O
,	O
take	O
the	O
sum	O
of	O
the	O
absolute	O
differences	O
of	O
the	O
vertical	O
edges	O
,	O
sampling	O
these	O
pixel	B-Algorithm
values	O
:	O
</s>
<s>
To	O
avoid	O
division	O
floating-point	B-Algorithm
operations	O
,	O
this	O
can	O
also	O
be	O
expressed	O
as	O
100	O
*	O
(	O
1	O
+	O
d1	O
)	O
>	O
115	O
*	O
(	O
1	O
+	O
d2	O
)	O
,	O
and	O
100	O
*	O
(	O
1	O
+	O
d2	O
)	O
>	O
115	O
*	O
(	O
1	O
+	O
d1	O
)	O
.	O
</s>
<s>
For	O
a	O
horizontal	O
edge	O
,	O
one	O
interpolates	B-Algorithm
in	O
the	O
vertical	O
direction	O
,	O
using	O
only	O
the	O
column	O
centered	O
at	O
the	O
pixel	B-Algorithm
.	O
</s>
<s>
The	O
pixel	B-Algorithm
value	O
will	O
need	O
to	O
be	O
forced	O
to	O
the	O
valid	O
range	O
of	O
pixel	B-Algorithm
values	O
(	O
usually	O
0	O
to	O
255	O
)	O
.	O
</s>
<s>
For	O
a	O
vertical	O
edge	O
,	O
one	O
interpolates	B-Algorithm
in	O
the	O
horizontal	O
direction	O
,	O
using	O
only	O
the	O
row	O
centered	O
at	O
the	O
pixel	B-Algorithm
.	O
</s>
<s>
The	O
pixel	B-Algorithm
value	O
will	O
need	O
to	O
be	O
forced	O
to	O
the	O
valid	O
range	O
of	O
pixel	B-Algorithm
values	O
(	O
usually	O
0	O
to	O
255	O
)	O
.	O
</s>
<s>
In	O
the	O
smooth	O
area	O
,	O
horizontal	O
edge	O
strength	O
will	O
contribute	O
to	O
the	O
weight	O
for	O
the	O
vertically	O
sampled	O
pixel	B-Algorithm
,	O
and	O
vertical	O
edge	O
strength	O
will	O
contribute	O
to	O
the	O
weight	O
for	O
the	O
horizontally	O
sampled	O
pixel	B-Algorithm
.	O
</s>
<s>
The	O
pixel	B-Algorithm
value	O
will	O
need	O
to	O
be	O
forced	O
to	O
the	O
valid	O
range	O
of	O
pixel	B-Algorithm
values	O
(	O
usually	O
0	O
to	O
255	O
)	O
.	O
</s>
<s>
Possible	O
things	O
to	O
do	O
include	O
replicating	O
the	O
boundary	O
pixel	B-Algorithm
,	O
wrapping	O
pixels	B-Algorithm
from	O
the	O
other	O
side	O
of	O
the	O
image	O
,	O
wrapping	O
the	O
same	O
side	O
of	O
the	O
image	O
in	O
reverse	O
,	O
or	O
using	O
a	O
particular	O
border	O
color	O
value	O
.	O
</s>
<s>
Color	O
images	O
are	O
not	O
specified	O
by	O
the	O
algorithm	O
,	O
however	O
,	O
one	O
can	O
sum	O
all	O
RGB	O
component	O
differences	O
when	O
calculating	O
edge	O
strength	O
,	O
and	O
use	O
all	O
RGB	O
components	O
when	O
interpolating	O
the	O
pixels	B-Algorithm
.	O
</s>
