A method and a system for processing images using interpolating. A variation
value
for different sets of pixels is determined, and the set of pixels with the highest
correlation (lowest numeric value) is selected. A missing color at a given pixel
is expressed in terms of the information contained in the selected set of pixels.
If the variation value is below a certain threshold, due to noise or other factors,
an alternative set of pixels using a different variation method may be selected.
The missing color is estimated as a weighted sum of, e.g., the green samples divided
by the weighted sum of, e.g., the red samples multiplied by the sampled value from
the pixel to be estimated.