System and methods for random parameter filtering

RE048083 ยท 2020-07-07

Assignee

Inventors

Cpc classification

International classification

Abstract

The invention produces a higher quality image from a rendering system based on a relationship between the output of a rendering system and the parameters used to compute them. Specifically, noise is removed in rendering by estimating the functional dependency between sample features and the random inputs to the system. Mutual information is applied to a local neighborhood of samples in each part of the image. This dependency is then used to reduce the importance of certain scene features in a cross-bilateral filter, which preserves scene detail. The results produced by the invention are computed in a few minutes thereby making it reasonably robust for use in production environments.

Claims

1. A method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising.Iaddend., comprising the steps of: rendering one or more image samples .Iadd.or one or more pixels .Iaddend.at a given sampling rate; storing a vector of a plurality of .[.scene.]. features .Iadd.and one or more rendering system inputs .Iaddend.for each image sample .Iadd.or each pixel.Iaddend.; .[.saving one or more random parameters for each image sample used to calculate the image sample by a rendering system;.]. choosing the one or more image samples .Iadd.or the one or more pixels .Iaddend.to process; performing .[.pre-processing.]. .Iadd.processing .Iaddend.on the one or more image samples .Iadd.or the one or more pixels using one or more stored features and filter parameters that are automatically adjusted for each image sample or each pixel to compute filter weights.Iaddend.; .[.calculating a dependency of a color and a feature of the one or more random parameters and one or more rendering system inputs to obtain a calculated dependency; using the calculated dependency to determine a weight for each scene feature to obtain dependency information; modifying the one or more image samples using the dependency information to obtain a final modified sample;.]. filtering the .[.final modified sample to produce one or more pixels.]. .Iadd.one or more image samples or the one or more pixels using the computed filter weights to compute a filtered value.Iaddend.; and outputting a final image.Iadd., wherein the final image includes the computed filtered value of each image sample or each pixel.Iaddend..

2. The method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 1, wherein the choosing step further comprises the step of conducting iterations .[.of.]. .Iadd.using a .Iaddend.block around .[.a pixel of the image sample.]. .Iadd.the one or more pixels .Iaddend.from a large .Iadd.block .Iaddend.size to a small .Iadd.block .Iaddend.size.

3. The method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 1, wherein the choosing step further comprises the step of selecting a random subset of image samples within .[.each.]. .Iadd.a .Iaddend.block .Iadd.around the one or more pixels.Iaddend..

4. The method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 1, wherein the performing step further comprises the step of clustering .Iadd.the one or more .Iaddend.image samples .Iadd.or the one or more pixels .Iaddend.into one or more groups.

5. The method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 4, .[.wherein,.]. wherein the clustering step includes the step of calculating .[.the.]. .Iadd.a .Iaddend.standard deviation of .[.the.]. .Iadd.a .Iaddend.mean for .Iadd.the .Iaddend.one or more pixels .[.of the image sample.]..

6. The method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 1, wherein the performing step further comprises the step of manipulating the vector by removing .[.the.]. .Iadd.a .Iaddend.mean and dividing by .[.the.]. .Iadd.a .Iaddend.standard deviation for each .[.scene.]. feature .[.of the plurality of scene features.]..Iadd., wherein each feature is a scene feature .Iaddend.for each image sample.

7. The method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim .[.1.]. .Iadd.13.Iaddend., wherein .[.the.]. .Iadd.a .Iaddend.dependency is a statistical dependency.

8. The method for performing .[.random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 1, wherein .[.the one or more scene features.]. .Iadd.each feature .Iaddend.is at least one selected from the group .[.comprising.]. .Iadd.consisting .Iaddend.of: world position, surface normal, color, texture value, texture coordinate, and shader value.

9. The method for performing .[.random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 1, wherein the one or more rendering system inputs is at least one selected from the group .[.comprising.]. .Iadd.consisting .Iaddend.of: screen position and random parameter.

10. The method for performing .[.a random parameter filter.]. .Iadd.Monte Carlo denoising .Iaddend.according to claim 1, wherein the filtering step further comprises the steps of: classifying the .[.weight.]. .Iadd.filter weights .Iaddend.above a certain value to mean that .[.the scene.]. .Iadd.a .Iaddend.feature .Iadd.of the plurality .Iaddend.has little or no dependency on .[.the.]. one or more random parameters and the .[.weight.]. .Iadd.filter weights .Iaddend.below a certain value to mean that .[.the scene.]. .Iadd.a .Iaddend.feature .Iadd.of the plurality .Iaddend.has a significant dependency on the one or more random parameters.

.Iadd.11. The method for performing Monte Carlo denoising according to claim 1 further comprising the step of reconstructing the computed filtered value of each image sample or each pixel to obtain the final image..Iaddend.

.Iadd.12. The method for performing Monte Carlo denoising according to claim 1, further comprising the step of saving by a rendering system one or more random parameters for each image sample or each pixel used to calculate the image sample..Iaddend.

.Iadd.13. The method for performing Monte Carlo denoising according to claim 12, further comprising the steps of: calculating a dependency of a color and a feature of the one or more random parameters and the one or more rendering system inputs to obtain a calculated dependency; using the calculated dependency to determine a weight for each feature to obtain dependency information; and modifying the one or more image samples or the one or more pixels using the dependency information to obtain a final modified sample..Iaddend.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) FIG. 1 illustrates a rendering system treated as a black box according to one embodiment of the invention;

(2) FIG. 2 illustrates a table of notations according to one embodiment of the invention;

(3) FIG. 3 illustrates an algorithm related to random parameter filtering according to one embodiment of the invention;

(4) FIG. 4 illustrates an algorithm related to pre-processing samples according to one embodiment of the invention;

(5) FIG. 5 illustrates an algorithm related to computing feature weights according to one embodiment of the invention;

(6) FIG. 6 illustrates an algorithm related to filtering the samples according to one embodiment of the invention;

(7) FIG. 7 illustrates an exemplary computer rendering system that may be used to implement the methods according to the invention.

DETAILED DESCRIPTION OF THE INVENTION

(8) The invention is computer rendering system method for increasing the quality of an image from a scene file. The scene file typically contains information about the objects in the scene such as geometric shape, material properties, etc. The scene file may also include light sources such as shape, size, position, color, intensity, etc. and information about the camera including position, orientation, resolution, etc. The scene file may also include texture maps and shaders that specify how the individual surfaces should be colored. A set of samples are computed from the scene file and intermediate information is saved. The intermediate information includes scene independent data and scene dependent data. Scene independent data is computed by the rendering system and may include, for example, screen position and random parameters, such as the position on the lens (for computing depth-of-field) or the time of the sample (for computing motion blur). Scene dependent data is derived from the scene file using the given scene independent data and includes, for example, scene features and sample color. Scene features include world position, texture coordinates, texture values, normal, and depths to name a few. A relationship between the scene dependent data and the scene independent data is calculated. The relationship may be based on mutual information, statistical dependency, or some other metric. The relationship assists in differentiating artifacts (or noise) of the scene file and the rendering system (Monte Carlo random parameters). The relationship is used with a process to output the image. Processes include filtering methods and adaptive sampling methods.

(9) FIG. 1 illustrates a rendering system treated as a black box according to one embodiment of the invention. According to the invention, determining where Monte Carlo noise occurs in an image begins with identifying the regions in which the sample values are functions of the random parameters. To do this, the rendering system 100 is treated as a black box 104 with scene function ( ) that is evaluated deterministically by the ray tracing system for a specific scene, for example, a scene with depth-of-field. This function takes as its only inputs 102 the screen position x, y 102a on the image as well as the random parameters u, v 102b for Monte Carlo integrationi.e., the position on the lens. Since these are the only inputs 102 to the deterministic system, the outputs 106 of the black box 104 must all be functions of these inputs (or constant with respect to them). These outputs 106 are a set of features for each sample, such as world position 106a, surface normal 106b, texture value 106c or the output of the texture lookup, and sample color 106d or the final shaded value. The invention estimates the functional relationship by taking a set of samples in a neighborhood custom character and treating the input values 102 and output values 106 of this neighborhood as statistical random variables. The statistical dependence of the outputs 106 are then determined based on the inputs 102 using mutual information as shown by 108. This allows a determination as to which scene features are highly dependent on random parameters so that their weight can be adjusted such as lowered during bilateral filtering.

(10) Taking a scene with depth-of-field, the input parameters are changed while keeping the scene function ( ) the same. Setting the random parameters u, v to random values for each sample produces a noisy image. However, if uniform parameters for the random parameters u, v are used, the noise is replaced with banding artifacts. It should be noted that only the regions where the sample color is a function of the random parameters are affected by changing the parameters u, v so the regions that are in focus in a depth-of-field scene are mostly unchanged. Thus, the Monte Carlo noise to be eliminated is directly caused by the random parameters whenever the sample values are a function of them.

(11) FIG. 2 illustrates a table of notations used in describing the invention. The invention can be described in four parts: (1) the overall method according to an algorithm of one embodiment of the invention, (2) the pre-processing of the samples by clustering them and removing their mean and standard deviation; (3) the statistical computation of the feature weights for the cross-bilateral filter using the statistical dependency of features on the random variables, and (4) filtering the samples.

(12) FIG. 3 illustrates the overall method according to an algorithm related to random parameter filtering according to one embodiment of the invention. Samples are rendered and feature vectors are created. The invention can be considered a post-process filter, so the first step is to render the samples at the given sampling rate of s samples/pixel and then the filtering process is applied, which consecutively performs the filter in several iterations. First, samples are rendered at a fixed sampling density and a vector x is stored for each sample. The data structure is simply a floating point array with enough space for the number of samples (computed as the image resolution times the number of samples/pixel s) and enough space for each such as 27 floats per sample to store all the information. For the scene features in f, the invention stores for each sample the normal, world-space position, and texture values (the set of floats from texture lookups used by the surface shader to produce the surface color) for the first intersection point of the ray, and the world position and normal for the second intersection in a path tracer. The same features are stored for every scene. If an object does not have the specific feature, a zero is substituted or if the shader does not use the feature when computing the final color, features that do not affect the final color are ignored. Since all these features are available to the rendering system at some point during the tracing of the ray, outputting the feature vector for the sample is simply a matter of caching the information after it is calculated, which is standard practice in rendering systems when creating a G-buffer for deferred shading.

(13) In addition to these scene-dependent features, the invention stores the random parameters used by the Monte Carlo system so that it can identify the functional relationships between the inputs and the outputs. Wherever possible, these random parameters are used in the form that most closely reflects their use in the renderer. For example, the random u, v position on the lens for depth-of-field can be computed in several ways: two uniformly distributed random numbers can be used from 0 to 1 that are then scaled and translated into a 1 to 1 range on a square lens, or the random numbers can be used to pick and r values that uniformly sample a circular lens without rejection, etc. Rather than deal with the raw random parameters that have no physical meaning, the final random values are used as they are used by the rendering system. In the case of the position on the lens, the final u, v values ranging from 1 to 1 are used as the random parameters because these relate to the physical process simulated by the rendering system. In most cases the random parameters are floating point values, but they could also be integers, such as when a discrete random number is used to select an individual light source for lighting with multiple light sources.

(14) Note that in industrial rendering systems these random parameters are often determined with pre-computed sequences of low discrepancy numbers provided to the renderer. In this case, the random parameters do not need to be stored in the sample vector since the post-process filter could use this same sequence to recompute the random parameters on the fly. According to one embodiment, however, a brute-force approach may be used with the PBRT2 and LuxRender Monte Carlo rendering systems to compute the samples. Furthermore, Monte Carlo-based approaches such as photon mapping and bi-directional path tracing may be implemented in accordance with the invention.

(15) As shown by FIG. 3, To estimate the functional dependencies of sample values on the inputs to the Monte Carlo rendering system using mutual information, a set of samples to process are selected. Every sample in the image cannot be used because the functional dependencies change from region to region. For example, an image may have some regions in focus and others out of focus, and these have different dependencies on the random parameters. Therefore, as every pixel is looped over in the image, a local neighborhood of samples custom character is selected around that pixel to measure the local statistics for mutual information. However, how big to make the block size needs to be decided in order to define the extent of neighborhood custom character. If a large block size is used, there will be more samples to calculate statistics thereby improving the accuracy of the dependency estimates and providing more samples to filter out noise. Unfortunately, larger block sizes have fewer localities and might cause problems when the block overlaps regions with different functional dependencies, such as regions where the amount of defocus blur changes. To resolve these two competing considerations, a multi-pass approach is used where the invention loops over the image several times using different block sizes.

(16) Starting at a larger block size and shrinking the block size down in a series of iterations, four iterations are found to be sufficient, for example, starting at a block size of 55 pixels wide and going down to 35, 17 and finally 7 pixels wide. At each step, the samples' colors are filtered with the weighted bilateral filter using the samples in custom character, and the new filtered color in the next pass of the algorithm is usedexcept to compute statistical dependencies, since they are always computed with the original sample color. By going from larger to smaller block size, the low frequency noise is addressed that a smaller filter kernel would leave behind and then, as the block size is reduced, the localized noise is eliminated and the detail cleaned up. The multi-pass approach also reduces the maximum block size needed for filtering, since a larger filter can be emulated by progressively applying a smaller kernel. This allows the achievement of good performance and quality at the same time.

(17) After the samples are rendered, the random parameter filtering algorithm is ready to be applied, which is performed independently for every pixel of the image. As each pixel is looped over, the samples are pre-processed in the block around the pixel to create a neighborhood custom character of samples to use to compute statistics and perform filtering as shown by FIG. 4.

(18) As shown in FIG. 4, the bilateral filter is applied to the samples in the block of pixels. However, for large block sizes, the process of calculating the contribution of all samples to any given sample is time consuming because the number of samples increases as O(N.sup.2) with block size. To accelerate this process, a random subset of samples within the block is selected and only these samples are used for statistical analysis and to filter the samples within the pixel. This is a form of Monte Carlo estimation and significantly accelerates the calculations. Although it may introduce a slight error, the error is small and found to be reasonable considering the improvement in running time for the algorithm. The bilateral filter according to the invention weights samples based on screen position, distance with a Gaussian of variance .sub.p.sup.2 that depends on the block size (.sub.p=b/4). Since a set of random samples are selected, they can be drawn with a Gaussian distribution with variance .sub.p.sup.2 around the pixel in question in order to essentially perform importance sampling. This allows the first term to be removed from the bilateral filter calculation as discussed more fully below.

(19) Some kind of clustering needs to be performed when placing samples in neighborhood custom character to avoid mixing statistics. The set of samples custom character at the current pixel custom charactercustom character are always included in neighborhood custom character. Then, a random set of samples is selected with a Gaussian distribution from the block of pixels as described above and added to the neighborhood custom character only if all of their scene features f are within three standard deviations of the mean for the pixel. So given sample j that is within the block of pixels:
custom charactercustom characterj if |f.sub.j,kmcustom character.sub.,k.sup.f|<3custom character.sub.,k.sup.f for all k.

(20) In one embodiment, a value of 30 instead of 3 is used when testing the world position since it varies much more than the other features. Also, this test is only done when custom character.sub.,k.sup.f>0.1 because it is not desirable to throw all the samples away in cases where the variance is very small, such as constant-valued regions.

(21) Before the statistical dependencies for a set of samples in a neighborhood is computed, the scene features are normalized by removing the mean and dividing by the standard deviation for each of the elements in the sample vector. The reason for this is that the features in f reside in very different coordinate systems. For example, world positions could be in the range of 0 to 1000, while the normal vector could have components in the range of 0 to 1. If this discrepancy is not corrected, a larger weight could inadvertently be given to certain features when calculating dependency that may not necessarily be more important. Vectors that have been normalized in this manner are represented with a bar, for example, f becomes f.

(22) The core of the algorithm according to the invention is the computation of the color weights and feature weights as shown in FIG. 5. Mutual information is used to compute the statistical dependencies between a sample feature and the inputs to the Monte Carlo system.

(23) Since it is difficult to derive an exact functional relationship between scene features and the inputs of the rendering system p.sub.i and r.sub.i for complex scenes, a statistical dependency is proposed based on the inputs providing information about the scene features. The invention uses mutual information, which is the exact measure of dependence between two random variables and indicates how much information one tells about another. In one embodiment, the mutual information between two random variables X and Y can be calculated as:

(24) ( X ; Y ) = .Math. x X .Math. y Y p ( x , y ) log p ( x , y ) p ( x ) p ( y ) ( Eq . 1 )
where these probabilities are computed over the neighborhood of samples custom character around a given pixel. To calculate the mutual information between two vectors x and y, specifically, fcustom character.sub.,k and rcustom character.sub.,l, respectively, the histogram for each is calculated. To compute the histograms, all values are made positive by subtracting the minimum element in the vector and quantizing the elements into integer bins by rounding their values. How many times the values of x fall inside each bin are counted and the probabilities are found by dividing by the length of x. A joint histogram is calculated in a similar way, except with pairs of values (x, y).

(25) To estimate statistical dependencies on inputs, the dependency of the k.sup.th scene feature on all random parameters (given by D.sub.f,k.sup.r) is calculated using mutual information. The heuristic approximates this by measuring the dependency on individual random parameters and adding them up. Therefore, the statistical dependency is first calculated between the k.sup.th scene feature and the l.sup.th random parameter by D.sub.f,k.sup.r,l=(fcustom character.sub.,k; rcustom character.sub.,l), and then the dependency of the k.sup.th scene feature on all n random parameters is approximated as:

(26) D f , k r = .Math. 1 l n D f , k r , l = .Math. 1 l n ( f _ N , k ; r _ N , l ) ( Eq . 2 )

(27) The dependency of the k.sup.th scene feature on screen position (D.sub.f,k.sup.p) and color dependencies D.sub.c,k.sup.r and D.sub.c,k.sup.p are similarly computed:

(28) D f , k p = .Math. 1 l 2 D f , k p , l = .Math. 1 l 2 ( f _ N , k ; p _ N , l ) , ( Eq . 3 ) D c , k r = .Math. 1 l n D c , k r , l = .Math. 1 l n ( c _ N , k ; r _ N , l ) , ( Eq . 4 ) D c , k p = .Math. 1 l 2 D c , k p , l = .Math. 1 l 2 ( c _ N , k ; p _ N , l ) . ( Eq . 5 )

(29) The dependency of the k.sup.th color channel on all the scene features is computed so that later the weight for features that do not contribute to the final color can be reduced:

(30) D c , k f = .Math. 1 l m D c , k f , l = .Math. 1 l 2 ( c _ N , k ; f _ N , l ) . ( Eq . 6 )

(31) In addition, a related term is computed pertaining to how all color channels are dependent on the k.sup.th scene features:

(32) D c f , k = .Math. 1 l 3 D c , l f , k = .Math. 1 l 3 ( c _ N , l ; f _ N , k ) . ( Eq . 7 )

(33) Finally, the terms D.sub.c,k.sup.r, D.sub.c,k.sup.p, D.sub.c.sup.f are calculated by summing over the color channels:

(34) D c r = .Math. 1 k 3 D c , k r , D c p = .Math. 1 k 3 D c , k p , D c f = .Math. 1 k 3 D c , k f . ( Eq . 8 )

(35) As shown in FIG. 5, the error of the approximation is determined. Ideally, the statistical dependency of the k.sup.th scene feature on all random parameters is calculated using the joint mutual information (rcustom character.sub.,1, rcustom character.sub.,2, . . . , rcustom character.sub.,n;fcustom character.sub.,k). Unfortunately, this joint mutual information can be difficult and expensive to compute as the number n gets larger, because the histogram grows to the power of n while the number of samples to do statistics grows linearly. This means that the ability to compute the histogram accurately degenerates quickly and it becomes much slower to do so. For this reason, the approximation is performed by measuring the dependency on individual random parameters and adding them up as described above.

(36) Now the effect this has in the overall calculation of statistical dependency is examined. To keep things simple, it is assumed that two statistically independent random variables R.sub.1 and R.sub.2 are inputs to the system and produce the output feature Y. In order to measure (R.sub.1, R.sub.2; Y), it is approximated as (R.sub.1;Y)+(R.sub.2;Y). The following derivative shows that the statistical dependence is underestimated:
(R.sub.1,R.sub.2;Y)=H(R.sub.1,R.sub.2)H(R.sub.1,R.sub.2|Y)
=H(R.sub.1)+H(R.sub.2|R.sub.1)H(R.sub.1|Y)H(R.sub.2|R.sub.1,Y)
=(R.sub.1;Y)+H(R.sub.2|R.sub.1)H(R.sub.2|R.sub.1,Y)

(37) If R.sub.1 are R.sub.2 are independent, then H(R.sub.2|R.sub.1)=H(R.sub.2) such that:
(R.sub.1,R.sub.2;Y)=(R.sub.1;Y)+H(R.sub.2)H(R.sub.2|R.sub.1,Y)
=(R.sub.1;Y)+(R.sub.2;R.sub.1,Y)
=(R.sub.1;Y)+(Y,R.sub.1;R.sub.2)
=(R.sub.1;Y)+(R.sub.2;Y)+(R.sub.1;R.sub.2|Y)

(38) Thus, the approximation that (R.sub.1, R.sub.2; Y)(R.sub.1; Y)+(R.sub.2; Y) effectively assumes that (R.sub.1; R.sub.2|Y)=0. This means that the information is ignored that the output feature tells about relationship between the inputs, which might not be zero even though the inputs are statistically independent. To understand why, the function ( ) is set to act as an XOR gate of two inputs. If one of the inputs and the output is known, the other input can automatically be determined even though the two inputs may be statistically independent. Since (R.sub.1; R.sub.2|Y)0, the approximation is an underestimate of the true joint mutual information between the random parameters and the scene feature. However, the approximation works quite reasonably, even for intricate scenes with complex relationships between the random parameters and the scene features.

(39) Since the sample features are only functions of the random parameters r.sub.i and the screen position p.sub.i, the heuristic computes the fractional contribution of the random parameters to the k.sup.th scene feature with the following formula:

(40) W f , k r = D f , k r D f , k r + D f , k p + .Math. ( Eq . 9 )

(41) The addition of the term term prevents degeneration when the dependencies D.sub.f,k.sup.r and D.sub.f,k.sup.p are both small. This expression communicates how much the k.sup.th feature was affected by the random parameters as a fraction of the contributions from both sets of inputs, with the reasonable assumption that the position and random parameters are statistically independent. When the sample is only a function of the random parameters, this value will be close to 1, and when it is dependent only on the screen position it will be 0. In the common case where there is some contribution from both inputs, for example, a partially out-of-focus object is dependent on both screen position and u, v, the invention simply interpolates between the two.

(42) The invention also includes a similar algorithm using the dependencies of the k.sup.th sample color channel on the random parameters D.sub.c,k.sup.r and on the screen position D.sub.c,k.sup.p to compute the fractional contribution of the random parameters on the k.sup.th color channel:

(43) W c , k r = D c , k r D c , k r + D c , k p + .Math. ( Eq . 10 )

(44) The overall contribution of the random parameters on the color W.sub.c.sup.r for use in sizing the filter is obtained by averaging the W.sub.c,1.sup.r, W.sub.c,2.sup.r, W.sub.c,3.sup.r terms:

(45) W c r = 1 3 ( W c , 1 r + W c , 2 r + W c , 3 r ) . ( Eq . 11 )

(46) Lastly, the W.sub.c.sup.f,k term is computed to communicate how much the color depends on a specific feature:

(47) 0 W c f , k = D c f , k D c r + D c p + D c f ( Eq . 12 )

(48) As shown in FIG. 5, the computation of the fractional contributions is determined. Specifically, once the statistical dependencies have been calculated, the normalized dependencies are computed to determine the and parameters. The and parameters are adjusted in each iteration as the block size decreases by giving more weight to the dependency on the random parameters. The idea behind this is that when the block sizes are large, there will be an increase in dependency on the spatial screen position because of the natural spatial variations in the image. However, the statistics are more corrupt because of the mixing of statistics that happens with large block sizes. Therefore, more weight is given to the normalized dependency on the random parameters as the block size goes down with each iteration. This adjustment is expressed as:
.sub.k=max(12(1+0.1t)W.sub.c,k.sup.r,0)(Eq. 13)
.sub.k=W.sub.c.sup.f,k.Math.max(1(1+0.1t)W.sub.f,k.sup.r,0)(Eq. 14)
where the t term is the iteration of the multi-pass approach, with the first pass t=0. The incorporation of the t term increases the weight of W.sub.c,k.sup.r and W.sub.f,k.sup.r upon each successive iteration, and the max( ) term is added to ensure that the value stays positive.

(49) As shown in FIG. 6, the color samples are filtered. The invention filters the color of samples x.sub.i using a weighted bilateral filter in which the importance of the color and scene features is adjusted to reflect their dependence on the random parameters:

(50) w ij = exp [ - 1 2 p 2 .Math. 1 k 2 ( p _ i , k - p _ j , k ) 2 ] exp [ - 1 2 c 2 .Math. 1 k 3 k ( c _ i , k - c _ j , k ) 2 ] exp [ - 1 2 f 2 .Math. 1 k m k ( f _ i , k - f _ j , k ) 2 ] , ( Eq . 15 )
where w.sub.i,j is the contributionor weightof the j.sup.th sample to the i.sup.th sample during filtering. Because of the way the samples are selected in neighborhood custom character randomly using a Gaussian distribution with standard deviation .sub.p (where .sub.p=b/4), the first term of this expression is dropped and becomes:

(51) w ij = exp [ - 1 2 c 2 .Math. 1 k 3 k ( c _ i , k - c _ j , k ) 2 ] exp [ - 1 2 f 2 .Math. 1 k m k ( f _ i , k - f _ j , k ) 2 ] . ( Eq . 16 )

(52) The variances of the Gaussians for both the color and the feature are set to the same value:

(53) c 2 = f 2 = 2 ( 1 - W c r ) 2 ( Eq . 17 )

(54) The variances are divided by (1W.sub.c.sup.r).sup.2 because, in the end, only the sample color is of importance and a large filter is desired wherever the color depends a lot on the random parameters, i.e., is very noisy. This term adjusts the size of the Gaussian based on the overall noise level, making it large when needed. The terms .sub.c.sup.2 and .sub.f.sup.2 are separated since they depend on all three color channels (because of the W.sub.c.sup.r term) as opposed to .sub.k (whose W.sub.c,k.sup.r term varies per color channel). Therefore, the terms .sub.c.sup.2 and .sub.f.sup.2 modulate the overall size of the Gaussian while .sub.k and .sub.k adjust it further based on dependencies with the random parameters.

(55) Because the constant .sub.s.sup.2 is divided by the number of samples when computing the filter's variance .sup.2, the invention is a biased but consistent estimator, meaning that the estimator converges to the value of the integral as the number of samples per pixel s goes to infinity. As s.fwdarw., a weight of w.sub.i,j=1 is produced only when i=j and zero is everywhere else. Therefore, the colors of the samples are not filtered at all, so the invention converges to standard Monte Carlo, which is a consistent estimator.

(56) Once the filter weights w.sub.i,j are obtained, these weights are used to blend in the color contributions from these samples:

(57) c i , k = .Math. j N w ij c j , k .Math. j N w ij ( Eq . 18 )
where the denominator is never zero because at least w.sub.i,i=1 (a sample fully contributes to itself). Note that this process filters the colors of individual samples (not pixels), and is performed separately for every pixel in the image, since statistics change from pixel to pixel. After all samples in the image have been filtered, the process is repeated with a new iteration as shown in FIG. 3.

(58) The invention can be applied to a variety of scenarios such as using only direct lighting to highlight the illumination contribution from path tracing. Many regions of the image may be completely dark when using only direct lighting because these regions are totally occluded from the sky light source. This means that the illumination in these regions that is visible is due exclusively to path-tracing. The invention is able to denoise these regions by examining the relationship between the sample values and the random parameters used to compute the bounces of each path.

(59) Path-tracing is notoriously noisy, and when Monte Carlo samples are input to the algorithm, much of the detail in the textures in the scene is completely gone. This is more evident if the color channel is multiplied by 1000. Many of the pixels remain black, which indicates that these pixels have no useful color information. The cross-bilateral filter examines other sample features, such as world position, surface normal, and texture value, each weighted depending on their amount of functional dependency on the random parameters. In embodiments where the samples' colors are extremely noisy because the path tracing produces a lot of noise while computing the global illumination, the invention detects the connection between the sample color and the random parameters of the path tracer, and essentially ignores the color when bilateral filtering. The texture value, on the other hand, is found to have little dependence on the random parameters so it is weighted heavily by the cross-bilateral filter.

(60) Therefore, to filter a sample its color is ignored while close attention is paid to its texture value. When blending in values from around the filter kernel, only samples with similar texture values are blended together. Therefore, if a sample hits a dark part of the texture, samples from other parts of the texture are blended in that are also dark. Essentially, the filter according to the invention combines many noisy samples of dark texture together to approximate a noise-free dark texture. Of course, some blurring of the texture detail occurs when a large filter kernel is used to help denoise a very noisy image. Ideally, a small filter is desired to help preserve detail. The invention is reasonably robust and of great importance in production environments.

(61) Although color is treated as a special feature since the color channel is filtered, it is contemplated that only incident illumination may be filtered and used in a surface shader to get an improved result.

(62) FIG. 7 illustrates an exemplary computer rendering system 700 that may be used to implement the methods according to the invention. One or more computer systems 700 may carry out the methods presented herein as computer code.

(63) Computer system 700 includes an input/output display interface 702 connected to communication infrastructure 704such as a bus, which forwards data such as graphics, text, and information, from the communication infrastructure 704 or from a frame buffer (not shown) to other components of the computer system 700. The input/output display interface 702 may be, for example, a keyboard, touch screen, joystick, trackball, mouse, monitor, speaker, printer, any other computer peripheral device, or any combination thereof, capable of entering and/or viewing data.

(64) Computer system 700 includes one or more processors 706, which may be a special purpose or a general-purpose digital signal processor that processes certain information. Computer system 700 also includes a main memory 708, for example random access memory, read-only memory, mass storage device, or any combination thereof. Computer system 700 may also include a secondary memory 710 such as a hard disk unit 712, a removable storage unit 714, or any combination thereof. Computer system 700 may also include a communication interface 716, for example, a modem, a network interface (such as an Ethernet card or Ethernet cable), a communication port, a PCMCIA slot and card, wired or wireless systems (such as Wi-Fi, Bluetooth, Infrared), local area networks, wide area networks, intranets, etc.

(65) It is contemplated that the main memory 708, secondary memory 710, communication interface 716, or a combination thereof, function as a computer usable storage medium, otherwise referred to as a computer readable storage medium, to store and/or access computer software including computer instructions. For example, computer programs or other instructions may be loaded into the computer system 700 such as through a removable storage device, for example, a floppy disk, ZIP disks, magnetic tape, portable flash drive, optical disk such as a CD or DVD or Blu-ray, Micro-Electro-Mechanical Systems, nanotechnological apparatus. Specifically, computer software including computer instructions may be transferred from the removable storage unit 714 or hard disc unit 712 to the secondary memory 710 or through the communication infrastructure 704 to the main memory 708 of the computer system 700.

(66) Communication interface 716 allows software, instructions and data to be transferred between the computer system 700 and external devices or external networks. Software, instructions, and/or data transferred by the communication interface 716 are typically in the form of signals that may be electronic, electromagnetic, optical or other signals capable of being sent and received by the communication interface 716. Signals may be sent and received using wire or cable, fiber optics, a phone line, a cellular phone link, a Radio Frequency link, wireless link, or other communication channels.

(67) Computer programs, when executed, enable the computer system 700, particularly the processor 706, to implement the methods of the invention according to computer software including instructions.

(68) The computer system 700 described herein may perform any one of, or any combination of, the steps of any of the methods presented herein. It is also contemplated that the methods according to the invention may be performed automatically, or may be invoked by some form of manual intervention.

(69) The computer system 700 of FIG. 7 is provided only for purposes of illustration, such that the invention is not limited to this specific embodiment. It is appreciated that a person skilled in the relevant art knows how to program and implement the invention using any computer system.

(70) The computer system 700 may be a handheld device and include any small-sized computer device including, for example, a personal digital assistant, smart hand-held computing device, cellular telephone, or a laptop or netbook computer, hand held console or MP3 player, tablet, or similar hand held computer device, such as an iPad, iPad Touch or iPhone.

(71) While the invention has been described with reference to particular embodiments, those skilled in the art will recognize that many changes may be made thereto without departing from the scope of the invention. Each of these embodiments and variants thereof is contemplated as falling with the scope of the claimed invention, as set forth in the following claims.