A method of processing a stream of pixel values in an image processing system , wherein the stream of pixel values represents an image as a two-dimensional array of pixel values, the method comprising: implementing processing of a particular pixel value of the stream by operating on a particular subset of pixel values of the stream, wherein the particular subset of pixel values represents a contiguous block of pixel values within the two-dimensional array which includes and surrounds the corresponding particular pixel value, wherein the processing of the particular pixel value is implemented by: defining (S306, S320) a set of groups into which pixel values within the particular subset can be grouped, wherein the set comprises three or more groups; classifying (S308, S322) each of the pixel values within the particular subset into a group of the set of groups; processing (S310, S324) the particular pixel value using one or more of the pixel values of the particular subset in dependence on the classification of the pixel values of the particular subset into the groups, wherein said processing the particular pixel value comprises performing, within a processing module of the image processing system, multiple processing functions which depend upon the classification of pixel values of the particular subset into the groups, such that said classification of the pixel values within the particular subset into the groups is used for said multiple processing functions, wherein the multiple processing functions comprise two or more of: (i) defective pixel detection, (ii) defective pixel correction, (iii) denoising, (iv) sharpening, and (v) demosaicing, and wherein said two or more of the multiple processing functions comprise at least one of defective pixel detection, defective pixel correction and sharpening, and wherein said at least one of defective pixel detection, defective pixel correction and sharpening use the pixel values classified into more than one of the groups; and outputting (S312, S326) the processed particular pixel value. defining (S306, S320) a set of groups into which pixel values within the particular subset can be grouped, wherein the set comprises three or more groups; classifying (S308, S322) each of the pixel values within the particular subset into a group of the set of groups; processing (S310, S324) the particular pixel value using one or more of the pixel values of the particular subset in dependence on the classification of the pixel values of the particular subset into the groups, wherein said processing the particular pixel value comprises performing, within a processing module of the image processing system, multiple processing functions which depend upon the classification of pixel values of the particular subset into the groups, such that said classification of the pixel values within the particular subset into the groups is used for said multiple processing functions, wherein the multiple processing functions comprise two or more of: (i) defective pixel detection, (ii) defective pixel correction, (iii) denoising, (iv) sharpening, and (v) demosaicing, and wherein said two or more of the multiple processing functions comprise at least one of defective pixel detection, defective pixel correction and sharpening, and wherein said at least one of defective pixel detection, defective pixel correction and sharpening use the pixel values classified into more than one of the groups; and outputting (S312, S326) the processed particular pixel value. <EOS>