1. A method of interpolating a missing color value of a pixel, said pixel forming part of an array of pixels generated by an image sensor having a color filter array, said array of pixels comprising a first and a second group of pixels, wherein the first group of pixels represents parts of an image optically filtered with a filter having a first color (G), and wherein the second group of pixels represents parts of the image optically filtered with one or more filters having one or more second colors (R, B), each pixel of the second group having a vertical and a horizontal neighboring pixel of the first group, said method comprising: providing individual first color informations of all neighboring vertical and horizontal pixels, selecting a pixel of the second group and providing second color information about the one or more second colors at the position of the selected pixel, and interpolating the missing color value at the position of the selected pixel using the individual first color informations and the second color information, said interpolating step comprising the step of calculating a median value of the individual first color informations and the second color information, wherein said interpolating step comprises: determining whether the selected pixel forms part of an edge in the image and whether said edge has an angle to a vertical line being substantially different from 90 degrees, said vertical line being defined by the neighboring vertical pixels to the selected pixel.