IMAGE PROCESSING METHOD FOR THE REMOVAL OF SPOT DEFECTS AND APPARATUS THEREFOR

Abstract: A method for processing an image for the removal of spot defects comprising scanning and sampling the image to generate an array of pixel image values and constructing a corresponding array of pixel image values for the processed image by carrying out the following steps: (a) examining the image values of each pixel of a predetermined subset of pixels in a block surrounding a central pixel thereby determining the image value corresponding to the highest and lowest values in said predetermined subset of said block (Ahigh and Alow respectively), (b) determining the image value corresponding to the central pixel of said block (Acentre), (c) calculating either the ratio: R1=(Alow-Acentre)/(Ahigh-Alow) or the ratio R2=(Acentre-Ahigh)/(Ahigh-Alow), (d) if the ratio is positive and its value is above a predetermined threshold value, writing an average value calculated on image values in the block to the element of the processed image array corresponding to said central pixel or, if not, writing the existing value (Acentre) to said element, and (e) repeating steps (a) to (d) until every pixel has been processed as the central pixel.

Description: IMAGE PROCESSING METHOD FOR THE REMOVAL OF SPOT DEFECTS AND APPARATUS THEREFOR The present invention relates to image processing methods and apparatus for removing spot defects from an image reconstructed from processed image signals generated by scanning and sampling an original image. Such a process takes the form of dividing up the original image into image elements or "pixels", generating an array of image values representative of the content of these pixels, processing these pixel image values so as to remove or reduce unwanted components therein and constructing an array of pixel image values corresponding to the desired processed image. Images, in particular those scanned and displayed electronically, may be degraded. by several forms of noise, including: O) Broadband noise affecting all pixels, for example photographic grain. A variety of image processing techniques have been proposed using filtering and transform methods for the suppression of broadband noise, e.g. in US Patent 4,442,454 or copending application No. (2) Noise consisting of randomly distributed modifications of image values corresponding to single or small groups of pixels. Such an effect has been referred to as "salt and pepper" noise because it may consist of random white and/or black spots. These may arise at various stages, including: (a) in the formation of the original image, (b) during image sampling, or (c) in image data handling. Methods to detect and remove isolated spot defects are described in Rosenfeld, A. and Kak, A.C., "Digital Picture Processing", Academic Press, 1976, and Pratt, . . , "Digital Image Processing", Wiley, 1978. These procedures calculate the difference between the central pixel value and either the mean or the extreme of its neighbourhood pixels. The central pixel is replaced by a local average value if the difference exceeds an absolute threshold. 5 Such a technique inevitably results in loss of overall sharpness of the image as a large amount of high frequency information is lost especially in cases where the nature of the image and the spot defects necessitate the use of a low threshold. £0 The present invention provides a method which removes unwanted spot defects without unduly affecting overall sharpness for images even in cases in which the spot defects have image values less than the maximum or greater than the minimum values. 15 According to the present invention there is provided a method for processing an image for the removal of spot defects comprising scanning and sampling the image to generate an array of pixel image values and constructing a corresponding array of pixel 20 image values for the processed image by carrying out the following steps: (a) examining the image values of each pixel of a predetermined subset of pixels in a block surrounding a central pixel thereby determining the image value 25: corresponding to the highest and lowest values in said predetermined subset of said block (Ah.i.gh. and A-lo.w respectively), (b) determining the image value corresponding to 3 ,0 n the central p e ixel of said block (Acentre), (c) calculating either the ratio: A. A D = low — centre 35 l A high - A low or the ratio R _ centre - high 2 A high - A low (d) if the ratio is positive and its value is above a predetermined threshold value, writing an average value calculated on image values in the block to the element of the processed image array corresponding to said central pixel or, if not, writing the existing value ( A ce ntre^ to said element, and (e) repeating steps (a) to (d) until every pixel has been processed as the central pixel. By using the value R, in step (c) low image value spot defects will be corrected. Alternatively by using R 2 high image value spots will be corrected. If both R and R are calculated in step (c) and the corrected value is written to the processed image array if either of R, and R 2 is positive and above the threshold value both types of defect will be corrected.. Only one-of them, of course, can be positive for each block location. It is preferred that the predetermined subset of pixels of step (a) comprises all the pixels lying on the periphery of the block. In a (3 x 3) pixel block there are, of course, 8 peripheral pixels and one central one; however in a larger block, such as a (5 x 5) pixel block, there are 16 peripheral pixels, one central pixel and eight intermediate ones. It might sometimes be desirable to take account of these intermediate pixels. The average value referred to in step (d) may be obtained by calculating the median or the arithmetic mean of all the pixel image values in the block except for the central pixel. Alternatively less than all the possible pixel image values could be used, eg just the peripheral ones, or a system of weighting these values could be employed. The simplest way to implement the present method is by comparison of the value of each central pixel with the eight pixels values in the immediate (3 x 3) neighbourhood, of which the value of the smallest, A(l), and the largest, A(8), are noted. In this case the neighbourhood range, A.. . — A, , is determined by high low the difference between these two values, Range = A(8) - A(l). Similarily, the central—neighbourhood difference is, in this case: A(l) - A nt (for the calculation of R 1 or A centre " ~ A ^ ^ for the calculation ofr R 2^ * If the difference is zero or has a negative value, then the central pixel is assumed not to be a defect, its value is unchanged, and the process is repeated for the next pixel. Otherwise the ratio R. or R 2 is calculated. If the value of the ratio is above the predetermined value, the value of the corresponding pixel in the " ,processed image array is set to an average value calculated on the image values in the block. At its simplest this value is the median or, preferably, the arithmetic mean of the eight peripheral image values in the block. The pixel value remains unchanged if the ratio is below the level of the threshold: it is assumed to represent either image detail or broadband noise. The predetermined threshold is dependent on the image and defect characteristics, and is optimised to remove the maximum number of spot defects whilst having the minimum effect on image information. Experiment indicates that the threshold may be set to a very small value before perceptibly degrading the image. A suitable ratio threshold for a typical photographic image is around 0.25 when the pixel block is (5 x 5) and the predetermined subset comprises the peripheral pixels. It is to be understood however that the actual value adopted will depend upon the sharpness of the original image. An algorithm which employs a (3 x 3) neighbourhood is unable to detect any spot defects other than single pixels. Experiment indicates that some spot defects are larger than single pixels hence are not detected, and so remain in the resultant images. An improvement is achieved by the use of the sixteen perimeter pixels of a (5 x 5) block as the comparison subset, which will permit the detection of a larger spot defect within the perimeter. There is a chance, however, that other spot defects may overlap the (5 x 5) perimeter itself, which will reduce the chance of detecting the central spot. This problem can be reduced by writing each corrected central pixel image value back into the original array and not using a separate array to record the processed image values. Subsequent steps will then use the corrected values already determined by the processing in earlier steps. The effect of this is to increase the efficiency of spot defect removal considerably with no visible detriment to the picture information. The pefformance can be " also be improved in two further ways. The first is to ignore the most extreme or the two most extreme image values of the smallest or largest pixel image values of the predetermined subset of each block when calculating R, or R 2 respectively. For example, if the subset represents the 16 peripheral pixels of a ( x 5) block and the method is being carried out to reduce only low image value spot defects, the rati R, will become: R _ A(3) - A centre K l ~ A(16) - A(3) . where, as before, A(l) to A(16) are ranked in image value, A ( 16 ) De * n S tne highest. If the method is being carried out to reduce only high image value spot defects, the ratio R ? will become: D - Acentre A(14) κ 2 A(14) - A(l) This will reduce the interference on the removal of spots by the remaining defects, and also by any image detail information that may lie in the neighbourhood. In the case of the (5 x 5) block the exclusion of only the most extreme pixel value from the operation leaves many defects undetected, whilst excluding the three most extreme pixel values visibly reduces the image sharpness to a small degree. Secondly, it is possible to further reduce the interference of picture detail on spot removal, although not to eliminate it, by operating the algorithm only on the high-frequency content of the image. The effect of high-pass filtering is to leave the amplitude of single pixel and small area defects almost unchanged, while considerably reducing the amplitude of low-frequency fluctuations within the neighbourhood. If a spot is detected in the high-pass image the pixel value is set to zero: this corresponds to replacing the value in the full bandwidth image with a weighted average of the image values of all the pixels in the neighbourhood. It is possible to apply the spot defect removal algorithm to image data either before or after broadband noise suppression. However, the reduction of noise fluctuations in the area of the neighbourhood due to the noise suppression algorithm described in US Patent 4,442,454 permits the present defect removal algorithm to operate most efficiently if noise suppression is performed first. The present invention also provides an apparatus comprising means for sampling the brightness of an image at a regular array of locations and providing an orderly sequence of pixel image values as input to means for processing said values according to the method of the present invention and generating a sequence of modified pixel image values that correspond to sampled brightness values of the processed image.

Claims: CLAIMS 1. A method for processing an image for the removal of spot defects comprising scanning and sampling the image to generate an array of pixel image values and constructing a corresponding array of pixel image values for the processed image by carrying out the following steps: (a) examining the image values of each pixel of a predetermined subset of pixels in a block surrounding a central pixel thereby determining the image value corresponding to the highest and lowest values in said predetermined subset of said block (An.l.gn. and Al.ow. respectively), (b) determining the image value corresponding to the central pixel of said block ( A centre ) > (c) calculating either the ratio: low — centre 'high - low or the ratio A centre - A high A high - A low (d) if the ratio is positive and its value is above a predetermined threshold value, writing an average value calculated on image values in the block to the element of the processed image array corresponding to said central pixel or, if not, writing the existing value ( A cen t re ) to said element, and (e) repeating steps (a) to (d) until every pixel has been processed as the central pixel. 2. A method as claimed in claim 1 in which both R and R are calculated in step (c) and in which the corrected value is written to the processed image array if either of R. and R_ is positive and above the threshold value. 3. A method as claimed in claim 1 or 2 wherein the size of the block is (3 x 3) or (5 x 5) pixels. 4. A method as claimed in any of claims 1 to 3 wherein the predetermined subset of pixels of step (a) comprises the peripheral pixels of the block. 5. A method as claimed in any of claims 1 to 4 in which the average value of step (d) is the arithmetic mean of the pixel image values of the predetermined subset. 6. A method as claimed any of claims 1 to 5 wherein there is no separate processed image array and the corrected image values are written back to the original image array and subsequent processing utilises any already corrected image value. 7. A method as claimed in any of claims 1 to 5 wherein the most extreme or the two most extreme smallest or largest image values of each predetermined subset of pixels in the block are ignored when calculating R.. or R respectively. 8. A method as claimed in any of claims 1 to 7 in which the processing is performed on a high pass version of the original signal which, after said processing, is recombined with the complimentary low pass version. 9. An apparatus comprising means for sampling brightness of an image at a regular array of locations and providing an orderly sequence of image signal values as input to means for processing said values according to the method of any of Claims 1 to 6 and generating a sequence of modified image signal values that correspond to sampled brightness values of the processed image.

Inventors: LOVERIDGE JENNIFER CLARE, POWELL PHILIP GEORGE, LOVERIDGE, JENNIFER, CLARE, POWELL, PHILIP, GEORGE
Applicants: EASTMAN KODAK CO, KODAK LTD, EASTMAN KODAK COMPANY, KODAK LIMITED
Application year: 1987
Main classification: G06F15
IPC codes: G06T5