1. A contour filter for providing contour information from an array of pixel values representing an image, said array comprising a first and a second group of pixels, the first group (G) of pixels representing at least a part of the image optically filtered with a filter having a first color, and the second group (R/B) of pixels representing at least a part of the image optically filtered with one or more filters having one or more second colors, each pixel in the first group having a vertical and a horizontal neighboring pixel of the second group, said filter comprising: a converter which converts said array of pixel values to a zero switched array, where the pixel values of the pixels in the second group are replaced by zero, a contour filter for filtering said zero switched array and outputting said contour information, comprising: a definition generator for defining a sub array in the array of pixels, for each pixel in the zero switched array, where the pixel to be filtered is positioned in a pre-determined position within the sub array; a first array of filter coefficients for use in the contour filter when the pixel to be filtered is a pixel from the first group of pixels, and a second array of filter coefficients for use in the contour filter when the pixel to be filtered is a pixel from the second group of pixels; and a calculator for calculating a filtered pixel value.