The present invention is related to the detection and amelioration of noise and data and, in particular, to a method and system for discrete universal denoising that uses statistics accumulated for conditioning classes to control filtering iterations at the context-class level during an iterative discrete-universal-denoising procedure.
Whenever information is electronically encoded as original, or clean, data, and then transferred from the data source to a data destination, noise may be introduced into the data by the transfer process, resulting in alteration of the original, clean data and reception of the data by the data destination as noisy data. For example, when information is electronically encoded as a sequence of binary bits and sent through a communications network, such as a local Ethernet, to a destination node, there is a small probability that any given bit within the original, or clean, sequence of binary bits ends up being corrupted during transfer through the Ethernet, resulting in a “0” bit in the clean data being altered to a “1” bit in the noisy data received at the destination node, or a “1” bit in the clean data altered to a “0” bit in the noisy data received at the destination node. Although electronic communications media are classic examples of noisy channels, almost any type of data transfer, data storage, or data manipulation may result in data corruption, and therefore may be modeled as a noisy channel. For example, there is a small probability, associated with each bit of a block of binary data, that the bit will be altered when the block of data is stored and then retrieved from a hard disk, or even when the block of data is transferred from local cache memory to global random-access memory within a computer system. In general, redundant data, including check sums and cyclical redundancy codes, are embedded into data encodings to allow corrupted data to be detected and repaired. However, the amount of redundant data needed, and the accompanying costs and inefficiencies associated with redundant data, grows as the acceptable level of undetectable and/or unrepairable data corruption decreases.
In many cases, data corruption may occur prior to a point in a process at which redundant information can be embedded into a data signal to facilitate error detection and correction. As one example, a scanner that optically scans a printed document to produce a digital, electronic encoding of an image of the document can be viewed as a noisy channel in which discrepancies between the digitally encoded image of the document and the original document may arise. Such discrepancies may be introduced by a variety of optical and electronic components within the scanner that focus an optical image of the document onto a light-detecting component that transforms the detected optical image into an electronically encoded image of the document. When the digitally encoded image of the document is displayed or printed, different types of noise may be perceived as graininess, irregularities along the edges of text characters or objects within graphical images, uneven shading or coloration, random speckling, or other such visually distinguishable differences between the printed or displayed version of the digitally encoded data and the original document.
Denoising techniques can be applied to a noisy, digitally encoded image in order to produce a denoised, digitally encoded image that more accurately represents the original document that was scanned to produce the noisy, digitally encoded image. Denoising techniques may also be applied to data received over channels that are too noisy for recovery of the original data using the redundant data incorporated within the data to facilitate error correction. A wide variety of additional applications of denoising techniques have been identified and are well known. Recently, a discrete universal denoiser method (“DUDE”) has been developed for denoising the noisy output signal of a discrete, memoryless data-transmission channel without relying on knowledge of, or assumptions concerning, the statistical properties of the original, or clean, signal input to the discrete, memoryless channel. Even more recently, the DUDE method has been extended for denoising continuous tone images, such as scanned documents or images. The extended DUDE method is referred to as the “DUDE-CTI method,” or simply as the “DUDE-CTI.” The DUDE-CTI method is intended for use in a variety of image and data scanning, processing, and transfer applications. The DUDE-CTI method has shown promising results for certain types of noisy channels. An efficient DUDE-CTI depends on collections of symbol-occurrence statistics for each of a large number of different pixel contexts observed within an image. Because of the large number of possible contexts, an expedient approach is to coalesce individual contexts into groups, or classes, of contexts, and to then collect statistics on a context-class basis, rather than for individual contexts.
In various embodiments of the DUDE-CTI method, and other denoising methods, it is desirable, when possible, to prefilter a noisy image in order to remove, as far as possible, various types of noise that can be ameliorated by context-dependent filtering or denoising prior to applying the more complex, global, and statistical DUDE-CTI and DUDE methodologies. In the DUDE-CTI method, and even more recent, enhanced discrete-universal-denoising methods for denoising images and other two-dimensional and higher-dimensional data sets, the discrete-universal-denoising method is iterative. Each iteration produces a next filtered image from which contexts are determined for a next subsequent application of the method. In currently available iterative discrete-universal-denoising methods, iteration continues until one of several possible global convergence criteria are satisfied. However, in certain cases, image quality, signal-to-noise ratios, or other measures of denoising effectiveness do not increase, but may, in fact, decrease with additional iterations. Information-theory researchers, denoising-method developers, and manufacturers and users of a variety of data acquisition, data-storage, data-processing, and data-transfer devices that employ denoisers, continue to seek iterative, enhanced discrete-universal denoisers that efficiently produce optimally or near-optimally denoised data sets.
FIG. 1 illustrates digital encoding of a printed document to produce a clean image signal.
FIG. 2 illustrates a noisy signal corresponding to the clean image signal discussed with reference to in FIG. 1.
FIGS. 3A-C illustrate salt-and-pepper noise and Gaussian noise.
FIGS. 4A-B illustrate two different, well defined context neighborhoods that may be employed during analysis and denoising of image signals.
FIGS. 5A-D illustrate context usage during analysis and denoising of noisy signals.
FIG. 6 illustrates the predictor function {circumflex over (z)}( ).
FIG. 7 illustrates computation of an error ei for a symbol zi observed within a context Ci in noisy signal.
FIG. 8 illustrates accumulation of error information for a particular context during analysis of a noisy image signal.
FIG. 9 illustrates a context vector.
FIG. 10 illustrates a context-vector to cluster-index mapping.
FIG. 11 illustrates a context-clustering function C( ) used by various embodiments of the DUDE-CTI denoising method.
FIG. 12 illustrates the use of clustering by the DUDE-CTI method during a first pass, in which error histograms are prepared.
FIG. 13 illustrates generation of context-specific symbol-occurrence probability distributions qCT from cluster-associated error-occurrence vectors qVT collected during the first pass of a cluster-based DUDE-CTI method.
FIG. 14 illustrates a channel-noise-model matrix Π.
FIG. 15 illustrates construction of a relative distortion vector for replacement of a symbol ak in a noisy signal by a symbol aj.
FIG. 16 illustrates the computation of an estimate of the distortion produced by replacing symbol ak within context C in a noisy signal by the replacement symbol aj.
FIG. 17 illustrates a symbol-replacement function g(C,z).
FIG. 18 illustrates a 5×5 context that is used as a basis for predicting a value corresponding to a context-embedded symbol in the described family of embodiments of the present invention.
FIG. 19 illustrates an initial step in a discrete-universal denoising method in which embodiments of the present invention are applied.
FIGS. 20-22 illustrate the concept of prediction classes and conditioning classes.
FIGS. 23A-B provide control-flow diagrams for an iterative enhanced discrete-universal denoiser.
FIG. 24 illustrates the iterative discrete-universal-denoising process discussed with reference to FIGS. 22-23.
FIG. 25A illustrates the portions of a noisy image that may contribute to the symbol values within a context in successive versions of an image produced by the iterative enhanced discrete-universal denoiser described with reference to FIGS. 23A-B.
FIG. 25B illustrates the portions of successive versions of an image produced by the iterative enhanced discrete-universal denoiser described with reference to FIGS. 23A-B that contain symbols with values partially dependent on the symbol value of a particular noisy symbol in a noisy image.
FIG. 26 provides a control-flow diagram for a function “distant,” employed in embodiments of the present invention, that determines whether or not a symbol predicted by a context-based predictor, x( ), is sufficiently distant, in symbol value, from the corresponding noisy-image symbol zi to suggest that the context on which the prediction is based is noise corrupted or that the underlying noisy-image symbol zi is noise corrupted.
FIG. 27 illustrates data structures used to collect statistics on the frequency that the predicted symbol {tilde over (x)}i based on a context Ciyn of a conditioning class is dissimilar from the context-embedded symbol zi, for all noisy-image symbol values zi and all conditioning classes.
FIGS. 28A-29-C provide control-flow diagrams for a routine “validQs,” which determines whether or not each conditioning class for which statistics are collected from a noisy image z remains valid with respect to discrete-universal-denoising assumptions.
FIG. 30 provides a control-flow diagram for the function “denoise,” called in step 2211 of FIG. 22 according to embodiments of the present invention.
FIG. 31 shows, for illustration purposes, plots of iterative universal denoising processes with and without incorporating method embodiments of the present invention.
Embodiments of the present invention are directed to various enhanced discrete-universal denoisers that have been developed to denoise images and other one-dimensional, two-dimensional or higher-dimensional data sets in which the frequency of occurrence of individual contexts may be too low to gather efficient statistical data or context-based symbol prediction. In these denoisers, image quality, signal-to-noise ratios, or other measures of the effectiveness of denoising that would be expected to increase monotonically over a series of iterations may decrease, due to assumptions underlying the discrete-universal-denoising method losing validity. Embodiments of the present invention apply context-class-based statistics and statistical analysis to determine, on a per-context-class basis, when to at least temporarily terminate filtering iterations on each conditioning class. Each iteration of the iterative methods applies context-based denoising only for those conditioning classes that statistical analysis indicates remain valid for denoising.
In a first subsection, denoising and the DUDE and DUDE-CTI denoising methods are first described, with reference to FIGS. 1-20, in order to provide a basis for understanding the present invention. Embodiments of the present invention are discussed in a following subsection.
FIG. 1 illustrates digital encoding of a printed document to produce a clean image signal. In FIG. 1, a displayed image 102 of a digitally encoded title page is shown, with a small disk-like region 104 of the displayed document shown at a higher magnification 106. The document is displayed as an array of square pixels, such as pixel 108, and the digital encoding of the document comprises a sequence of integers, each integer representing an intensity value of a corresponding pixel. Commonly, for multi-level document images, pixel values range over a grayscale range from 0, indicating black, to 255, indicating white, with a continuous range of intermediate gray tones encoded by the integers 1-254. The integers 0-255 can therefore be considered to be symbols of a 256-symbol alphabet. Different techniques may be used to encode colored images. In one technique, three different grayscale-like encodings are used to encode intensity values of three primary colors, and the three different encodings are simultaneously displayed or rendered by a three-primary-color display or rendering device. Alternatively, a larger range of integer values may be used to encode a full range of color and intensity values in a single integer field. Thus, a pixel corresponds to a small region of a displayed or printed image, and the integer value associated with a pixel in a digitally encoded image represents the intensity, or both the color and intensity, for display or rendering of the pixel on a display or rendering device.
A printed document that is to be scanned by a scanning device can be considered as a clean signal. In other words, the printed document can be viewed as a large set of pixel-intensity values that, when displayed or printed, would appear visually indistinguishable from the original, printed document. The pixel data actually obtained as a result of scanning may be considered to be a noisy signal. FIG. 2 illustrates a noisy signal corresponding to the clean image signal discussed with reference to in FIG. 1. In comparing FIG. 2 to FIG. 1, it is easily observed that a number of pixels, such as pixel 202, have intensity values different from the values that the pixels would be expected to have based on the original, clean image shown in FIG. 1. The corresponding noisy image 204 is seen to have a number of visually discernable distortions, such as streaks 206 and speckles 208. In a scanning application, the original document represents the clean image signal, and the digitally encoded document produced by scanning the original document represents the noisy image signal. In various other applications, the clean signal may be an initial, digitally encoded document or other information source, and the noisy signal may be the corresponding digitally encoded document or other information source received following transmission of the clean signal through a communications medium or retrieved following storage of the clean signal in a volatile or non-volatile electronic data-storage device.
FIGS. 3A-C illustrate salt-and-pepper noise and Gaussian noise. FIG. 3A shows a small portion of a digitally encoded image 302, all pixels of which have a uniform intensity value i 304 with respect to a range of pixel-intensity values from a minimum value (306 in FIG. 3) to a maximum value (308 in FIG. 3). A two-dimensional graph of the intensity values of individual pixels from the region, in which pixels are taken in some particular order from the two-dimensional image, produces a straight, horizontal line 310. FIG. 3B illustrates salt-and-pepper noise added to the small region of uniform pixel intensity shown in FIG. 3A. Salt-and-pepper noise can be modeled as independent probabilities, associated with each pixel, that the intensity value associated with the pixel is altered, or corrupted, by a noisy channel to have either a minimum intensity value or a maximum intensity value. In FIG. 3B, two pixels 312-313 have intensity values altered to the minimum intensity value and two pixels 314-315 have intensity values altered to the maximum intensity value. A two-dimensional graph of the pixel intensity values for the pixels of the small region 316 of an image with added salt-and-pepper noise is seen to exhibit a number of narrow spikes 318-321 corresponding to pixels with altered, or corrupted, intensity values. FIG. 3C illustrates Gaussian noise added to the small region of uniform pixel intensity shown in FIG. 3A. Gaussian noise may be modeled as the addition of a value of an independent Gaussian random variable, associated with each pixel, to the pixel intensity value of the pixel. In one convenient mathematical model, the Gaussian random variables are considered to be independent, and to be identically distributed. Actual Gaussian-like noise produced by various types of noisy channels may not exhibit independent and identical distributions of alterations in pixel intensities, but a model employing independent and identically distributed Gaussian random variables often serves as a reasonable approximation for different types of Gaussian-like noise, and provides a tractable and computable mathematical framework for analysis of the noise. A two-dimensional graph of the pixel intensity values of the small region of an image shown in FIG. 3A with added Gaussian noise shows random fluctuations 324 about an expected pixel intensity i 326 for the small region of the image 328.
A discrete universal denoiser for continuous-tone images (“DUDE-CTI”) has been developed for general denoising of digitally encoded images, and other noisy data. The DUDE-CTI method is next described, as one practical application for denoising methods that represent embodiments of the present invention.
In both the DUDE-CTI and other context-based denoisers, an image signal, or digitally encoded image, is considered to be a two-dimensionally-ordered sequence of symbols, each symbol mapped to one of a finite set of numerical values. Most of the symbols in a signal have well-defined two-dimensional contexts, or neighborhoods, and these contexts play a significant role in both the DUDE-CTI and other denoisers. FIGS. 4A-B illustrate two different, well defined contexts that may be employed during analysis and denoising of image signals. Each square, such as square 402 in FIG. 4A, represents a single pixel intensity value within an image signal. As shown in FIG. 4A, the pixel intensity value associated with a pixel, such as the pixel intensity value associated with pixel 404, is considered during analysis and denoising as a symbol zi chosen from a finite alphabet A≡{a1, a2, a3, . . . an} where the index i indicates the order, or position, of the pixel within the signal. The pixel intensity value, or symbol zi, associated with pixel i may be any one of the symbols in alphabet A. For common encodings of multi-level images, the symbols in A, {a1, a2, a3, . . . an}, are the unsigned, single byte values 0, 1, . . . , 255. In each of several passes, the DUDE-CTI and other denoisers consider each symbol within a signal with respect to the symbol's context. The context 406 shown in FIG. 4A for a currently considered pixel, or central symbol, 408 comprises the pixel values contained in a 5×5 square region surrounding the currently considered pixel 408, but not including the currently considered pixel. In other words, the context for symbol 408 comprises the values of the 24 nearest symbol neighbors within the image signal containing currently considered symbol 408. In the discussion of the DUDE-CTI denoiser, the currently considered symbol, such as symbol 408 in FIG. 4A, is referred to as the “central symbol” of the context surrounding the symbol, but the context is not considered to include the central symbol.
Many different context shapes and sizes are possible. FIG. 4B shows an alternative 24-symbol context for an image signal. In general, the useful information content per symbol of a context may increase with increasing size up to a context size of maximum useful information per symbol, and then decrease with context sizes greater than the context size of maximum useful information per symbol. Analysis and denoising of noisy signals involves frequent context-based computations, with execution times increasing with increases in the context size employed in the analysis. Therefore, efficiency constraints may constrain context sizes to sizes, in symbols, below the maximum useful information per symbol size. Moreover, the maximum useful information per symbol context size may vary with the image signals being denoised.
FIGS. 5A-D illustrate context usage during analysis and denoising of noisy signals. In FIG. 5A, the uppermost and leftmost symbol 502 with a full, 3×3 symbol context 504 within a small, square image 506 is shown. In certain types of analysis and denoising, special contexts are used for edge symbols, such as the first and last symbols of each row and column of the image. In other techniques, including the technique illustrated in FIGS. 5A-D, only symbols with full contexts are analyzed. FIGS. 5B and 5C show the 3×3 contexts 508 and 509 around the next rightmost symbol 510 and the next lowest symbol 512 with respect to symbol 502 in FIG. 5A. As shown in FIG. 5D, a given pass, or stage, of analysis or denoising may involve successive consideration of each full-context symbol within an image signal, starting with a first symbol 502 and proceeding to a final symbol 514. In FIG. 5D, small arrows, such as arrow 516, indicate each step of a pass in which each symbol is considered. In alternate techniques, all of the symbols within a signal may be considered, with specialized asymmetrical contexts employed for those symbols lacking a full context, or neighborhood.
Images are generally 2-dimensional data sets, and analysis and denoising methods for images therefore frequently use 2-dimensional contexts symmetrically disposed with respect to the central symbol. In other types of data sets, other types of contexts may be appropriate. For example, in digitally encoded text files, comprising essentially a one-dimensional series of symbols, a single length of symbols that include the central symbol may be employed as a context. Other types of signals may profitably employ more complex, non-contiguous or higher-dimensional contexts.
The DUDE-CTI method employs a central-symbol predictor function {circumflex over (z)}( ). FIG. 6 illustrates the predictor function {circumflex over (z)}( ). As illustrated in FIG. 6, the {circumflex over (z)}( ) function receives, as a sole argument, a context, such as context Ci 602 in FIG. 6, from a noisy signal and returns a symbol 604 predicted to be the central noisy symbol. In other words, as shown in FIG. 6, for each possible context that may occur in a noisy signal, the predictor functions {circumflex over (z)}( ) returns a corresponding central symbol for the context.
The DUDE-CTI method computes an error ei for each symbol zi in the noisy signal as the difference between the observed symbol zi, and the symbol predicted by the predictor function {circumflex over (z)}( ) for the context Ci for the symbol zi. FIG. 7 illustrates computation of an error ei for a symbol zi, observed within a context Ci observed in a noisy signal.
FIG. 8 illustrates accumulation of error information for a particular context during analysis of a noisy image signal. The error-information accumulation in FIG. 8 is context specific. As discussed later, more efficient DUDE-CTI implementations use cluster-specific error-information accumulation. As shown in FIG. 8, a data structure, or vector, qCiT 802 is maintained for each possible context Ci in order to count the occurrences of different possible error values computed for the context Ci during analysis of a noisy image signal. If the predictor function {circumflex over (z)}(Ci) predicts the symbol aj for context Ci, then, according to the error equation ei=zi−{circumflex over (z)}(Ci), the error values that can be computed for context Ci range from ai-aj 804 to an-aj 806.
In a first pass of the DUDE-CTI denoiser, each symbol in a noisy image signal 808 is considered, and the error for each considered symbol is tabulated in the appropriate vector qCT for that symbol. For example, in FIG. 8, an error ei 810 is computed from the first considered symbol zi 812 and associated context Ci, and the computed error ei is used to compute the position of a counter 814 within the vector qCiT 802 that is updated to reflect the occurrence of error ei in the noisy image signal 808. The computed error ei 810 can be viewed as being offset from a counter 816 within the vector qCiT 802 corresponding to a computed error of 0. As each symbol is considered during the first pass of the DUDE-CTI method, the vector qCT corresponding to the observed context of the symbol is updated to reflect the occurrence of the error e computed from the symbol and context observed for the symbol within the noisy image signal. After the first pass of the DUDE-CTI method, each vector qCT generally stores a histogram more or less symmetrically disposed about the counter within the vector qCT corresponding to a computed error value e of 0. For example, in FIG. 8, the contents of the counters within vector qCiT 802 are plotted above the vector qCiT in a two-dimensional plot 818, and form a histogram with a central, highest peak 820 corresponding to the counter 816 within vector qCiT 802 representing a computed error of 0. In other words, the symbol predicted by the predictor function {circumflex over (z)}( ) for a given context Ci is generally the symbol most often observed within the context Ci in the noisy signal. Thus, following the first pass of the DUDE-CTI denoiser method, histograms of observed errors for each context are collected.
Unfortunately, when contexts of even modest size are used, a typical image will not contain a sufficient number of occurrences of each context to collect reliable, well-formed histograms of error occurrences, such as the histogram shown in FIG. 8. For this reason, the DUDE-CTI method employs context clustering in order to collect sufficient numbers of error occurrences for each context.
FIG. 9 illustrates a context vector. It is convenient to consider context vectors for the mathematical steps of the DUDE-CTI method. As shown in FIG. 9, the symbols that occur within a context 902 may be ordered into a vector 904 according to some ordering method that is uniformly applied to all contexts. In FIG. 9, symbols A-L from 2-dimensional context 902 are re-ordered into a column vector 904 by a left-to-right, top-down traversal of the 2-dimensional context 902. The ordering method is arbitrary, and different ordering methods may be mathematically or programmatically convenient for different types of contexts. A context vector may be considered to be a row vector or a column vector, depending on conventions chosen for the analysis using the context vector. In other words, the convention is arbitrary.
Context clustering can be thought of as a many-to-one mapping, or binning, of context vectors in a context-vector space into a set of context-cluster indices. FIG. 10 illustrates a context-vector to cluster-index mapping. In FIG. 10, a context vector 1002 CεAk of dimension k is mathematically transformed 1004 to a cluster index V 1006 with a range of values expressible using a sequence of m symbols over some alphabet (e.g. binary), where m is less than the dimension k of the context vector.
FIG. 11 illustrates a context-clustering function C( ) used by various embodiments of the DUDE-CTI denoising method. As shown in FIG. 11, the context-clustering function C( ) maps a given context, supplied as a sole argument, that is expected to produce a particular type of error histogram to a particular cluster to which other contexts that are expected to produce similar error histograms may be mapped. The context is, in turn, mapped to a cluster index. Multiple contexts are generally mapped to any given cluster by the context-clustering function C( ). For example, in FIG. 11, three contexts 1102-1104 are mapped by the context-clustering function C( ) to Cluster 1 1105, in turn mapped to, or associated with, cluster index Vi 1106. Similarly, contexts 1108 and 1110 are both mapped by the context-clustering function C( ) to Cluster 2 1111, in turn mapped to, or associated with, cluster index Vj 1112. The number of contexts mapped to any particular cluster may vary, depending on the context-clustering function C( ). Any particular DUDE-CTI embodiment may use any of a number of different context-clustering functions, although suitable context-clustering functions generally have the property of mapping contexts expected to produce similarly shaped error histograms, such as the error histogram shown in FIG. 8, to a common cluster. In other words, all the contexts mapped to any particular cluster by a suitable context-clustering function would produce similarly shaped error histograms were the first pass of the DUDE-CTI method executed on a sufficiently large noisy image signal to collect sufficient occurrence counts of errors for each context to generate well-formed histograms for each context.
FIG. 12 illustrates the use of clustering by the DUDE-CTI method during a first pass, in which error histograms are prepared. As shown in FIG. 12, a context-clustering function C( ) 1202 is employed to map contexts occurring within a noisy image signal 1204 to a set of clusters 1206. Then, an occurrence-count vector qViT 1208-1211 is instantiated and initialized for each possible cluster Vi. Finally, each symbol in the noisy image signal 1204 is analyzed 1214 in the first pass to compute and tabulate the occurrence of computed errors, on a cluster-by-cluster basis. The errors are computed as discussed above, with reference to FIGS. 7 and 8, except that all errors observed for all contexts that belong to a given cluster Vi are commonly tabulated together in the vector qViT for that cluster, rather than being separately tabulated in context-associated vectors qCT, as was done in FIG. 8. Thus, clustering allows a much larger number of error occurrences to be tabulated together in each histogram generated during analysis of a given noisy image signal. However, common tabulation of error occurrences in cluster-associated vectors qVT is only meaningful if the shapes of the error histograms that would be separately produced for all contexts associated with the cluster are similar.
FIG. 13 illustrates generation of context-specific symbol-occurrence probability distributions {tilde over (q)}CT from cluster-associated error-occurrence vectors qVT collected during the first pass of a cluster-based DUDE-CTI method. In FIG. 13, a cluster-associated error-occurrence vector qVjT 1302 is shown at the top of the diagram, along with a histogram plot 1304 of the values stored in the counters within the cluster-associated vector qVjT, using the illustration convention employed in FIG. 8. A context-specific symbol-occurrence probability distribution {tilde over (q)}CiT for a context Cj associated with cluster Vj 1304 is generated in FIG. 13 by copying the contents of the cluster-associated error-occurrence vector qViT 1302 into the counters of context-associated context-specific symbol-occurrence probability distribution {tilde over (q)}CjT. However, rather than copying the error-occurrence counts from cluster-associated vector qViT into corresponding counters of context-associated context-specific symbol-occurrence probability distribution {tilde over (q)}CiT, each copy involves an offset 1308, so that the context-specific probability distribution 1310 is centered about the symbol value {circumflex over (z)}(Cj) predicted by the predictor function for the context, rather than centered at the position 1312 corresponding to a computed error of 0 in the cluster-specific histogram 1304. In other words, the final, context-specific vector {tilde over (q)}CiT represents a probability distribution for the occurrences of symbols a1, a2, . . . an from the alphabet A for all occurrences of the context Cj in the noisy image signal, estimated from the probability distribution observed for the cluster to which the context is mapped by the context-clustering function C( ). The copy operation may therefore be accompanied by a normalization, to provide a normalized, estimated probability distribution, and a domain-related adjustment, since the domain of qVjT is generally twice as large as the symbol alphabet size n, which is the domain of {tilde over (q)}CjT. Thus, the error-occurrence counts tabulated in common for each cluster are used to generate specific symbol-occurrence probability distributions {tilde over (q)}CiT for each context Cj.
Next, the DUDE-CTI denoiser generates a function g(C, z) that computes a replacement symbol {circumflex over (x)} for a given central symbol z that occurs within context C observed in the noisy image signal. The replacement function g( ) can then be used in a second, symbol-by-symbol pass, to replace each symbol in the noisy image signal with a corresponding replacement symbol. The symbol replacement for each symbol in the noisy image signal is carried out independently. In other words, the contexts applied to the replacement function g( ) are the contexts observed in the noisy image signal, rather than partially symbol-replaced contexts. It should be noted that, in many cases, the replacement symbol {circumflex over (x)} is identical to the corresponding observed symbol z in the noisy image signal.
Computation of the replacement function g( ) involves use of two matrices: (1) a matrix Π that represents a channel-noise model for the noise-inducing channel that generates symbol differences between the initial, clean image signal and the noisy image signal; and (2) a distortion matrix Λ that represents the distortions in a recovered image produced by substituting for symbol ai in the corresponding clean image signal any of the symbols a1, a2, . . . an, in alphabet A.
FIG. 14 illustrates a channel-noise-model matrix Π. In FIG. 14, the row vector mclean 1402 contains counts of the occurrences of each symbol in alphabet A within the clean, original image signal. The row vector mclean is indexed by symbols from the alphabet A, a1, a2, a3, . . . . A corresponding row vector mnoisy, contains the counts of occurrences of the symbols of the alphabet A in the noisy image signal. Multiplication of the row vector mclean by the channel-noise-model matrix Π 1406 produces a derived row vector {circumflex over (m)}noisy 1404. Each element πi,j of the channel-noise-model matrix Π contains the probability of the transition of the symbol ai to the symbol aj as the clean signal passes through the noisy channel modeled by the channel-noise-model matrix Π. In mathematical terms:
mcleanΠ={circumflex over (m)}noisy
{circumflex over (m)}noisy[i]=mclean[1]p(a1→ai)+mclean[2]p(a2→ai)+ . . . +mclean[n]p(an→ai)
The derived vector {circumflex over (m)}noisy 1404 is expected to be fairly close, relative to the signal size, to the vector mnoisy containing counts of symbols observed in a noisy signal. Provided that the channel-noise-model matrix Π is invertible, or an approximate or pseudo inverse of the matrix Π can be obtained by any of a number of matrix inversion methods, an observed vector mnoisy including the counts of occurrences of symbols observed in a noisy signal can be multiplied by the inverse of the channel-noise-model matrix Π to produce approximate estimates of the counts of occurrences of symbols in the clean signal:
mclean≅mnoisyΠ−1
This approximation technique can be extended to vectors {tilde over (q)}CjT that include the derived probabilities of occurrences of symbols of the alphabet A observed in contexts Cj in the noisy signal to produce estimates of probabilities of occurrence of symbols in the alphabet A in the clean signal corresponding to occurrences of the context Cj in the noisy signal by multiplication of {tilde over (q)}CiT by the inverse of the channel-noise-model matrix Π, as follows:
qclean,CjT≅{tilde over (q)}CjTΠ−1
FIG. 15 illustrates construction of a relative distortion vector that numerically expresses the distortion expected from replacement of a symbol ak in a noisy signal by a symbol aj. Construction of a relative distortion vector 1502 involves a column of the channel-noise-model matrix Π 1504, discussed above with reference to FIG. 14, as well as a column from the distortion matrix Λ 1506. Each element λi,j in the distortion matrix Λ contains a numerical estimate of the distortion produced in an image when the symbol ai in the clean signal is replaced by the symbol aj in the noisy signal. When a column j 1508 is selected from the distortion matrix Λ and a column k is selected from the channel-noise-model matrix Π 1510, and the selected columns λj and πk are combined by the Schur product operation 1512, the distortion vector dk→j 1514 is produced. The Schur product is carried out by the multiplication of each element in the column λj by the corresponding element in the πk column. Each element of the distortion vector dk→j, λi,j, πi,k, , includes a numerical estimate of the relative distortion produced when symbol ak in a noisy signal is replaced by the symbol aj when the corresponding symbol in the clean signal is ai.
FIG. 16 illustrates the computation of an estimate of the distortion produced by replacing symbol ak within context C in a noisy signal by the replacement symbol aj. This distortion value is obtained by the inner product of the row vector qclean,CT 1602 by the distortion column vector dk→j 1604. Note that the row vector qclean,CT is obtained, as discussed above, by multiplying the derived row vector qTC by the inverse of the channel-noise-model matrix Π. Therefore, as shown in FIG. 16, a numerical estimate of the distortion produced by replacing the symbol ak within context C in a noisy signal by the symbol aj can be obtained entirely from the derived symbol occurrence frequencies within the noisy signal, the distortion matrix Λ, and the channel-noise-model matrix Π and its inverse Π−1.
FIG. 17 illustrates a symbol-replacement function g(C,z). The symbol-replacement function g(C,z) computes a replacement symbol for an observed central symbol z within an observed context C. The observed central symbol and context are supplied as arguments to the symbol-replacement function g(C,z). The function g( ) considers each possible replacement symbol value for the central symbol of the context C and returns the estimated minimally distorting replacement character {circumflex over (x)}, where, for a given observed central symbol z within an observed context C:
where, for z=ai, {circumflex over (d)}=→ai={circumflex over (d)}ai→ai={tilde over (q)}clean,CT·di→j
Thus, the symbol-replacement function g( ) produces a replacement character {circumflex over (x)} for an observed central symbol z within a context C observed in the noisy signal.
Alternative denoising methods may employ two or more levels of clustering. In the following discussion, a two-level-clustering approach is described, in which context-clustering classes include prediction classes and conditioning classes.
FIG. 18 illustrates a 5×5 context that is used as a basis for predicting a value corresponding to a context-embedded symbol in the described family of embodiments of the present invention. As with the various alternative contexts, described in the preceding subsection, the 5×5 context 1802 shown in FIG. 18 is an abstract template that is superimposed over a central symbol “x” 1804 of an image in order to define the local context within which the symbol “x” is embedded. The 5×5 context defines a symmetrical, square region of 24 symbols that surround the central symbol 1804. The central symbol “x” 1804 is not considered to be part of the context in which it is embedded. In FIG. 18, numeric indexing used to index each symbol within the context is shown above 1806 and to the left-hand side 1808 of the context 1804. Each symbol in the context is indexed in similar fashion to a point in two-dimensional Cartesian space defined by x and y axes. The symbol 1810, for example, has indices (−2,2), the first index of the pair relative to a horizontal axis 1812 comprising the central row of symbols within the context and the second index of the pair relative to a vertical axis 1814 comprising the central column of symbols within the context. In the following discussion, a context may be considered to be a two-dimensional matrix, with two indices used to indicate a particular element of the context, or, equivalently, a one dimensional vector with a single index, with the one-dimensional vector constructed by, as one example, concatenating rows or columns of the two-dimensional matrix in a particular order. The two indices for the matrix representation or single index for a vector representation are provided within parentheses, and shown as a subscript to a context symbol, such as “C(−1, 1).” The context symbol can also be used to describe a context-generating function that generates a context for a particular symbol within a dataset:
Cij=Cj(ji)
where Cij is the context selected to embed symbol ji from image or dataset j; and Cj( ) is a function that generates context Cij for dataset j symbol ji.
FIG. 19 illustrates an initial step in a discrete-universal denoising method that represents an embodiment of the present invention. In the current discussion, the noisy data set on which methods of the present invention operate is considered to be a two-dimensional image, denoted as z, with elements zi. However, any of various different types of one-dimensional and higher-dimensional datasets may be denoised by iterative denoisers that include embodiments of the present invention. In FIG. 19, the noisy image z 1902 is shown on the left side of the figure. The two-dimensional noisy image can be considered to be a two-dimensional matrix, with elements z(i,j) where i is a row index and j is column index. However, a two-dimensional image can be alternatively considered to be a one-dimensional vector z with elements zi. For example, rows of the two-dimensional image may be concatenated together, in row order, to produce the vector z. When convenient, noisy image z may be treated as a two-dimensional matrix, or, at other times, treated as a one-dimensional vector, with the notation z and zi used for both. The same convention is used for describing filtered, denoised, and clean images and contexts within images.
In an initial step in certain denoising methods, a noisy image z is filtered to produce a prefiltered, noisy image y 1904. Both z and y generally have the same number of elements. The prefiltering step can be carried out in a variety of different ways. In one approach, a neighborhood, or context, about each pixel is considered, and a prefiltered-image symbol yi is predicted, or generated, from the image-element values, or pixel values, in a context or neighborhood surrounding each noisy-image pixel zi using one of various different filtering methods. The filtering methods can be described as computing the prefiltered-image symbol yi corresponding to noisy-image symbol zi as a function of the neighborhood ηi about noisy-image symbol zi:
yi=ƒ(ηi,zi)
where
ηi is the neighborhood of element zi in noisy image z.
Prefiltering generally removes or ameliorates certain types of noise corruption in a noisy image. One example of a prefiltering function is a function that averages all of the values of image elements in the neighborhood of noisy-image element zi to compute corresponding prefiltered-image symbol yi. An averaging type of prefiltering may be effective for certain types of images, but may be deleterious for others, including images that contain sharp detail and high-contrast features, such as edges. In certain cases, an appropriate prefiltering function may be selected, by method embodiments of the present invention, based on criteria that depend on the type of noisy image z that is sought to be denoised. The prefiltered image y is primarily used for generating context classes, symbol prediction, and bias estimation for prediction classes.
FIGS. 20-22 illustrate the concept of prediction classes and conditioning classes. As shown in FIG. 20, each different context that occurs in an image, such as context 2002, would be expected to generate a corresponding symbol-occurrence distribution, such as symbol-occurrence distribution 2004, were the context to occur a sufficient number of times in the image. However, as one example, for a grayscale image, in which each pixel value is selected from the range {0, 1, . . . , 255}, the number of possible 5×5 contexts, each of which includes the 24 symbols other than the central symbol, is 25624. Were these different possible contexts to be of equal probability of occurrence within an image, the probability that any given context would occur even a single time within the image would be vanishingly small. Even for decidedly non-uniform context-occurrence probability distributions, there are nonetheless generally far too few occurrences of most contexts to generate statistically meaningful symbol-occurrence distributions, such as those shown in FIG. 20, for individual contexts.
In order to achieve meaningful levels of observables, contexts are grouped into various types of context classes. FIG. 21 illustrates prediction classes into which individual contexts are grouped. In FIG. 21, four prediction classes 2102-2105 are shown associated with four corresponding prediction-error distribution 2108-2111. All of the contexts within a prediction class are assumed to exhibit similar prediction-error distributions. Various different techniques may be used to group contexts together into prediction classes. In general, the context groupings are estimates derived from numerical procedures based on assumptions of the distribution of pixel values in images. For example, for particular types of images, assumption of continuity of pixel-value trends along arbitrary directions within the image may be assumed. Additional assumptions may include symmetry-based assumptions and/or pixel-value-scaling based assumptions. A first prediction traversal of the image is used to accumulate distributions of prediction errors for each prediction class. A symbol {tilde over (x)}i is predicted for each prefiltered-image symbol yi using a prediction function {tilde over (x)}(Siyi), where Siyi is the prefiltered-image context in which prefiltered-image symbol yi is embedded. A prediction error, yi−{tilde over (x)}(Siyi), is then computed for each predicted symbol {tilde over (x)}i. The errors are accumulated, in a histogram, for each prediction class. By computing predictions errors from prefiltered-image symbols, rather than from noisy-image symbols zi, as in the above-described DUDE and DUDE-CTI methods, a significant amount of noise distortion in contexts and in prediction-error statistics is avoided. Accumulation of prediction errors for all of the contexts in a prediction class is possible because, although each context in a prediction class may predict a different symbol, the predicted error yi−{tilde over (x)}(Siyi) depends only on the 0-centered prediction-error distribution common to all contexts within the prediction class. However, despite an assumption that the prediction-error distributions are centered about 0, it is often observed, as shown in FIG. 21, that the observed prediction-error distributions are slightly shifted, or biased, with a non-zero mean prediction error. For example, the prediction-error distribution 2108 exhibits a bias 2014 of 1, since the mean prediction error is 1.
The estimated biases obtained from the prediction-error distributions accumulated for each prediction class, in the first traversal of the image, are used to correct the symbols predicted from each prediction class so that the prediction-error distribution for each prediction class has a mean value of 0. Once corrected, following the first traversal of the image, the prediction classes are grouped together into larger conditioning classes for conditioning-class statistics collection in a second traversal of the image. FIG. 22 illustrates conditioning classes. In FIG. 22, two conditioning classes 2202 and 2204 are shown with associated prediction-error distributions 2206 and 2208. In general, a sufficient number of contexts are grouped within each conditioning class to obtain a common, statistically meaningful prediction-error distribution for each conditioning class. As shown in FIG. 22, the symbol-occurrence probability distribution 2210 for a particular context C 2212 of a conditioning class can be obtained by centering the conditioning-class prediction-error distribution about the symbol predicted from the context C by the prediction function {tilde over (x)}(C) and normalizing the distribution.
FIGS. 23A-B provide control-flow diagrams for an iterative enhanced discrete-universal denoiser. In FIG. 23A, the routine “denoise” is illustrated, in a control-flow diagram. In step 2302, a noisy image z is received. In step 2304, the noisy image z is prefiltered, as discussed above with reference to FIG. 19, to produce a first prefiltered image y1. Then, in the do-while loop of steps 2306-2313, the noisy image is iteratively denoised until one or more convergence criteria for the denoising method are met, as determined in step 2312. In the current iteration, data structures for statistics collection are initialized in step 2307. Then, bias statistics are collected and bias-based corrections are carried out in step 2308, as discussed above with reference to FIG. 21. The biases computed in step 2308 allow for accurate combination of prediction classes to generate larger conditioning classes for which prediction-error statistics are collected in a second statistics-collection phase, in step 2309, as discussed above with reference to FIG. 22. In steps 2309 and 2310, prediction-error statistics are collected and analyzed for each conditioning class in order to generate symbol-prediction-error distributions for each conditioning class. Once these statistics have been collected and normalized, and prediction-error distributions have been generated for each conditioning class, then, in step 2311, a denoised image {circumflex over (x)} is generated from the noisy image z. When the one or more global convergence criteria have been satisfied, as determined in step 2312, then the current, denoised image {circumflex over (x)} is returned as the denoised image. Otherwise, the current denoised image {circumflex over (x)} becomes the prefiltered image, y, for a next iteration of the do-while loop, in step 2313.
FIG. 23B provides a flow-control diagram for step 2311 in FIG. 23A. Denoising of the noisy image z to produce the denoised image {circumflex over (x)} is carried out in the for-loop of steps 2322-2325. In this for-loop, each symbol zi in noisy image z is considered. In step 2323, the conditioning class Qi is determined from the context Ciy in prefiltered image y for currently considered noisy-image symbol zi, where the context Ciy is the context in the prefiltered image y aligned with element zi in a noisy image z. An estimated context-specific clean symbol distribution {circumflex over (P)}x(Siy) is generated by a transformation of the context-class prediction-error distribution {circumflex over (P)}E (Qi). In one embodiment of the present invention, the transformation is carried out by multiplication of {circumflex over (P)}E(Qi) by a matrix:
{circumflex over (P)}x(Siy)=C({circumflex over (x)}i){circumflex over (P)}E(Qiy)
{circumflex over (P)}x(Siy) is used, in step 2324, along with columns of the channel-noise-model matrix Π and the distortion matrix Λ to generate the denoised-image symbol {circumflex over (x)}i corresponding to currently considered noisy-image element zi. The for-loop of steps 2322-2325 continues until all zi in noisy image z are considered, and corresponding denoised-image symbols {circumflex over (x)}i generated.
FIG. 24 illustrates the iterative discrete-universal-denoising process discussed with reference to FIGS. 22-23. FIG. 24 shows a portion of the noisy image z 2402, a corresponding portion of the first prefiltered image y1 2404, and a portion of a corresponding portion of a subsequent prefiltered image Yn 2406. A symbol zi 2408 is shown as embedded within a noisy-image context Ciz 2410 in the noisy image z 2402. The context Ciy1 2412 is the first prefiltered-image context aligned with, and corresponding to, context Ciz 2410 in the noisy image 2402. In the first iteration of the iterative, denoising process illustrated in FIGS. 22-23, the symbol {circumflex over (x)}i corresponding to noisy-image symbol zi is generated based on the conditioning class corresponding to prefiltered-image context Ciy1, on the noisy-symbol value zi, and, indirectly, on the pre-filtered image symbol yi1, as discussed in greater detail below. In other words, contexts are derived from the current prefiltered image y1 in the current iteration of the iterative process, but symbol denoising involves a computation based both on this current prefiltered-image context as well as the underlying noisy-image symbol embedded within the context. In each subsequent iteration of the iterative denoising process, as shown in FIG. 22, the current filtered image is updated, so that, over a course of N+1 iterations, as indicated in FIG. 24, N different prefiltered images are generated from which contexts are derived for symbol prediction and collection of symbol-occurrence statistics. In other words, the contexts and context clusters evolve, during the iteration process, since they are selected from each of successive filtered images.
As discussed above with reference to FIG. 19, the first prefiltered image y1 is generated using a median filter or other such filter based on noisy-image contexts. However, subsequent prefiltered images y2, y3, . . . , yN are based on the output image of the preceding iteration as well as on the underlying noisy-image symbols. The denoised image {circumflex over (x)} produced by iteration k during the iterative discrete-universal-denoising process becomes the prefiltered image yk+1 for iteration k+1. Therefore, although the noisy-image contexts Ciz are independent of the noisy symbols embedded within them, the symbol values of the successive prefiltered images become functionally dependent on an increasing number of embedded noisy-symbol values.
FIG. 25A illustrates the portions of a noisy image that may contribute to the symbol values within a context in successive versions of an image produced by the iterative enhanced discrete-universal denoiser described with reference to FIGS. 23A-B. Initially, the context 2502 in a noisy image contains noisy-image symbol values, in which any noise corruption is independent from one noisy-image symbol to another, under one of the assumptions of the discrete universal-denoising method. The symbol values of the corresponding prefiltered-image-y1 context depend on noisy-symbol values in the region 2504. A larger area of the noisy image contributes to the symbol values in the context of the prefiltered-image-y1 corresponding to context 2502 of the noisy image because calculation of each prefiltered-image symbol value is based on the noisy-image context surrounding that symbol in the noisy image, and, since 5×5 contexts are used, in the current example, an additional two rows and two columns at the boundary of the original context contribute to the symbol values within the context of the prefiltered-image-y1 corresponding to context 2502 of the noisy image. The region of the noisy image containing symbols that may affect the symbol values in the filtered-image-y2 context corresponding to noisy-image context 2502 increases further to area 2506. Thus, the number of noisy-image symbols that may contribute to the symbol values within successive prefiltered images increases with each successive prefiltered image. In many respects, this phenomenon is desirable, providing benefits of larger contexts without incurring a dilution in symbol-occurrence statistics that would result from using larger contexts.
FIG. 25B illustrates the portions of successive versions of an image produced by the iterative enhanced discrete-universal denoiser described with reference to FIGS. 23A-B that contain symbols with values partially dependent on the symbol value of a particular noisy symbol in a noisy image. Initially, in a noisy image 2510, the noise component of a noisy symbol value 2512 within a context 2514 does not contribute to any other symbol value in the image, according to the assumptions of the discrete universal-denoising method. However, after a prefiltering step, the noise component of the noisy symbol value may have contributed to the prefiltered-image values of the other symbols in the corresponding context 2515 of prefiltered image y1 2516, as indicated in FIG. 25B by shading of these symbols. The contribution of the noise component of the noisy-symbol value due to prefiltering expands still further, beyond the boundaries of the context, after a first denoising iteration, which produces a denoised image that is subsequently used as prefiltered image y2 2518 for the second denoising iteration. Furthermore, denoising itself may cause further contribution of the noise component of the noisy-symbol value to symbols within the prefiltered-image-y2 context 2520, as indicated by darker shading of those symbols in FIG. 25B. Additional expansion of these effects, and introduction of additional dependencies, may occur with each denoising iteration, as indicated by shading for prefiltered images y2 2522 and y3 2544. In general, the dependencies between symbol values within the successive prefiltered images quickly grow quite complex. Bleeding of the noise contribution of the value of a particular symbol into the values of surrounding symbols violates the assumption of independence of the noise-contributions to symbol values underlying the theory of discrete universal-denoising method, and is thus an undesirable characteristic of the iterative denoising method.
The two phenomena, illustrated in FIGS. 25A-B may interact in very complex and unstable ways, leading to increasingly significant violations of the assumption of independence of the noise-contributions to symbol values underlying the theory of discrete universal-denoising method. The denoising method may still work, despite violation of these assumptions, for several iterations, but may then fail spectacularly in subsequent denoising iterations, as discussed further below. In general, in the initial prefiltered image y1 and some number of successive prefiltered images, the functional dependencies of the prefiltered-image context symbol values on the underlying noisy-symbol embedded in the context are not sufficiently significant to degrade image denoising, as measured by signal-to-noise ratios or by some other metric. However, after some number iterations, the dependencies of prefiltered-image-context values on the underlying, embedded noisy-image symbol zi may become sufficiently significant to degrade denoising, so that the signal-to-noise ratio may fall precipitously from one iteration to the next.
The symbol-correction decision in DUDE, and related denoisers, can be interpreted as combining two pieces of advice on the value of the clean symbol, which is unknown, based on the noisy image and on the noise model. On one hand, the context statistics convey information on what the clean symbol is likely to be, given what is observed in similar contexts throughout the rest of the noisy image, while, on the other hand, the noisy sample itself conveys information on the likelihood of the corresponding clean sample value. In other words, the noise-related portion of a noisy-sample value does not depend on clean-image values. If the noise level is not too high, the advice of the noisy sample is given more weight, while, under more noisy conditions, the advice of the context is given increasing weight. The decision formula combines these pieces of advice under the assumption that the noisy sample value in the current location is not part of the context in which the noisy sample is embedded. However, prefiltering introduces some dependence of contexts on their noisy center samples, since the value of the center sample might have participated in the denoising of some of the components of the context in previous iterations, as discussed below with respect to FIGS. 25A-B. This is undesirable, since the information on the noisy center sample should be incorporated separately in the decision formula. These dependencies are the source of the observed degradation as the dependence becomes stronger from one iteration to the next.
Embodiments of the present invention address the problem discussed above with reference to FIGS. 24-25 by determining, on a context-class-by-context-class basis, when the functional dependencies of filtered-image contexts on underlying noisy-image noisy symbols become sufficiently significant to deleteriously affect context-based denoising. Embodiments of the present invention can interrupt or terminate context-based denoising for those conditioning classes for which the DUDE statistical assumptions are violated to the extent that denoising based on statistics collected for those conditioning classes is degraded, and yet continue to iterate towards convergence using context-based denoising with respect to those conditioning classes for which statistical assumptions remain valid for denoising.
As discussed below, embodiments of the method of the present invention employ symbol-prediction statistics and the channel noise model, as represented by the matrix Π, to determine when a conditioning class should not be used for denoising. The determination depends on noise model assumptions. In the following discussion, methods for making this determination in the cases of M-ary symmetric channel noise and salt-and-pepper noise are provided as examples of the noise-model-dependent determination technique. In general, when more or less than a number of noise-corrupted symbols estimated from channel statistics is observed for contexts of a conditioning class, then the conditioning class is deemed invalid. For example, when a salt-and-pepper noise model is assumed, and when more than an expected number of white noise symbols a255 occur in dark backgrounds and/or black noise symbols a0 occur in light backgrounds within contexts of a conditioning class, then the conditioning class is deemed invalid, and not used for denoising. The expected number of noisy symbols for contexts of a conditioning class is derived from channel parameters.
FIG. 26 provides a control-flow diagram for a function “distant” that determines whether or not a symbol predicted by a context-based predictor, {tilde over (x)}( ), is sufficiently distant, in symbol value, from the corresponding noisy-image symbol zi to suggest that the symbol zi is noise corrupted. The function is used for M-ary symmetric channel noise, as discussed further below. When zi is greater than {tilde over (x)}i as determined in step 2602, an initial distance d is computed as zi−{tilde over (x)}i, in step 2604. Otherwise, the distance is computed as d={tilde over (x)}i−zi in step 2606. When the computed distance is greater than some threshold value,
where nT<M, as determined in step 2608, then the function “distant” returns a value TRUE in step 2610, and otherwise returns a value FALSE in step 2612. Thus, the function “distant” indicates whether or not a predicted symbol {tilde over (x)}i is sufficiently distant, in value, from the value of symbol zi to be classified as distant. In certain cases, a small integer value, such as 2, is suitable for nT.
FIG. 27 illustrates data structures used to collect statistics on the frequency that the predicted symbol {tilde over (x)}i based on a context Ciyn of a conditioning class is distant from the context-embedded symbol zi, for all noisy-image symbol values zi and all conditioning classes. As shown in FIG. 27, each conditioning class, such as conditioning class 2702, is associated with a two-dimensional array, such as two-dimensional array 2704 associated with conditioning class 2702. The columns of the two-dimensional array are indexed by symbol value, with indices ranging over alphabet A, and with the three rows indexed by indices n, t, and nf. Entries in row n indicate the number of times that a predicted symbol {tilde over (x)}i for a context within the conditioning class Qi is sufficiently distant from the corresponding noisy-image symbol embedded in the context, as determined by the function “distant” in the case of M-ary symmetric channel noise, to indicate that the noisy-image symbol is noise corrupted. Functional notation for the value of an element of row n is “n(Qi,a),” where a is a particular symbol value observed for one or more noisy-image symbols zi embedded within a context of the conditioning class Qi, and n(Qi,a) is the number of times that a noisy-image symbol zi with symbol value a is determined to be noise corrupted. Similarly, entries in row t correspond to the total number of times that a particular symbol a is embedded in a context of conditioning class a during context-by-context analysis of a noisy image z, entry values in row t represented by functional notation “t(Qi,a).” Finally, entries in row nf correspond to the number of times that a symbol distant from symbol value a is embedded in a context of conditioning class Qi during context-by-context analysis of a noisy image z, entry values in row nf represented by functional notation “nf(Qi,a).” For the salt-and-pepper noise model, only the aM-1 and a0 columns of the table are needed.
FIGS. 28A-29-C provide control-flow diagrams for a routine “validQs,” which determines whether or not each conditioning class for which statistics are collected from a noisy image z remains valid with respect to discrete-universal-denoising assumptions. In step 2802 of FIG. 28A, the data structures discussed above with reference to FIG. 27 are zeroed, or initialized, for all conditioning classes Q. Then, in the for-loop of steps 2804-2809, the noisy image is traversed, symbol by symbol, in order to collect statistics in the data structures discussed with reference to FIG. 27 for each conditioning class. For the currently considered noisy-image symbol zi, the corresponding conditioning class is determined in step 2805. Then, in step 2806, a symbol {tilde over (x)}i is predicted from context Ciy for noisy-image symbol zi using a symbol-prediction function {tilde over (x)}( ). In step 2807, a function “n-and-t update,” discussed below, is called in order to update the table entry n(Qi, zi) when the predicted symbol {tilde over (x)}i is sufficiently distant from the corresponding noisy-image symbol zi to indicate that the symbol zi is noise corrupted. In step 2808, entry t(Qi,zi) is incremented whether or not predicted symbol {tilde over (x)}i is distant from corresponding noisy-image symbol zi. The for-loop continues while there are more noisy-image signals zi to consider, as determined in step 2809. In step 2810, the routine “compute nfs” is called to compute the entries for the nf rows of the three-row tables (2704 in FIG. 27) maintained for each conditioning class, and then, in step 2811, the function “evaluate Qs” is called.
FIG. 28B provides a control-flow diagram for the routine “n_and_t update,” called in step 2807 of FIG. 28A. In step 2820, the routine “n_and_t update” determines whether or not the noise model is assumed to be the M-ary symmetric channel noise model. When M-ary symmetric channel noise is assumed, then in step 2822, the routine “distant,” described above with reference to FIG. 26, is called to determine whether or not noisy-image symbol zi is sufficiently distant from predicted symbol {tilde over (x)}i to indicate that symbol zi is noise corrupted. When zi appears to be noise corrupted, as determined in step 2824, the table entry n(Qi, zi) is incremented, in step 2826. Otherwise, when M-ary symmetric channel noise is not assumed, as determined in step 2820, then, in step 2828, the routine “n_and_t update” determines whether salt-and-pepper noise is assumed. When salt-and-pepper noise is not assumed, then the routine “handle other noise models” is called, in step 2840, to update the table entry n(Qi, zi) when the predicted symbol {tilde over (x)}i is sufficiently distant from the corresponding noisy-image symbol Zi to indicate that the symbol zi is noise corrupted, according to another noise model. Otherwise, in step 2830, the routine “n_and_t update” determines whether the symbol zi has the symbol value a255. When the symbol zi has the symbol value a255, then, in step 2832, the routine “n_and_t update” determines whether the predicted symbol {tilde over (x)}i is less than or equal to a threshold value t255, indicating that zi is likely a white salt-and-pepper noise value in a dark background. When the predicted symbol {tilde over (x)}i is less than or equal to the threshold value t255, the table entry n(Qi, zi) is incremented, in step 2834. Otherwise, in step 2836, the routine “n_and_t update” determines whether the symbol zi has the symbol value a0. When the symbol zi has the symbol value a0, then, in step 2838, the routine “n_and_t update” determines whether the predicted symbol {tilde over (x)}i is greater than or equal to a threshold value t0, indicating that zi is likely a black salt-and-pepper noise value in a light background. When the predicted symbol {tilde over (x)}i is greater than or equal to the threshold value t0, the table entry n(Qi, zi) is incremented, in step 2834.
FIG. 28C illustrates computation of the entry values nf(Qi,a) for the third row of the three-row tables discussed, above, with reference to FIG. 27. The routine is a triply nested loop, in with, for each symbol a of a conditioning class Qi, the number of occurrences of symbols b distant from symbol a in contexts of the conditioning class Qi are summed, in the inner loop comprising steps 2852 and 2854.
FIG. 29A provides a control-flow diagram for the routine “evaluate Qs,” called in step 2812 of FIG. 28. The routine “evaluate Qs” determines, in step 2902, whether or not the noise model is assumed to be the M-ary symmetric channel noise model. When M-ary symmetric channel noise is assumed, then in step 2903, the routine “evaluate Qs M-ary” is called to determine whether or not the each conditioning class Qi remains statistically valid. Otherwise, when M-ary symmetric channel noise is not assumed, as determined in step 2902, then, in step 2904, the routine “evaluate Qs” determines whether salt-and-pepper noise is assumed. When salt-and-pepper noise is assumed, then, in step 2905, the routine “evaluate Qs” calls the routine “evaluate Qs S&P” to determine whether or not the each conditioning class Qi remains statistically valid. Otherwise, in step 2906, the routine “evaluate Qs” calls the routine “evaluate Qs for other noise models” to determine whether or not the each conditioning class Qi remains statistically valid.
FIG. 29B provides a control-flow diagram for the routine “evaluate Qs S&P,” called in step 2905 of FIG. 29A. This function considers each conditioning class Qi, in an outer for-loop of steps 2908-2916, in order to determine whether or not the conditioning class Qi remains statistically valid, under the discrete-universal-denoiser statistical assumptions. The function OK(Qi) returns a Boolean value indicating whether or not conditioning class Qi remains statistically valid. DUDE and related denoising methods build a statistical model of the observed data conditioned on conditioning classes formed from prefiltered data. The noise is memoryless and can therefore be characterized by the M×M matrix Π, discussed above, where M is the number of different symbols in the alphabet and, for symbols a,b, the matrix element Π(a,b) denotes the probability that the noisy symbol is b given that the clean symbol is a. For salt-and-pepper noise, Π(a,0)=1−δ2 when a=0 and δ/2 otherwise. Similarly, Π(a, M−1)=1−δ/2 when a=M−1 and δ/2 otherwise. Additionally, if a≠0, M−1, Π(a,a)=1−δ, whereas if b≠0, M−1, Π(a,b)=0 whenever b≠a, since 0 and M−1 are the only possible error values for salt-and-pepper noise.
In step 2909, the variable enois is set to the value
This is the ratio of the number of times noisy-image symbol zi is deemed to be a white salt-and-pepper-noise value in a dark background. When this ratio is greater than the sum of δ/2, the expected probability for white noise values to occur according to the salt-and-pepper noise model, and a threshold-offset value t or when this ratio is less than the difference of δ/2 and a threshold-offset value u, as determined in step 2910, then the function OK(Qi) is set to return the Boolean value FALSE, in step 2911, since the observed frequency of white noise is deemed to deviate significantly from that indicated by the noise-model probability for the occurrence of white noise. Otherwise, in step 2912, the variable enois is set to the value
This is the ratio of the number of times noisy-image symbol zi has a black salt-and-pepper-noise value in a light background. When this ratio is greater than the sum of δ/2, the expected probability for black noise values to occur according to the salt-and-pepper noise model, and a threshold-offset value t or when this ratio is less than the difference of δ/2 and a threshold-offset value u, as determined in step 2913, then the function OK(Qi) is set to return the Boolean value FALSE, in step 2914, since the observed frequency of black noise is deemed to deviate significantly from that indicated by the noise-model probability for the occurrence of a black noisy value.
Otherwise, in step 2915, the function OK(Qi) is set to return the Boolean value TRUE.
FIG. 29C provides a control-flow diagram for the routine “evaluate Qs M-ary,” called in step 2903 of FIG. 29A. This function considers each conditioning class Qi, in an outer for-loop of steps 2922-2932, in order to determine whether or not the conditioning class Qi remains statistically valid, under the discrete-universal-denoiser statistical assumptions. For each considered conditioning class Qi, the function OK(Qi) is initialized to return a value TRUE and the local variable num is set to 0, in step 2923. Next, the inner for-loop of steps 2924-2929 considers each symbol a for which t(Qi, a) is greater than 0. In step 2925, the variable enois is set to the value
This is the ratio of the number of times predicted symbol {tilde over (x)}i is sufficiently distant from the corresponding noisy-image symbol zi, when zi is equal to symbol a, divided by the number of times that symbols distant from symbol a are observed as a context-embedded symbol in the noisy image for the conditioning class. This ratio is an estimated probability of noise corruption of symbol a.
In step 2926, a routine Pnoisy(Qi,a) is invoked to compute a probability that noisy-image symbol zi has symbol value a when the predicted symbol {tilde over (x)}i is distant from a due to noise introduced by the noisy channel modeled by the matrix Π. This probability can be computed as the sum of those elements in the column of Π corresponding to symbol a for which the symbol corresponding to the row is distant from symbol a, each term weighted by the frequency of occurrence of the symbols corresponding to the rows. In other words, the probability can be computed as the sum of Π weighted elements Π(x,y) for which y=a and distant (x, a)=TRUE.
In the case of M-ary noise, as for salt-and-pepper noise, for symbols a,b, the matrix element Π(a,b) denotes the probability that the noisy symbol is b given that the clean symbol is a. For M-ary noise, Π(a,a)=1−δ and
for b≠a, with δ the same for all a. Thus, for M-ary noise, the diagonal elements of Π=1−δ and all
In the case of M-ary noise, Pnoisy(Qi,a) is
When enols is greater than a threshold value, Pnoisy(Qi,a)−u, or less than a threshold value, Pnoisy(Qi,a)+t, as determined in step 2927, the variable num is incremented in step 2908. The variable num counts the number of symbols for which the noise-model assumptions are invalid. After evaluating all of the statistics collected for a particular context Qi, when the value of local variable num exceeds a threshold value, as determined in step 2910, the value returned by function OK(Qi) is set to FALSE to indicate that conditioning class Qi should not be used for denoising during the current iteration of iterative denoising.
FIG. 30 provides a control-flow diagram for the function “denoise,” called in step 2211 of FIG. 22 according to embodiments of the present invention. The function “denoise” is illustrated in FIG. 23 for currently implemented iterative denoisers that do not include embodiments of the present invention. Iterative denoisers that do not embody the current invention can be enhanced to embody the methods of the current invention by incorporating the denoise function illustrated in FIG. 30 in place of the denoising function illustrated in FIG. 23. In a first step 3002 of the denoising function that represents one embodiment of the present invention, the function “valid Qs,” discussed above with reference to FIGS. 28 and 29, is called in order to determine which of the conditioning classes remain statistically valid. Then, in the for-loop of steps 3004-3009, the noisy image z is denoised, symbol-by-symbol. When the conditioning class corresponding to the currently considered noisy-image symbol zi, Qi, remains statistically valid, as determined in step 3006, then the denoised symbol {circumflex over (x)}i is computed by the distortion-minimization method carried out in step 3008, previously described above with reference to FIG. 23. However, when the conditioning class Qi is not statistically valid, as determined in step 3006, then the current prefiltered-image symbol value yi corresponding to zi is returned as the denoised-image symbol {circumflex over (x)}i, in step 3007. In other words, during the iterative denoising procedure illustrated in FIGS. 23A-B, the overall iteration, represented as the do-while loop of steps 2306-2313, proceeds until one or more global convergence criteria are met, as determined in step 2312. However, according to embodiments of the present invention, context-specific denoising based on symbol-prediction-error distributions, as shown in step 3008 of FIG. 30, is carried out only for those conditioning classes that remain statistically valid. Otherwise, the prefiltered image symbol yi is used as the denoised symbol for zi. In this method, context-based denoising is restricted to those conditioning classes that are considered statistically valid at any point during the iteration. A conditioning class that is currently considered invalid can later become again valid and resume being used for denoising in later iterations. By restricting context-based denoising only to statistically valid contexts, degradation in image quality, expressed as a computed signal-to-noise ratio, for example, over multiple iterations can be ameliorated, largely prevented, or prevented all together. This, in turn, generally leads to convergence, according to global convergence criteria, fewer iterations, and prevents cases in which iteration is terminated at non-optimal points in the iterative process.
FIG. 31 shows, for illustration purposes, plots of iterative universal denoising processes with and without incorporating method embodiments of the present invention. The plots correspond to the application of denoiser embodiments to an actual noisy image. A first curve 3102 shows the signal-to-noise ratio achieved, over successive iterations, when monitoring of the statistical validity of conditioning classes is not carried out according to embodiments of the present invention. Note the precipitous drop in signal-to-noise ratio between iterations 3 and 4. Curve 3104 illustrates the signal-to-noise ratio for successive iterations of an iterative discrete-universal denoising process that incorporates the context-class statistical-validity monitoring according to the present invention. In this case, the signal-to-noise ratio is non-decreasing with respect to the number of iterations, and the stopping point of the procedure becomes non-critical after a few iterations.
Although the present invention has been described in terms of particular embodiments, it is not intended that the invention be limited to these embodiments. Modifications will be apparent to those skilled in the art. For example, method embodiments of the present invention for monitoring the statistical validity of conditioning classes may be implemented in software, firmware, hardware circuitry, or a combination of software, firmware, and hardware circuitry in general purpose computers and various electronic devices that carry out denoising. The discrete-universal-denoising methods and systems that incorporate embodiments of the present invention involve far too many tedious calculations to be carried out by hand in anything close to a reasonable time period and/or with reasonable accuracy for even the smallest images encountered in real-world denoising. Limitations of the present invention may vary with variation in a variety of different implementation parameters, including programming language choice, choice of data structures, control structures, modular organization, and other implementation parameters. A variety of different techniques may be used to estimate Pnoisy(Qi,a) for symbol values a and context clusters Qi. In general, estimation is based on the matrix Π, which describes the noise-introducing channel model. However, other factors and assumptions can be incorporated into the determination of Pnoisy(Qi,a). A variety of different thresholds may be used in determination of whether or not a particular conditioning class remains statistically valid. These thresholds may be determined empirically, and may be dynamically altered during denoising of a particular noisy image by an iterative discrete-universal denoiser. The method of the present invention can be applied to denoisers that operate on one-dimensional signals, including audio signals, two-dimensional signals, including images, and higher-dimensional signals.
The foregoing description, for purposes of explanation, used specific nomenclature to provide a thorough understanding of the invention. However, it will be apparent to one skilled in the art that the specific details are not required in order to practice the invention. The foregoing descriptions of specific embodiments of the present invention are presented for purpose of illustration and description. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments are shown and described in order to best explain the principles of the invention and its practical applications, to thereby enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalents:
Seroussi, Gadiel, Weinberger, Marcelo, Ordentlich, Erik
Date |
Maintenance Fee Events |
Oct 07 2016 | REM: Maintenance Fee Reminder Mailed. |
Feb 26 2017 | EXP: Patent Expired for Failure to Pay Maintenance Fees. |
Date |
Maintenance Schedule |
Feb 26 2016 | 4 years fee payment window open |
Aug 26 2016 | 6 months grace period start (w surcharge) |
Feb 26 2017 | patent expiry (for year 4) |
Feb 26 2019 | 2 years to revive unintentionally abandoned end. (for year 4) |
Feb 26 2020 | 8 years fee payment window open |
Aug 26 2020 | 6 months grace period start (w surcharge) |
Feb 26 2021 | patent expiry (for year 8) |
Feb 26 2023 | 2 years to revive unintentionally abandoned end. (for year 8) |
Feb 26 2024 | 12 years fee payment window open |
Aug 26 2024 | 6 months grace period start (w surcharge) |
Feb 26 2025 | patent expiry (for year 12) |
Feb 26 2027 | 2 years to revive unintentionally abandoned end. (for year 12) |