The present invention relates to interpolating a missing color value of a
given pixel in an array of pixels. The missing color value is determined
from color values of neighboring pixels using a median-based technique in
which the median is taken of the four pixels values of the horizontally
and vertically neighboring pixels (G1 G4) having a same color as the
missing color value, and color information from at least one other color
(R/B) at the given pixel.