Patent ID: 6944337

Claim:
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 part(s) of the image optically filtered with a filter having a first color, and the second group (R/B) of pixels representing part(s) 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: means (ZSB) for converting 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, means ( 7 ) for contour filtering said zero switched array and outputting said contour information, the filtering means comprising: means for, for each pixel in the zero switched array, defining a sub array in the array of pixels where the pixel to be filtered is positioned in a predetermined position within the sub array; a first array of filter coefficients for use in the filtering means 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 filtering means when the pixel to be filtered is a pixel from the second group of pixels, the first and second arrays having the same dimensions as the sub array and fulfilling a set of rules comprising the filter coefficient being zero at the predetermined position, and when dividing the filter coefficients of the array into a number of disjoint groups of diagonal coefficients where said disjoint groups are symmetrical around a center coefficient of the array, a filter coefficient exists in each group which equals the sum of the remaining filter coefficients in said group; and means for calculating a filtered pixel value, said calculation being performed by multiplying each coefficient in said first or second array of filter coefficients with each correspondingly placed pixel in said sub array from either said first or second group of pixels and adding the result of each multiplication to obtain a filtered pixel value for each of said sub arrays of pixels.