Edge Sensing Interpolation Algorithm I
-
From our description of non-adaptive algorithms, it can be seen that most
of the color interpolation is done by averaging neighboring pixels
indiscriminately. This causes an artifact -- the "zipper effect" in the
interpolated image. To combat with this artifact, it is natural to derive
an algorithm that can detect local spatial features present in the pixel
neighborhood and then makes effective choices as to which predictor to
use that neighborhood. The result is a reduction or elimination of "zipper-type"
artifacts. And algorithms that involve this kind of "intelligent" detection
and decision process are referred as adaptive color interpolation
algorithms.
-
Human visual systems are sensitive to edges present in the images and non-adaptive
color interpolation algorithms often fail around edges since they are not
able to detect "edges". To deal with edges, let's first look at an
edge sensing algorithm[14][3][15].
-
For convenience, figure 1 is duplicated here
-
Interpolation of green pixels :
-
First, define two gradients, one in horizontal direction, the other in
vertical direction, for each blue/red position. For instance, consider
B8 : define two gradients as
,
where | . | denotes absolute value
-
Define some threshold value T
-
The algorithm then can be described as follows :

-
The choice of T depends on the images and can have defferent optimum values
from different neighborhoods. A particular choice of T is
[4]. In this case, the algorithm becomes :
-
Interpolation of red/blue
pixels : same as in Smooth hue transition interpolation in logarithmic
exposure space. Other methods may be used as well.