The present invention relates to an image processing apparatus and image processing method, and a computer program, which can visually remove noise components from image data on which noise components that are not contained in the original signal components are superposed.
Conventionally, a technique for removing noise components from a digital image on which noise components that are not contained in the original signal components are superposed has been studied. The characteristics of noise to be removed are diverse depending on their generation causes, and noise removal methods suited to those characteristics have been proposed.
For example, when an image input device such as a digital camera, image scanner, or the like is assumed, noise components are roughly categorized into noise which depends on the input device characteristics of a solid-state image sensing element or the like and input conditions such as an image sensing mode, scene, or the like, and has already been superposed on a photoelectrically converted analog original signal, and noise which is superposed via various digital signal processes after the analog signal is converted into a digital signal via an A/D converter.
As an example of the former (noise superposed on an analog signal), impulse noise that generates an isolated value to have no correlation with surrounding image signal values, noise resulting from a dark current of the solid-state image sensing element, and the like are known. As an example of the latter (noise superposed during a digital signal process), noise components are amplified simultaneously with signal components when a specific density, color, and the like are emphasized in various correction processes such as gamma correction, gain correction for improving the sensitivity, and the like, thus increasing the noise level.
As an example of deterioration of an image due to noise superposed in a digital signal process, since an encoding process using a JPEG algorithm extracts a plurality of blocks from two-dimensional (2D) image information, and executes orthogonal transformation and quantization for respective blocks, a decoded image suffers block distortion that generates steps at the boundaries of blocks.
In addition to various kinds of noise mentioned above, a cause that especially impairs the image quality is noise (to be referred to as “low-frequency noise” hereinafter) which is generated in a low-frequency range and is conspicuously observed in an image sensed by a digital camera or the like. This low-frequency noise often results from the sensitivity of a CCD or CMOS sensor as a solid-state image sensing element. In an image sensing scene such as a dark scene with a low signal level, a shadowy scene, or the like, low-frequency noise is often emphasized due to gain correction that raises signal components irrespective of poor S/N ratio.
Furthermore, the element sensitivity of the solid-state image sensing element depends on its chip area. Hence, in a digital camera which has a large number of pixels within a small area, the amount of light per unit pixel consequently decreases, and the sensitivity lowers, thus producing low-frequency noise. For example, low-frequency noise is often visually recognized as pseudo mottled texture across several to ten-odd pixels on a portion such as a sheet of blue sky or the like which scarcely has any change in density (to be referred to as a “flat portion” hereinafter). Some digital cameras often produce false colors.
As a conventionally proposed noise removal method, a method using a median filter and a method using a low-pass filter (to be abbreviated as “LPF” hereinafter) that passes only a low-frequency range have prevailed.
In the method of using a median filter, a pixel value which assumes a central value (to be referred to as “median” hereinafter) is extracted from a region (to be referred to as “window” hereinafter) which includes a pixel of interest and its surrounding pixels, and the extracted median replaces the pixel value of interest. For example, many methods using a median filter such as Japanese Patent Laid-Open No. 4-235472 and the like have been proposed. Especially, when the pixel of interest is impulse noise or random noise, the median filter replaces the pixel value of interest as an isolated value with low correlation with surrounding pixels by the median with high correlation with surrounding pixels, thereby removing the isolated value in original image information.
On the other hand, in the method using an LPF, the average value of a plurality of pixels around a pixel of interest to have the pixel of interest as the center is calculated, and replaces the pixel value of interest.
The aforementioned two noise removal methods can effectively work locally, but have adverse effects (blur of an edge portion and the like). Hence, many modifications of these methods have been proposed. For example, Japanese Patent Laid-Open No. 2001-245179 discloses a method of making product sum calculations by selecting only surrounding pixels which are approximate to the pixel value of interest upon calculating the average value, so as not to blur an image due to a noise removal filter process.
In addition to the above two methods, i.e., the method of using a median filter and the method using an LPF, many other methods that pertain to noise and distortion removal have been proposed. For example, Japanese Patent Laid-Open No. 8-56357 discloses a method of replacing signal values between pixels which are located on the two sides of the block boundary, so as to remove block distortion. Furthermore, Japanese Patent Laid-Open No. 10-98722 discloses a method of adding a predetermined pattern selected from a plurality of patterns based on a random number to pixel signal levels around the block boundary.
Moreover, Japanese Patent Laid-Open No. 7-75103 discloses a method of removing block distortion produced upon encoding by adding an error to the level value of a specific pixel of interest having the block boundary as the center. In addition, Japanese Patent Laid-Open No. 4-239886 discloses a method of removing noise by detecting maximum and minimum values from pixels which neighbor the pixel of interest, and selecting one of the maximum value, minimum value, and the pixel value of interest using, as a control signal, the determination result indicating whether or not noise is contained, so as to remove white and black points having isolated values.
However, none of these conventional methods can exhibit a perfect noise removal effect of the aforementioned low-frequency noise. For example, the method using a median filter has only an effect of deleting an isolated value which has low correlation with surrounding values, and the method using an LPF is effective only for high-frequency noise or white noise with high randomness by cutting off a high-frequency range. Hence, these methods are not effective for low-frequency noise, and the low-frequency noise remains unremoved.
The method described in Japanese Patent Laid-Open No. 8-56357 or the like, which aims at removing block distortion, can effectively reduce steps by a method based on random number addition, a method of replacing pixel values between blocks or the like, as long as the block boundary is known, since block distortion to be removed is a high-frequency component generated as a rectangular step. However, the low-frequency noise to be removed is connectivity noise, i.e., pixel values which have less changes successively appear across a broad range from several to ten-odd pixels, and the aforementioned technique that reduces block distortion cannot be directly applied. Of course, the generation position of noise is not known unlike the block boundaries upon block encoding.
On the other hand, the method based on random number addition applies a pixel value which is not present in surrounding pixels. Hence, especially in a color image, when random numbers are added to respective color components obtained by color separation, a new color which is not present in surrounding pixels is generated, and deterioration of image quality such as generation of false colors or the like occurs.
Japanese Patent Laid-Open No. 7-203210 discloses an invention that reduces the signal strength of a specific frequency, although its object is different from noise removal of the present invention. In a system which receives a halftone dot document and executes dithering of a pseudo halftone process upon output, moiré is generated due to interference of the frequency of the input halftone dots and that of dithering. The invention described in Japanese Patent Laid-Open No. 7-203210 is a moiré removal method that removes the frequency of the input halftone dots to prevent generation of moiré.
That is, this moiré removal method replaces the pixel value of interest by a pixel value which is located ahead of the pixel of interest by a distance corresponding to a predetermined number of pixels on a line, since it is effective to disturb certain regularity to remove the frequency of halftone dots. The above invention discloses cases wherein the predetermined number of pixels is fixed and is randomly selected.
However, since this moire removal method aims at disturbing a specific period corresponding to a peak, it is not completely effective for low-frequency noise, which is generated in a broad low-frequency range. Since this method replaces pixel values, density preservation is guaranteed, but that method is merely a process of changing the selected pixel value, i.e., spatially shifting pixel phases. Furthermore, since a change in selected pixel value corresponds to cyclic filter characteristics, an impulse response becomes infinity. Even when the predetermined number of pixels as the distance between pixels to be replaced is randomly selected, since sampled pixels are replaced in turn, a moiré period is merely displaced by shifting peak phases of halftone dots, which are generated at specific periods.
As described above, none of the aforementioned prior arts can effectively remove low-frequency noise components contained in image data.
The present invention has been proposed to solve the conventional problems, and has as its object to provide an image processing apparatus and image processing method, and a computer program, which can visually remove low-frequency noise contained in image data.
In order to achieve the above object, an image processing apparatus according to the present invention is comprising input means for inputting image data containing low-frequency noise, designation means for designating a region made up of a predetermined pixel and surrounding pixels of the predetermined pixel in the image data, selection means for selecting a comparison pixel to be compared with the predetermined pixel from the region, determination means for determining a new pixel value of the predetermined pixel on the basis of pixel values of the comparison pixel and the predetermined pixel, and substitution means for generating new image data by substituting the pixel value of the predetermined pixel by the new pixel value.
The image processing apparatus according to the present invention is wherein the selection means selects the comparison pixel from the region using a random number.
The image processing apparatus according to the present invention is wherein the selection means uses the random number, which is generated on the basis of a uniform probability distribution.
The image processing apparatus according to the present invention is wherein the selection means uses the random number, which is generated on the basis of a generation probability distribution depending on a distance from the predetermined pixel.
The image processing apparatus according to the present invention is wherein the generation probability distribution has a higher generation probability with increasing distance from the predetermined pixel.
The image processing apparatus according to the present invention is wherein the selection means selects the comparison pixel from the region on the basis of a predetermined regularity.
The image processing apparatus according to the present invention is wherein the predetermined regularity varies a relative position from the predetermined pixel for each predetermined pixel.
The image processing apparatus according to the present invention is wherein the predetermined regularity determines a relative position from the predetermined pixel on the basis of an absolute coordinate position of the predetermined pixel.
The image processing apparatus according to the present invention is wherein the determination means determines the new pixel value of the predetermined pixel on the basis of a difference between the pixel values of the comparison pixel and the predetermined pixel.
The image processing apparatus according to the present invention is wherein the determination means determines the pixel value of the comparison pixel as the new pixel value of the predetermined pixel when the difference is not more than a predetermined value.
The image processing apparatus according to the present invention is wherein the determination means determines a value obtained by adding or subtracting a predetermined value to or from the pixel value of the predetermined pixel as the new pixel value of the predetermined pixel.
The image processing apparatus according to the present invention is characterized by further comprising approximate color generation means for generating an approximate color which is approximate to the pixel value of the comparison pixel, and in that the determination means uses the approximate color as the new pixel value of the predetermined pixel.
The image processing apparatus according to the present invention is wherein the approximate color generation means generates an approximate color, which is approximate to at least one of a plurality of color components within a predetermined range.
The image processing apparatus according to the present invention is wherein the determination means determines new pixel values of the predetermined pixel using the approximate color which is generated by approximation within the predetermined range for at least one of a plurality of color components, and using pixel values of the comparison pixel for the remaining color components.
The image processing apparatus according to the present invention is wherein the determination means has two threshold values, determines the pixel value of the predetermined pixel as the new pixel value when the difference is smaller than a first threshold value, and determines the approximate color as the pixel value of the predetermined pixel when the difference for at least one of a plurality of color components is not less than the first threshold value and is smaller than a second threshold value.
The image processing apparatus according to the present invention is comprising input means for inputting image data containing low-frequency noise, designation means for designating a region made up of a predetermined pixel and surrounding pixels of the predetermined pixel in the image data, selection means for selecting a comparison pixel to be compared with the predetermined pixel from the region, and determination means for determining a new pixel value of the predetermined pixel by a product sum calculation of pixel values of the comparison pixel and the predetermined pixel.
The image processing apparatus according to the present invention is wherein the determination means determines the new pixel value of the predetermined pixel by interpolation of the comparison pixel and the predetermined pixel.
The image processing apparatus according to the present invention is wherein the determination means determines the new pixel value of the predetermined pixel by extrapolation of the comparison pixel and the predetermined pixel.
The image processing apparatus according to the present invention is wherein a weighting coefficient in the product sum calculation is set on the basis of a difference between the pixel values of the comparison pixel and the predetermined pixel.
The image processing apparatus according to the present invention is wherein the product sum calculation uses different weighting coefficients in correspondence with a plurality of color components.
The image processing apparatus according to the present invention is wherein the determination means compares if differences for all of a plurality of color components are not more than a predetermined value.
The image processing apparatus according to the present invention is wherein the selection means can select a plurality of comparison pixels from the region, and the determination means determines the new pixel value of the predetermined pixel using the plurality of selected comparison pixels.
The image processing apparatus according to the present invention is characterized by further comprising pseudo halftone means for executing a pseudo halftone process of the generated new image data using error diffusion.
Also, according to the present invention, an image processing apparatus for visually reducing noise components contained in a low-frequency range of image data, is comprising correlation reduction means for reducing correlations between a predetermined pixel and surrounding pixels of the predetermined pixel in the image data, signal strength control means for controlling decreased signal strengths of low-frequency components upon reducing the correlations, and white noise conversion means for converting the decreased signal strengths into white noise components.
Furthermore, according to the present invention, an image processing apparatus for visually reducing noise components contained in a low-frequency range of image data, is comprising correlation reduction means for reducing correlations between a predetermined pixel and surrounding pixels of the predetermined pixel in the image data, signal strength control means for controlling decreased signal strengths of low-frequency components upon reducing the correlations, broad-band noise conversion means for converting the decreased signal strengths into broad-band noise components, and bandwidth control means for controlling a bandwidth of the broad-band noise conversion means.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Preferred embodiments of the present invention will now be described in detail in accordance with the accompanying drawings.
An image processing apparatus which comprises a low-frequency noise removal function according to the first embodiment of the present invention, and generates print information to be output to a printer engine will be described below with reference to the accompanying drawings.
Note that the low-frequency noise removal function according to the present invention can be applied to various forms as a function in an image input device such as a digital camera, image scanner, or the like, that in an image output device such as an ink-jet printer, sublimatic printer, laser printer, or the like, or that in a device driver or application software on a computer required to control these input/output devices.
Referring to
The noise removal module 101 executes a noise removal process of color image information made up of color components R, G, and B. Note that the detailed arrangement and operation of the noise removal module 101 will be explained later.
The color conversion module 102 converts the noise-removed RGB image information output from the noise removal module 101 into information of color agents used upon recording by a printer. Note that four components C (cyan), M (magenta), Y (yellow), and K (black) are basically used as color agent components. Some ink-jet printers use inks with lower dye densities in addition to the above color agent components.
The pseudo halftone module 103 converts color image information, which has been separated into color agent components determined by the color conversion module 102, into quantization levels smaller in number than the number of gray levels of the color image information, and expresses grayscale as an area by quantized values of a plurality of pixels. Assume that this embodiments adopts error diffusion that diffuses a quantization error of a pixel of interest to surrounding pixels as the pseudo halftone process. Note that a detailed description of error diffusion will be omitted since it is a state-of-the-art technique. Because an error diffusion is a publicly known processing, the detailed explanation is omitted.
The output terminal 104 is an output module which transmits quantized information for respective color agent components generated by the pseudo halftone module 103 to a printer engine (not shown). That is, the image processing apparatus according to the present invention is comprising the pseudo halftone module 103 which converts generated new image data into pseudo halftone data using error diffusion.
Note that the arrangement of the image processing apparatus shown in
Referring to
The pixel selector 204 selects an arbitrary pixel from those which form the window on the basis of a pseudo random number generated by the random number generator 205. The pixel value determination unit 206 determines a new pixel value of the pixel of interest on the basis of the pixel of interest of the window unit 203, and the selected pixel selected by the pixel value selector 204.
The operation of the noise removal module 101 with the above arrangement will be described below.
The noise removal module 101 is initialized. In practice, the CPU 211 resets variable i indicating a vertical processing address to zero (step S301). Likewise, the CPU 211 resets variable j indicating a horizontal processing address to zero (step S302).
The random number generator 205 generates a random number (step S303). The pixel selector 204 determines the values of horizontal and vertical relative positions a and b from the pixel of interest on the basis of the random number generated by the random number generator 205 (step S304). Upon determining horizontal and vertical relative positions a and b, two random numbers may be independently generated, or two variables may be calculated by a random number which is generated once. A random number generation algorithm is not particularly limited, but is assumed to be probabilistically uniform. That is, the noise removal module 101 according to the present invention is characterized by selecting a selected pixel from the window using a random number. Also, the present invention is wherein the pixel selector 204 uses a random number generated based on a uniform probability distribution.
Note that the values of horizontal and vertical relative positions a and b are selected not to exceed the window size. For example, if the window size is 9×9 pixels having the pixel of interest as the center, values a and b are set using a remainder calculation based on the generated random number to fall within the ranges −4≦a≦4 and −4≦b≦4.
Using values a and b determined in step S304, the pixel selector 204 makes comparison (step S305) to see whether or not:
|Ir(i, j)−Ir(i+a, j+b)|<Thr and
|Ig(i, j)−Ig(i+a, j+b)|<Thg and
|Ib(i, j)−Ib(i+a, j+b)<Thb
where Ir (i, j) is the pixel value of the R component of the pixel of interest located at a coordinate position (i, j), Ig (i, j) is the pixel value of the G component, and Ib(i, j) is the pixel value of the B component. Also, Thr, Thg, and Thb are respectively predetermined R, G, and B threshold values. Furthermore, |x| is the absolute value of x.
That is, it is determined in step S305 whether or not the absolute values of the differences between three, R, G, and B component values of a selected pixel arbitrarily selected from the window, and those of the pixel of interest of become smaller than the predetermined threshold values.
If it is determined as a result of comparison that all the three, R, G, and B component values become smaller than the predetermined threshold values (Yes in step S305), the pixel selector 204 substitutes the selected pixel values as new values of the pixel of interest (step S306). Assume that Fr, Fg, and Fb represent new R, G, and B component values of the pixel of interest.
On the other hand, if not all the three, R, G, and B component values become smaller than the predetermined threshold values (No in step S305), the pixel selector 204 uses the old values of the pixel of interest as new values (step S307). Hence, no substitution of the values of the pixel of interest is made in this case. That is, the noise removal module 101 according to the present invention is wherein the pixel value determination unit 206 determines a new pixel value of a pixel of interest on the basis of the difference between the pixel values of a selected pixel and the pixel of interest. Also, the present invention is wherein when the difference is equal to or smaller than a predetermined value, the pixel value determination unit 206 determines the selected pixel value as the pixel value of the pixel of interest.
The horizontal address is counted up for one pixel (step S308). Then, a series of processes are repeated while scanning the pixel of interest one by one until the horizontal pixel position reaches the (WIDTH)-th pixel (step S309). Likewise, the vertical address is counted up for one pixel (step S310). Then, a series of processes are repeated while scanning the pixel of interest one by one until the vertical pixel position reaches the (HEIGHT)-th pixel (step S311). Upon completion of scans for all pixels, the noise removal process ends.
The principle of noise removal according to this embodiment will be described below.
As is known, the autocorrelation function exponentially decreases as the relative position with respect to the pixel of interest increases. For example, pixels at positions A and B in
In
Adverse effects upon converting low-frequency components into white noise will be explained below.
In this case, in the example shown in
Upon comparison of
As described in the operation sequence shown in the flow chart of
As can be seen from this, the adverse influence of the noise removal process in a region where the change amount is large is small. On the other hand, in a region where the change amount is small, the number of pixels which undergo a substitution process probabilistically increases. Hence, the noise removal process effectively works in this region.
That is, a noise removal module 101 according to this embodiment is comprising an input terminal 201 for inputting image data containing noise-frequency noise, a window unit 203 for designating a window made up of a pixel of interest and its surrounding pixels, a pixel selector 204 for selecting a selected pixel to be compared with the pixel of interest from the window, and a pixel value determination unit 206 for determining a new pixel value of the pixel of interest on the basis of the pixel value of the selected pixel and that of the pixel of interest, and in that new image data is generated by substituting the pixel value of the pixel of interest by the new pixel value.
As described above, the technique according to the present invention converts noise present in a visually conspicuous frequency range into a hardly visible frequency range. As a similar technique, a spread spectrum technique in a communication method that spreads signal components in a specific frequency range to a broader frequency range by multiplying them by a pseudo random number sequence (PN sequence) is known. However, according to the present invention, low-frequency noise removal using a conversion technique with a higher degree of freedom can be implemented by a simpler arrangement.
That is, since correlations are reduced using the aforementioned substitution process, some signal components in a low-frequency range can be reliably converted into a high-frequency range. In this case, by optimizing the window size of selected pixels, which correspond to a partial set of autocorrelation functions, the band width of high-frequency broad-band noise to which the low-frequency noise strength is converted can be controlled. By controlling the allowable amount of substitution, the signal strength of noise to be converted from low-frequency signal components can be controlled.
Note that conversion from R, G, and B into Y, Cr, Cb is not the gist of the present invention, and a description thereof will be omitted. Therefore, the RGB space may be converted into the YCrCb space before input to the noise removal module 101, or YUV signals as luminance and color difference signals decoded by the JPEG algorithm may be used intact.
As shown in
Moreover, using the determine values a and b, the pixel selector 204 makes comparison (step S1105) to see whether or not:
|Iy(i, j)−IY(i+a, j+b)|<Thy1 and
|Icr(i, j)−Icr(i+a, j+b)|<Thcr and
|Icb(i, j)−Icb(i+a, j+b)|<Thcb
where Iy(i, j) is the pixel value of the Y component of the pixel of interest located at a coordinate position (i, j), Icr (i, j) is the pixel value of the Cr component, and Icb (i, j) is the pixel value of the Cb component . Also, Thy1, Thcr, and Thcb are respectively predetermined Y, Cr, and Cb threshold values. Furthermore, |x| is the absolute value of x.
That is, it is determined in step S1105 whether or not the absolute values of the differences between three, Y, Cr, and Cb component values of a selected pixel arbitrarily selected from the window, and those of the pixel of interest of become smaller than the predetermined threshold values.
If it is determined as a result of comparison Lhat all the three, Y, Cr, and Cb component values do not simultaneously become smaller than the predetermined threshold values (No in step S1105), the old values of the pixel of interest are used as new values of the pixel of interest (step S1106). That is, no substitution of the values of the pixel of interest is made in this case. Assume that Fy, Fcr, and Fcb represent new Y, Cr, and Cb component values of the pixel of interest.
On the other hand, if it is determined that all the Y, Cr, and Cb component values become smaller than the predetermined threshold values (Yes in step S1105), the absolute value of the difference between the Y component values of the selected pixel and pixel of interest is compared with a threshold value Thy2, which is set for only the Y component (step S1107). Note that Thy1<Thy2.
As a result, if the Y component is smaller than the predetermined threshold value (Yes in step S1107), the Y, Cr, and Cb component values of the selected pixel are set as new values of the pixel of interest (step S1108). On the other hand, if the Y component is not smaller than the predetermined threshold value (No in step S1107), the Y component values of the selected pixel and pixel of interest are compared (step S1109). If the value of the pixel of interest is larger than that of the selected pixel as a result of comparison (Yes in step S1109), the following conversion is made (step S1110):
Fy(i, j)=Iy(i, j)−D,
Fcr(i, j)=Icr(i+a, j+b),
Fcb(i, j)=Icb(i+a, j+b) (1)
where D is a predetermined value, and D=Thy2 is often used.
On the other hand, if the value of the selected pixel is larger than that of the pixel of interest (No in step S1109), the following conversion is made (step S1111):
Fy(i, j)=Iy(i, j)+D,
Fcr(i, j)=Icr(i+a, j+b),
Fcb(i, j)=Icb(i+a, j+b) (2)
Subsequently, the horizontal address is counted up for one pixel (step S1112).
That is, the noise removal module 101 according to the present invention is wherein the pixel value determination unit 206 determines a new pixel value of the pixel of interest by adding or subtracting a predetermined value to or from the pixel value of the pixel of interest. Also, the noise removal module 101 is characterized by further comprising an approximate color generation function of generating an approximate color, which is approximate to the pixel value of a selected pixel, and in that the pixel value determination unit 206 uses the generated approximate color as the new pixel value of the pixel of interest. Furthermore, the noise removal module 101 is wherein the approximate color generation function generates an approximate color which is approximate to at least one of a plurality of color components within a predetermined range.
Moreover, the noise removal module 101 according to the present invention is wherein the pixel value determination unit 206 determines new pixel values of the pixel of interest using an approximate color which is generated by approximation within a predetermined range for at least one of a plurality of color components, and using the pixel values of the selected pixel for the remaining color components.
In addition, the noise removal module 101 according to the present invention is wherein the pixel value determination unit 206 has two threshold values, sets a new pixel value as the pixel value of the pixel of interest when a difference is smaller than the first threshold value, and sets an approximate color as the pixel value of the pixel of interest when a difference for at least one of a plurality of color components is equal to or larger than the first threshold value but is smaller than the second threshold value.
Then, a series of processes are repeated while scanning the pixel of interest one by one until the horizontal pixel position reaches the (WIDTH)-th pixel (step S1113). Likewise, the vertical address is counted up for one pixel (step S1114). Then, a series of processes are repeated until the vertical pixel position reaches the (HEIGHT)-th pixel (step S1115).
Note that the origin indicates a case wherein the values of the pixel of interest and selected pixel are equal to each other, since the difference becomes zero. A rectangular region bounded by the bold line in
−Thy1<Iy(i, j)−Iy(i+a, j+b)<Thy1 and
−Thcr<Icr(i, j)−Icr(i+a, j+b)<Thcr
Also, in
−Thy2<Iy(i, j)−Iy(i+a, j+b)<Thy2 and
−Thcr<Icr(i, j)−Icr(i+a, j+b)<Thcr
The operation sequence shown in the flow chart of
This embodiment is particularly effective for luminance and color difference components. The human visual sensitivity level to a luminance component is largely different from those to color difference components; the luminance component is more sensitive to a change amount. As described above, the present invention breaks low-frequency noise and generates white noise instead. In this case, the strength level of a luminance perceived as a noise is largely different from those of color differences.
More specifically, the white noise strength depends on a threshold value as an allowable value indicating whether or not to substitute. If a large allowable value is set for a luminance component, the white noise strength increases, and causes deterioration of the image quality. For this reason, the substitution allowable amount of the luminance component must be set to low so that the image quality is free from deterioration. However, when the operation sequence shown in the flow chart of
That is, the color difference components are to be positively substituted, but the number of pixels to be substituted probabilistically decreases due to the limited allowable amount of the luminance component. To avoid such problem, the luminance and color difference components can independently undergo selection and substitution processes. However, in this case, a color which is not present in surrounding pixels is generated as in random number addition described in the prior art, thus generating false colors. Hence, in this embodiment, the upper limit of a change amount upon substitution is set for the luminance component in addition to the threshold value as the substitution allowable amount. That is, since multi-level threshold value comparison processes are executed, the color difference components are positively substituted, and the luminance component changes from the value of the pixel of interest.
In the above method, however, since the values of the selected pixel are not directly substituted, a false color which is not generated in surrounding pixels may be generated. However, compared to a case wherein the luminance and color difference components independently undergo selection and substitution processes, a color change vector from the pixel of interest to a converted pixel value is approximate to that from the pixel of interest to the selected pixel, and deterioration of the image quality can be suppressed.
When priority is given to prevention of false color generation, a method of calculating a color change vector from the pixel of interest to the selected pixel first, and setting an intersection between this color change vector and the threshold value Thy2 of the Y component as a new value of the pixel of interest may be used, as shown in
That is, various approximate color generation means may be proposed depending on methods of generating a color approximate to that of the selected pixel while satisfying a change allowable amount condition between two points of the pixel of interest and selected pixel. In
As described above, this embodiment is wherein when the pixel of interest cannot be substituted by a probabilistically selected pixel since the allowable amount condition is exceeded, an approximate color which is approximate to the color of the selected pixel is generated, and is determined as a new value of the pixel of interest. Note that
As shown in
The random number generator 205 generates a random number (step S1404). The pixel selector 204 determines the values of horizontal and vertical relative positions a and b from the pixel of interest on the basis of the generated random number (step S1405). Using the determine values a and b, comparison is made (step S1406) to see whether or not:
|Ir(i, j)−Ir(i+a, j+b)|<Thr and
|Ig(i, j)−Ig(i+a, j+b)|<Thg and
|Ib(i, j)−Ib(i+a, j+b)|<Thb
where Ir (i, j) is the pixel value of the R component of the pixel of interest located at a coordinate position (i, j), Ig(i, j) is the pixel value of the G component, and Ib(i, j) is the pixel value of the B component. Also, Thr, Thq, and Thb are respectively predetermined R, G, and B threshold values. Furthermore, |x| is the absolute value of x.
If the comparison result in step S1406 is Yes, the selected pixel values are substituted in new values of the pixel of interest (step S1407). Assume that Fr, Fg, and Fb represent new R, G, and B component values of the pixel of interest.
On the other hand, if the comparison result in step S1406 is No, loop count variable loop is counted up by 1 (step S1408). It is checked if loop count variable loop is smaller than a predetermined value (Thloop) (step S1409). As a result, if variable loop is smaller than the predetermined value (Yes in step S1409), the aforementioned processes are repeated from the random number generation step in step S1404. On the other hand, if variable loop is equal to the predetermined value (No in step S1409), the old values of the pixel of interest are used as new values, and no substitution is made (step S1410).
In this embodiment, the number of substituted pixels can be increased using repetition. That is, when a steep edge and impulse noise having an isolated value are present together with low-frequency noise within the window, the value of the selected pixel is often largely different from that of the pixel of interest. With the operation sequence shown in the flow chart of
As shown in
|Ir(i, j)−Ir(i+a, j+b)|<Thr and
|Ig(i, j)−Ig(i+a, j+b)|<Thg and
|Ib(i, j)−Ib(i+a, j+b)|<Thb
where Ir(i, j) is the pixel value of the R component of the pixel of interest located at a coordinate position (i, j), Ig(i, j) is the pixel value of the G component, and Ib(i, j) is the pixel value of the B component. Also, Thr, Thg, and Thb are respectively predetermined R, G, and B threshold values. Furthermore, |x| is the absolute value of x.
If the comparison result in step S1505 is Yes, new values of the pixel of interest are calculated (step S1506) by:
Fr(i, j)=A×Ir(i, j)+(1−A)×Ir(i+a, j+b)
Fg(i, j)=A×Ig(i, j)+(1−A)×Ig(i+a, j+b)
Fb(i, j)=A×Ib(i, j)+(1−A)×Ib(i+a, j+b) (3)
where A is a predetermined coefficient.
On the other hand, if the comparison result in step S1505 is No, the old values of the pixel of interest are used as new values and no substitution is made (step S1507). That is, in this embodiment, the calculation results of the product sum calculations are used as the new values of the pixel of interest in place of substitution of the values of the selected pixel.
A conventional LPF is used to calculate the weighted mean of neighboring pixels to have the pixel of interest as the center. Also, the LPF is used to cut off a high-frequency region by a filtering process using weighting coefficients depending on spatial distances between the pixel of interest and neighboring pixels.
On the other hand, the object of the present invention is not to cut off the high-frequency region but to remove low-frequency noise by converting some components of the low-frequency strength into the white noise strength. In the processing operation shown in the flow chart of
Hence, this embodiment has as its object to increase the ratio of conversion of the values of the pixel of interest by adopting the product sum calculation results of the selected pixel and the pixel of interest as converted values in place of substituting the selected pixel. That is, a noise removal module 101 according to the present invention is comprising a window unit 203 for designating a region made up of a pixel of interest and its surrounding pixels of image data which contains low-frequency noise, a pixel selector 204 for selecting a selected pixel to be compared with the pixel of interest from the region, and a pixel value determination unit 206 for determining a new pixel value of the pixel of interest by a product sum calculation of pixel values of the selected pixel and the pixel of interest.
For example, when a maximum allowable change amount of the pixel of interest is specified, if the value of coefficient A of equations (3) is set to A=½, the comparison threshold value of the product sum calculations becomes twice as large as the maximum allowable change amount. Therefore, the probability of conversion of the pixel of interest obviously increases.
When the value of coefficient A in equations (3) is set to meet 0<A≦1 (A=0 is equivalent to substitution), such case corresponds to spatially linear interpolation between the pixel of interest and selected pixel. More specifically, the pixel value determination unit 206 is characterized by determining a new pixel value by interpolation between the selected pixel and pixel of interest. Conversely, when the value of coefficient A in equations (3) is set to a negative value, such case corresponds to spatially linear extrapolation between the pixel of interest and selected pixel. That is, the pixel value determination unit 206 is characterized by determining a new pixel value by extrapolation between the selected pixel and pixel of interest.
If the value of coefficient A in equations (3) is set to −1, calculations given by equations (3) correspond to linear extrapolation, i.e., to calculation of the extrapolated value of extrapolation point R outside the window. That is, when the extrapolated value corresponding to the pixel position outside the window is used as the converted value, an effect close to that obtained by a substitution process by setting a large window size can be obtained. Note that the window size is determined by the number of line buffers, and is imposed large software and hardware limitations. Hence, it is preferable to obtain a larger effect using a smaller window size.
As described above, according to this embodiment, by optimizing the coefficient of the product sum calculations, when interpolation is used, an effect of increasing the ratio of conversion of the pixel of interest can be obtained; when extrapolation is used, an effect similar to that obtained using a larger window size can be obtained. Furthermore, the above interpolation and extrapolation are implemented by linear calculations, but may be implemented by nonlinear calculations in accordance with the difference between the pixel values of the pixel of interest and selected pixel. That is, the present invention is wherein a weighting coefficient in a product sum calculation is set based on the difference between the pixel values of the selected pixel and pixel of interest.
As for coefficient A in equations (3), the same coefficient values are used for three, R, G, and B components. Alternatively, different coefficients may be used for respective color components. Furthermore, in this embodiment, the number of pixels to be selected is one pixel, but a plurality of pixels may be selected. When a plurality of pixels are selected, random numbers corresponding in number to the selected pixels are preferably generated.
That is, the present invention is wherein different weighting coefficients in the product sum calculation are used in correspondence with a plurality of color components. The noise removal module 101 according to the present invention is wherein the pixel value determination unit 206 compares, for each of the plurality of color components, if the difference is equal to or smaller than a predetermined value. Furthermore, the noise removal module 101 is wherein the pixel selector 204 can select a plurality of pixels from a window, and the pixel value determination unit 206 determines the new pixel value of the pixel of interest using the plurality of selected pixels.
Since the effect of the present invention is reduced if the value of A as the weighting coefficient for the pixel of interest becomes large, if the number of selected pixels is n (n≧1), it is preferable that the contribution ratio of the value of the pixel of interest to the converted value is equal to or lower than 1/(n+1). In addition, a plurality of pixels may be selected, and the new value of the pixel of interest may be determined by only the product sum calculations among the selected pixels without using the pixel of interest.
Since only some steps in
That is, the pixel selector 204 of the noise removal module 101 according to the present invention is characterized by using a random number generated based on a generation probability distribution which depends on the distance from the pixel of interest. Also, the present invention is wherein this generation probability distribution has a higher generation probability with increasing distance from the pixel of interest.
When the probability upon selecting a pixel changes depending on the distance from the pixel of interest, correlations between the pixel of interest and selected pixel can be controlled. That is, assuming that the autocorrelation function changes in correspondence with the distance from the pixel of interest, as shown in
The method of determining a new value of the pixel of interest on the basis of a probabilistically selected pixel and the pixel of interest has been explained. In this method, either one or a plurality of pixels may be selected. In the above example, substitution or conversion is switched by evaluating the absolute value of the difference between the selected pixel and pixel of interest. However, the present invention is not limited to such specific evaluation.
The present invention has exemplified a case wherein a selected pixel is probabilistically determined from surrounding pixels using a generated random number. Alternatively, the pixel position to be selected may be controlled by specifying a predetermined regularity in place of generating a random number. That is, it is not preferable to always select a pixel at a fixed relative position from the position of the pixel of interest in terms of image quality. Hence, a method of specifying a regularity that varies the relative position by predetermined coordinate positions every time the pixel of interest scans one pixel, and determining a selected pixel in turn based on the variation regularity is effective. The predetermined coordinate positions in the variation regularity may have a fixed variation amount (e.g., n pixels in the horizontal direction, and m pixels in the vertical direction), or the variation amount itself may be a nonlinear variation amount which is variable for respective pixels.
In place of specifying the regularity of the variation amount, the relative position may be determined based on a regularity function of an absolute coordinate position (i, j) of the pixel of interest. The regularity function may be stored in a table or may be determined by calculations.
The present invention is directed to a noise removal module which visually reduces noise components contained in the low-frequency range of image data, and is wherein correlations between a pixel of interest and surrounding pixels in the image data are reduced to control decreased signal strengths of low-frequency components upon reducing the correlations and to convert the decreased signal strengths to white noise.
Furthermore, the present invention is directed to a noise removal module which visually reduces noise components contained in the low-frequency range of image data, and is wherein correlations between a pixel of interest and surrounding pixels in the image data are reduced to control decreased signal strengths of low-frequency components upon reducing the correlations, to convert the decreased signal strengths to broad-band noise, and to control the band width of broad-band noise conversion means.
The objects of the present invention are also achieved by supplying a storage medium (or recording medium), which records a program code of software that can implement the functions of the above-mentioned embodiments to a system or apparatus, and reading out and executing the program code stored in the storage medium by a computer (or a CPU or MPU) of the system or apparatus.
In this case, the program code itself read out from the storage medium implements the functions of the above-mentioned embodiments, and the storage medium which stores the program code constitutes the present invention. The functions of the above-mentioned embodiments may be implemented not only by executing the readout program code by the computer but also by some or all of actual processing operations executed by an operating system (OS) or the like running on the computer on the basis of an instruction of the program code.
Furthermore, the functions of the above-mentioned embodiments may be implemented by some or all of actual processing operations executed by a CPU or the like arranged in a function extension card or a function extension unit, which is inserted in or connected to the computer, after the program code read out from the storage medium is written in a memory of the extension card or unit.
As described above, according to the present invention, by determining a new value of a pixel of interest on the basis of the pixel of interest, and a pixel which is probabilistically selected from those around the pixel of interest, low-frequency noise contained in image data can be visually removed by converting the generated low-frequency noise strength into the white noise strength.
Since the band width of noise and the strength of noise after conversion can be controlled, it is easy to adjust the image quality by noise removal. Since a pixel value substitution process and approximate color conversion process allow conversion free from generation of conspicuous false colors, satisfactory noise removal can be executed even for a color image. Furthermore, since a high-image quality noise removal process can be implemented by a simple arrangement, a system arrangement that outputs an image sensed by a digital camera to a printer can provide a high-quality digital print that suffers less noise.
The present invention is riot limited to the above embodiments and various changes and modifications can be made within the spirit and scope of the present inventions. Therefore, to apprise the public of the scope of the present invention, the following claims are made.
Number | Date | Country | Kind |
---|---|---|---|
2002-164625 | Jun 2002 | JP | national |
Number | Date | Country | |
---|---|---|---|
Parent | 10446723 | May 2003 | US |
Child | 13198213 | US |