1. For a particular pixel in a matrix of pixels, the particular pixel having a value for a first color but not for a second color, a machine implemented method for calculating a value for the second color for the particular pixel, comprising: selecting a first set of neighboring pixels that are situated on a first side of the particular pixel, the first set of neighboring pixels comprising a first subset of pixels having one or more values for the first color and a second subset of pixels having one or more values for the second color; based upon the one or more values for the first color from the first subset of pixels and the one or more values for the second color from the second subset of pixels, determining a first representative relationship between values for the second color and values for the first color for the first set of neighboring pixels; selecting a second set of neighboring pixels that are situated on a second side of the particular pixel which is opposite the first side, the second set of neighboring pixels comprising a third subset of pixels having one or more values for the first color and a fourth subset of pixels having one or more values for the second color; based upon the one or more values for the first color from the third subset of pixels and the one or more values for the second color from the fourth subset of pixels, determining a second representative relationship between values for the second color and values for the first color for the second set of neighboring pixels; based upon the first and second representative relationships, determining a target relationship between the value for the second color for the particular pixel and the value for the first color for the particular pixel; and based upon the target relationship and the value for the first color for the particular pixel, calculating the value for the second color for the particular pixel.