This application claims the benefit of priority to Taiwan Patent Application No. 108123593, filed on Jul. 4, 2019. The entire content of the above identified application is incorporated herein by reference.
Some references, which may include patents, patent applications and various publications, may be cited and discussed in the description of this disclosure. The citation and/or discussion of such references is provided merely to clarify the description of the present disclosure and is not an admission that any such reference is “prior art” to the disclosure described herein. All references cited and discussed in this specification are incorporated herein by reference in their entireties and to the same extent as if each reference was individually incorporated by reference.
The present disclosure relates to a denoising method, and more particularly to a denoising method based on a SNR.
In the field of image processing, a correction and gain multiplier is often generated by intensities of signals and energy of noises, and the correction and gain multiplier is multiplied by the input signal to obtain a reasonable result. One of the most well-known applications, for example, is to decompose the signals into components of different spatial frequencies and multiply each component by a pass rate or an enhancement rate. When one component is considered as a noise component, the component is multiplied by a value r less than 1 to suppress the noise, such as a Wiener filter known to those skilled in the art; when one component is considered to be a component that tends to be strengthened or retained the component is multiplied by a pass ratio r greater than or equal to 1, thereby obtaining clear and sharp results, as shown in the following equation (1):
C
out
=r·C
in (1).
Another well-known application is to refer to previously processed results for assisting in processing of current data, such as Infinite Impulse Response (IRR) example shown in the following equation (2):
F
out(n)=Fout(n−1)+r·(Fin(n)−Fout(n−1)) (2).
When an intensity of a difference signal Fin(n)−Fout(n−1) is equal to the energy of the noise, it tends to be determined as noise, and value r close to 0 is taken to result in strong denoising, otherwise the pass rate r close to 1 will be taken to speed up an update rate to avoid changing a trend of real signals.
Therefore, the value of r is determined based on a relative strength between the signal and the noise. A common quantization method for the relative strength is signal-to-noise ratio (SNR or S/N). Therefore, control of input and output through the signal-to-noise ratio can be expressed by the following equations (3) and (4):
Furthermore, the processing of the signal-to-noise ratio, whether
is directly calculated or a signal difference being a few standard deviations is used to determine a magnitude of the pass rate r, an indefinite number division cannot be avoided, thus resulting in high costs from hardware calculations.
Therefore, improving the denoising method to reduce the cost of hardware calculation to overcome the above defects has become an important topic in the arts.
In response to the above-referenced technical inadequacies, the present disclosure provides a denoising method based on a signal-to-noise ratio (SNR).
In one aspect, the present disclosure provides a denoising method based on a signal-to-noise ratio (SNR), the method includes: Step S1: obtaining a current input coefficient; Step S2: obtaining a current noise standard deviation corresponding to the current input coefficient by querying a first relationship table, wherein the first relationship table defines a correspondence relationship between a plurality of input coefficients and a plurality of noise standard deviations; Step S3: querying a second relationship table according to the current noise standard deviation and the current input coefficient to obtain a current slope corresponding to an absolute value of the current input coefficient in a processing function, in which the second relationship table defines a plurality of input coefficient intervals corresponding to a plurality of slopes of the processing function linearly after being approximated with the plurality of signal-to-noise ratios, and in which the processing function is defined as a compression magnification function multiplied by a signal-to-noise ratio, and the compression magnification function is a function of the signal-to-noise ratio; Step S4: generating a current output coefficient by multiplying the current input coefficient and the compression magnification function, wherein the signal-to-noise ratio is defined as an absolute value of an input coefficient divided by a noise standard deviation corresponding to the input coefficient, so that the current output coefficient is a symbol function multiplied by the noise standard deviation and the processing function; Step S5: calculating the current output coefficient by substituting the current noise standard deviation, the current input coefficient and the current slope.
Therefore, the denoising method based on SNR provided by the present disclosure can obtain denoising results of frequency domain coefficients by merely estimating a magnitude of a current noise standard deviation, querying actual values of a processing function according to input coefficients and cut points having segment linearity, without using indefinite number division. In addition, the denoising method based on SNR can also be applied to spatial domain processing or time domain processing of Infinite Impulse Response (IRR).
These and other aspects of the present disclosure will become apparent from the following description of the embodiment taken in conjunction with the following drawings and their captions, although variations and modifications therein may be affected without departing from the spirit and scope of the novel concepts of the disclosure.
The present disclosure will become more fully understood from the following detailed description and accompanying drawings.
The present disclosure is more particularly described in the following examples that are intended as illustrative only since numerous modifications and variations therein will be apparent to those skilled in the art. Like numbers in the drawings indicate like components throughout the views. As used in the description herein and throughout the claims that follow, unless the context clearly dictates otherwise, the meaning of “a”, “an”, and “the” includes plural reference, and the meaning of “in” includes “in” and “on”. Titles or subtitles can be used herein for the convenience of a reader, which shall have no influence on the scope of the present disclosure.
The terms used herein generally have their ordinary meanings in the art. In the case of conflict, the present document, including any definitions given herein, will prevail. The same thing can be expressed in more than one way. Alternative language and synonyms can be used for any term(s) discussed herein, and no special significance is to be placed upon whether a term is elaborated or discussed herein. A recital of one or more synonyms does not exclude the use of other synonyms. The use of examples anywhere in this specification including examples of any terms is illustrative only, and in no way limits the scope and meaning of the present disclosure or of any exemplified term. Likewise, the present disclosure is not limited to various embodiments given herein. Numbering terms such as “first”, “second” or “third” can be used to describe various components, signals or the like, which are for distinguishing one component/signal from another one only, and are not intended to, nor should be construed to impose any substantive limitations on the components, signals or the like.
A signal-to-noise ratio (SNR) is a relative ratio of a signal to a noise. A denoising strength can be adjusted according to the SNR when denoising process is performed. Weak denoising process is performed on values having high SNR and more likely to be real signals, and strong denoising process is performed on values having low SNR and more likely to be noises, thereby reducing calculations for areas such as flat areas and texture areas, while retaining self-adaptive ability based on contents of the signals. Therefore, the present disclosure provides a denoising method based on the SNR.
A frequency domain denoising process roughly includes indicating a linear combination of frequency components by change of basis processing the signals originally in spatial domain according to each frequency domain basis, and coefficient corresponding to each frequency domain component is an input coefficient Cin corresponding to information of the spatial domain in each frequency band, and the input coefficient Cin is processed by the denoising process. In the present embodiment, the output coefficient Cout can be expressed by the following equation (5):
C
out
=r·C
in (5);
where r is a compression magnification function, and rϵ[0, 1].
The use of the SNR as the basis for the denoising adjustment has a self-adaptive feature. When the SNR is high, it represents that more signal components are present in this component, and the original value should be retained. When the SNR is low, it represents that more noise is present in this component, and the value (or coefficient) should be corrected. This self-adaptive feature eliminates the need for other calculations for denoising strength determination, such as determinations of flat areas, texture areas, and the like, so as to save costs.
If considering the coefficient of the denoising process is adjusted based on the SNR, characteristics of noise variance must be considered. When the noise is Gaussian white noise, the noise variance is a fixed value regardless of a magnitude of the signal, and when the signal-to-noise ratio is considered, a definite number division is utilized. However, noise of an actual image sensor is Poisson noise. Reference is made to
Therefore, in order to avoid computational indefinite number division, the present disclosure provides a denoising method based on the SNR. Here, a compression multiplication function r is expressed as a function of the SNR t, and is defined as an absolute value of an input coefficient Cin divided by a standard deviation σ of the noise, as shown in the following equation (6):
where |Cin| is the absolute value of the input coefficient Cin and σ is the standard deviation of the noise.
Therefore, the output coefficient Cout can be further expressed by the following equation (7):
where sgn(Cin) is a symbol function that satisfies the condition of the following equation (8):
Therefore, according to the equation (6), the output coefficient Cont can be further expressed by the following equation (9):
Here, a processing function h(t) is introduced, which is defined as a compression multiplication function r(t) multiplied by the SNR t as shown in the following equation (10):
h(t)r(t)·t (10);
wherein, the type of the compression magnification function r(t) may be a linear function or a nonlinear function. For example, in a case that the Wiener filter is utilized, the compression magnification function r(t) may be expressed by the following equation (11):
In this case, a corresponding compression magnification of the compression magnification function r(t) when the noise ratio t differs by a few standard deviations can be defined by the user, and can be defined by defined cutting points as shown in
Therefore, from the definition of equation (10), a graph showing a processing function versus a difference number of the SNR standard deviations can be further obtained by the h(t)r(t)·t conversion. The graph shown in
Therefore, based on the definition of the equation (6), the corresponding input coefficient intervals can be obtained in the processing function h(t) according to the input coefficient Cin. For example, when the input coefficient Cin corresponds to the segmentation interval R[c−1], which has a starting point of cut[c−1] with a corresponding value of h(cut[c−1]) in the processing function h(t), and an end point of cut[c] with a corresponding value h(cut[c]) in the processing function h(t), and a slope between the starting point and the end point is m[c−1]. Therefore, an output coefficient Cow can be further expressed by the following equation (12):
C
out=sgn(Cin)·[h(cut[c−1])·σ+m[c−1]·(|Cin|−cut[c−1]·σ)] (12).
Therefore, in a real-time calculation process, it is only necessary to estimate a magnitude of the current noise standard deviation σ, query an actual h function according to |Cin| and each cut point of the linear segment, and the denoised output coefficient Cout with frequency domain coefficient can be obtained without utilizing indefinite division calculation.
Based on the above description, reference is further made to
Step S1: obtaining a current input coefficient.
Step S2: obtaining a current noise standard deviation corresponding to the current input coefficient by querying a first relationship table. In this case, the first relationship table defines a correspondence relationship between a plurality of input coefficients and a plurality of noise standard deviations, and can be obtained by using a graph of noise standard deviations versus gray scale values of
Step S3: querying a second relationship table according to the current noise standard deviation and the current input coefficient to obtain a current slope corresponding to an absolute value of the current input coefficient in a processing function. Here, the second relationship table defines a plurality of input coefficient intervals corresponding to a plurality of slopes of the processing function linearly after being approximated with the plurality of signal-to-noise ratios, and may be pre-established by using the approximate schematic diagram of a difference between the processing function and the SNR standard deviation of
Step S4: generating a current output coefficient by multiplying the current input coefficient and the compression magnification function. Here, the SNR is defined as an absolute value of an input coefficient divided by a noise standard deviation corresponding to the input coefficient, as shown in equation (6) mentioned above. Therefore, the current output coefficient is a symbol function multiplied by the noise standard deviation and the processing function, as shown in equation (9) mentioned above.
Step S5: calculating the current output coefficient by substituting the current noise standard deviation, the current input coefficient and the current slope. Therefore, the denoised output coefficient Cout with frequency domain coefficient can be obtained by estimating the magnitude of the current noise standard deviation a, finding an actual h function according to |Cin| and each cut point of the linear segment, without utilizing indefinite division calculation.
On the other hand, the denoising process can be performed in frequency domain. Reference is made to
Step S100: generating a converted image data by converting an input image data according to a plurality of basis through a change of basis process. The converted image data includes a plurality of input coefficients corresponding to the plurality of basis. In detail, a linear combination of frequency components can be represented by change of basis processing the signals originally in spatial domain according to each frequency domain basis, and coefficient corresponding to each frequency domain component is an input coefficient Cin corresponding to information of the spatial domain in each frequency band.
Step S101: performing a partial compression process on each of the input coefficients to generate a plurality of output coefficients. In this case, the partial compression processing includes the steps S1, S2, S3, S4, and S5, the step S1 further includes obtaining the current input coefficient from the input coefficients, and the step S5 further includes using the current output coefficient as one of the output coefficients.
Step S102: generating a denoising image data through an inverse transform process according to the output coefficients and the basis. In other words, the plurality of output coefficients can be obtained by performing a partial compression process on each of the input coefficients, and the current output coefficient are used as the plurality of output coefficients to be converted back to spatial domain signals through the basis, that is, the denoised signal results.
Reference is made to
Step S200: obtaining a current input image data and a previous output image data. For example, the current input image data may be represented by Fin(t), the previous output image data may be represented by Fout(t−1), and the current input image data Fin(t) and the previous output image data Fout(t−1) may be two consecutive frames of images on different timing, where t is a current time, and t−1 is a previous time.
Step S201: taking a difference value between the current input image data and the previous output image data as the current input coefficient. Here, reference can be made to equation (2), a difference value diff(t) can be expressed by f(Fin(t)−Fout(t−1)), and thus the following equation (13) can be obtained:
f(Fin(t)−Fout(t−1))=r·(Fin(t)−Fout(t−1)) (13).
The difference value diff(t) is introduced, which is expressed by the following equation (14), and the difference function f(diff(t)) can be obtained and expressed by the following equation (15):
diff(t)Fin(t)−Fout(t−1) (14);
f(Fin(t)−Fout(t−1))=f(diff(t)) (15).
Similar to the processing of equation (7), the following equation (16) can be obtained:
In this case, a form of equation (16) is obviously same as the equation (9), so similarly, in a real-time calculation process, it is only necessary to estimate a magnitude of the current noise standard deviation σ, find an actual h function according to |diff(t)| and each cut point of the linear segment, and the difference function f(diff(t)) can be obtained by denoising the input difference value diff(t) without utilizing indefinite division calculation.
Step S202: performing the foregoing steps S1 to S5 to obtain the current output coefficient.
Step S203: using the current output coefficient as a difference function f(diff(t)), and adding the difference function to the previous output image data to obtain a current output image data. Here, the current output image data can be expressed by the following equation (17):
In an application of the time domain, when a signal of the current point Fin(t) is close to that of the previous point Fout(t−1), it may be assumed that the two signals are similar and can be mutually referred to each other, but when the difference between the two signals of the current point Fin(t) and the previous point Fout(t−1) is obvious, it may be assumed that the two signals are more likely to be different information, and thus the two signals are not mutually referred to each other to reserve sharpness.
Reference is made to
where (x, y) represent coordinates of a central point in a target area Ω(x, y), (u, v) represents the coordinates of a plurality of surrounding points around the central point, and w(u, v) are weight functions corresponding to each of the surrounding points.
The third embodiment of the present disclosure provides a denoising method based on SNR, which includes the following steps:
Step S300: obtaining a central image data of a central point in a target area.
Here, the central image data can be represented by Iin(x, y).
Step S301: obtaining a plurality of surrounding image data of a plurality of surrounding points in the target area adjacent to the central point. Here, the surrounding image data can be represented by Iin(u, v).
In this case, reference can be made to equation (2), the difference value diff(u, v) can be represented by Iin(x, y)−Iin(u, v), and Iin(x, y) and Iin(u, v) can represent pixel points at different positions in the image, and I represents an energy intensity of the pixel point, and thus the following equation (19) can be obtained:
f(Iin(x,y)−Iin(u,v))=r·(Iin(x,y)−Iin(u,v)) (19).
The difference value diff(t) is introduced, which is expressed by the following equation (20), and the difference function f(diff(t)) can be obtained, as shown in the following equation (21):
diff(u,v)Iin(x,y)−Iin(u,v) (20);
f(Iin(x,y)−Iin(u,v))=f(diff(u,v)) (21).
Similar to the processing of equation (7), the following equation (22) can be obtained:
In this case, a form of equation (22) is obviously the same as the equation (9), so that similarly, in a real-time calculation process, it is only necessary to estimate a magnitude of the current noise standard deviation σ, find an actual h function according to |diff(u, v)| and each cut point of the linear segment, and the difference function f(diff(u, v)) can be obtained by denoising the input difference value diff(u, v) without utilizing indefinite division calculation.
Step S302: using each of a plurality of difference values between the central image data and the plurality of surrounding image data as the current input coefficient.
Step S303: performing the foregoing steps S1 to S5 to obtain the current output coefficient.
Step S304: using the current output coefficient as one of a plurality of difference functions, respectively adding the difference functions to the surrounding image data, and respectively multiplying a weight function to obtain a current output image data of the target area.
Here, the current output image data can be expressed by the following equation (23):
It should be noted that the weight functions w(u, v) can be determined according to positions of the coordinates of the surrounding points (u, v) relative to the coordinates of the central point (x, y), or the weight functions w(u, v) can be determined according to an order of the difference values d (u, v)|Iin(x, y)−Iin(u, v)|. For example, the smaller the difference value d is, the larger the weight value w is taken. The smaller the difference between the central point Iin(x, y) and the surrounding point Iin(u, v), the more the two are likely to be mutually referred to each other. Further, the larger the difference between the center point Iin(x, y) and the surrounding point Iin(u, v), the more the two are likely to have different signals, thereby reducing the referential significance.
In conclusion, the denoising method based on SNR provided by the present disclosure can obtain denoising results of frequency domain coefficients by merely estimating a magnitude of a current noise standard deviation, and querying actual values of a processing function according to input coefficients and cut points having segment linearity, without using indefinite number division. In addition, the denoising method based on SNR can also be applied to spatial domain processing or time domain processing of Infinite Impulse Response (IRR).
The foregoing description of the exemplary embodiments of the disclosure has been presented only for the purposes of illustration and description and is not intended to be exhaustive or to limit the disclosure to the precise forms disclosed. Many modifications and variations are possible in light of the above teaching.
The embodiments were chosen and described in order to explain the principles of the disclosure and their practical application so as to enable others skilled in the art to utilize the disclosure and various embodiments and with various modifications as are suited to the particular use contemplated. Alternative embodiments will become apparent to those skilled in the art to which the present disclosure pertains without departing from its spirit and scope.
Number | Date | Country | Kind |
---|---|---|---|
108123593 | Jul 2019 | TW | national |