U.S. patent application number 13/031160 was filed with the patent office on 2012-08-23 for system, method, and computer program product for reducing noise in an image using depth-based sweeping over image samples.
This patent application is currently assigned to NVIDIA CORPORATION. Invention is credited to Timo Aila, Jonathan Michael Cohen, Eric B. Enderton, Samuli Laine, David Patrick Luebke, Morgan McGuire, Peter Schuyler Shirley.
Application Number | 20120213450 13/031160 |
Document ID | / |
Family ID | 45475544 |
Filed Date | 2012-08-23 |
United States Patent
Application |
20120213450 |
Kind Code |
A1 |
Shirley; Peter Schuyler ; et
al. |
August 23, 2012 |
SYSTEM, METHOD, AND COMPUTER PROGRAM PRODUCT FOR REDUCING NOISE IN
AN IMAGE USING DEPTH-BASED SWEEPING OVER IMAGE SAMPLES
Abstract
A system, method, and computer program product are provided for
reducing noise in an image using depth-based on sweeping over image
samples. In use, each noisy pixel of an image having noise is
identified. Additionally, for each noisy pixel, at least one sample
included in each of a plurality of neighboring pixels to the noisy
pixel is identified. Furthermore, the samples are swept over at
least partially in a depth-based order to identify a value for the
noisy pixel that reduces the noise.
Inventors: |
Shirley; Peter Schuyler;
(Salt Lake City, UT) ; Aila; Timo; (Helsinki,
FI) ; Cohen; Jonathan Michael; (Ann Arbor, MI)
; Enderton; Eric B.; (Berkeley, CA) ; Laine;
Samuli; (Vantaa, FI) ; McGuire; Morgan;
(Williamstown, MA) ; Luebke; David Patrick;
(Charlottesville, VA) |
Assignee: |
NVIDIA CORPORATION
Santa Clara
CA
|
Family ID: |
45475544 |
Appl. No.: |
13/031160 |
Filed: |
February 18, 2011 |
Current U.S.
Class: |
382/260 ;
382/275 |
Current CPC
Class: |
G06T 2207/10028
20130101; G06T 2207/20012 20130101; G06T 5/20 20130101; G06T 5/002
20130101 |
Class at
Publication: |
382/260 ;
382/275 |
International
Class: |
G06K 9/40 20060101
G06K009/40 |
Claims
1. A computer program product embodied on a non-transitory computer
readable medium, comprising: computer code for identifying each
noisy pixel of an image having noise; computer code for
identifying, for each noisy pixel, at least one sample included in
each of a plurality of neighboring pixels to the noisy pixel; and
computer code for sweeping over the samples at least partially in a
depth-based order to identify a value for the noisy pixel that
reduces the noise.
2. The computer program product of claim 1, wherein the noise
includes at least one undesirable artifact, such that the noisy
pixel has at least a portion of the at least one undesirable
artifact of the image.
3. The computer program product of claim 1, wherein the noise
results from depth of field blur included in the image.
4. The computer program product of claim 1, wherein the noise
results from motion blur included in the image.
5. The computer program product of claim 1, wherein the noise
results from the image having at least one transparent object.
6. The computer program product of claim 1, wherein the neighboring
pixels include pixels within a predetermined proximity to the noisy
pixel.
7. The computer program product of claim 1, wherein the computer
program product is operable such that the at least one sample is
identified utilizing a predetermined sampling algorithm.
8. The computer program product of claim 1, wherein the at least
one sample includes a point within the neighboring pixel.
9. The computer program product of claim 1, wherein the depth-based
order includes a front-to-back order.
10. The computer program product of claim 1, wherein the computer
program product is operable such that sweeping over the samples
comprises: determining a filter weight associated with a desired
level of blur; determining an area surrounding the noisy pixel,
using the filter weight; and determining which of the samples are
included in the area; and averaging the samples included in the
area to identify the value for the noisy pixel.
11. The computer program product of claim 10, wherein the computer
program product is operable such that the filter weight associated
with the desired level of blur is determined by: identifying filter
weight of a first one of the samples in the depth-based order; for
each subsequent sample in the depth-based order, adjusting the
filter weight based on a filter weight of each subsequent sample;
and identifying the adjusted filter weight as the filter weight
associated with the desired level of blur.
12. The computer program product of claim 10, wherein the filter
weight indicates an area surrounding the noisy pixel.
13. The computer program product of claim 13, wherein the area
includes one of a circular area and a rectangular area.
14. The computer program product of claim 13, wherein the filter
weight is a value of a radius from the noisy pixel.
15. The computer program product of claim 11, wherein the filter
weight of each of the samples is a direct function of a level of
blur of the sample.
16. The computer program product of claim 11, wherein the computer
program product is operable such that if the desired level of blur
is greater than zero, then the filter weight is larger than a
default filter weight used to identify a value of a pixel without
noise.
17. The computer program product of claim 1, wherein the computer
program product is operable such that sweeping over the samples
includes binning the samples and sweeping over the bins in the
depth-based order.
18. The computer program product of claim 1, further comprising
reconstructing the noisy pixel using the identified value.
19. The computer program product of claim 1, wherein the noise is a
result of a blurry region included in the image, and the identified
value for the noisy pixel provides additional blur to the blurry
region.
20. A method, comprising: identifying each noisy pixel of an image
having noise; identifying, for each noisy pixel, at least one
sample included in each of a plurality of neighboring pixels to the
noisy pixel; and sweeping over the samples at least partially in a
depth-based order to identify a value for the noisy pixel that
reduces the noise.
21. An apparatus, comprising: a processor for: identifying each
noisy pixel of an image having noise; identifying, for each noisy
pixel, at least one sample included in each of a plurality of
neighboring pixels to the noisy pixel; and sweeping over the
samples at least partially in a depth-based order to identify a
value for the noisy pixel that reduces the noise.
22. The apparatus of claim 21, wherein the processor remains in
communication with memory and a display via a bus.
Description
FIELD OF THE INVENTION
[0001] The present invention relates to graphics processing, and
more particularly to reducing noise in graphical images.
BACKGROUND
[0002] Hardware rasterization pipelines have been highly successful
at rendering complex scenes. However, they generally have
difficulty reproducing some physical camera effects, such as
defocus blur, motion blur, etc. Unfortunately, current
implementations of graphics renderers produce unbiased but noisy
images of scenes that include the advanced camera effects of motion
and defocus blur and possibly other effects such as transparency.
Similarly, ray tracing programs and cameras also oftentimes
generate noisy images having motion/defocus blur, transparency,
etc.
[0003] Just by way of example, recent progress has been made in
using stochastic techniques for interactive rendering, including
producing the aforementioned camera effects by randomly varying
center of projection and/or time per sample, as in typical offline
rendering systems. Unfortunately, at interactive frame rates, the
number of random samples available in the foreseeable future is not
sufficient to produce visually smooth images using simple unbiased
sample averaging. There is thus a need for addressing these and/or
other issues associated with the prior art.
SUMMARY
[0004] A system, method, and computer program product are provided
for reducing noise in an image using depth-based on sweeping over
image samples. In use, each noisy pixel of an image having noise is
identified. Additionally, for each noisy pixel, at least one sample
included in each of a plurality of neighboring pixels to the noisy
pixel is identified. Furthermore, the samples are swept over at
least partially in a depth-based order to identify a value for the
noisy pixel that reduces the noise.
BRIEF DESCRIPTION OF THE DRAWINGS
[0005] FIG. 1 illustrates a method for reducing noise in an image
using depth-based on sweeping over image samples, in accordance
with one embodiment.
[0006] FIG. 2 illustrates a method for reducing noise in a noisy
pixel using a depth-based ordering of samples identified with
respect to the noisy pixel, in accordance with another
embodiment.
[0007] FIG. 3 illustrates a method for sweeping over samples
identified with respect to the noisy pixel in a depth-based order,
in accordance with yet another embodiment.
[0008] FIG. 4 illustrates an exemplary system in which the various
architecture and/or functionality of the various previous
embodiments may be implemented.
DETAILED DESCRIPTION
[0009] FIG. 1 illustrates a method 100 for reducing noise in an
image using depth-based on sweeping over image samples, in
accordance with one embodiment. As shown in operation 102, each
noisy pixel of an image having noise is identified. With respect to
the present description, the image may include any graphically
rendered image or photographically-captured image (e.g. via a
digital camera) having the noise. For example, such noise may
include one or more undesirable artifacts, as described in more
detail below.
[0010] To this end, the noisy pixel may be a pixel of the image
having (e.g. displaying) at least a portion of the undesirable
artifact(s) of the image. In one embodiment, the noise may result
from the image having at least one transparent object (i.e. where
the pixel is used to display at least a portion of the transparent
object). In yet another embodiment, the noise may result from blur
included in the image (e.g. a blurry region included in the image).
Such blur may include motion blur or depth of field blur.
[0011] With respect to depth of field blur, the noise may result
from the image having a blurred object that is in front of a sharp
(i.e. in-focus) object (i.e. where the pixel is used to display at
least a portion of the blurred object in front of the sharp
object). For example, such noise may include portions of the sharp
object showing in the blurred object. Specifically, this artifact
may occur where almost all the samples are likely to be from the
front blurry object, but due to random variation, there is one or
more samples from the sharp object contributing to the resulting
image (e.g. where the variations are visually obvious). Namely, the
aforementioned noise may result from sharp features being
under-sampled.
[0012] As another option, the noise may result from the image
having a sharp object in front of a blurred object (i.e. where the
pixel is used to display at least a portion of the sharp object in
front of the blurred object). For example, such noise may include
portions of the blurred object showing in the sharp object (e.g. as
if the blurred object has "leaked" on top of the sharp object).
This may occur when samples of the blurred background object in
neighboring pixels are allowed to influence the value of the noisy
pixel.
[0013] Additionally, for each noisy pixel, at least one sample
included in each of a plurality of neighboring pixels to the noisy
pixel is identified. Note operation 104. The neighboring pixels may
include pixels within a predetermined proximity to the noisy pixel,
in one embodiment. In another embodiment, the neighboring pixels
may include pixels that are within a noisy region of the image
(i.e. a region having noise) in which the noisy pixel is
located.
[0014] Moreover, the samples of such neighboring pixels may each
include a point or region within an associated neighboring pixel.
Thus, each sample may include information associated with the point
or region of the neighboring pixel. For example, the information
may include a color value (red, green, and blue color values) and a
depth (z) value.
[0015] It should be noted that the samples may be identified
utilizing any desired predetermined sampling algorithm. In one
embodiment, the sampling algorithm used to identify the samples may
include the stochastic sampling algorithm described in U.S. patent
application Ser. No. 12/708,443, filed Feb. 18, 2010, entitled
"System, Method, And Computer Program Product For Rendering Pixels
With At Least One Semi-Transparent Surface," by Eric Enderton. In
another embodiment, the sampling algorithm may include a
pseudo-random sampling algorithm described in U.S. Pat. No.
4,897,806, filed Jun. 19, 1985, entitled "Pseudo-random Point
Sampling Techniques in Computer Graphics" by Cook et al. In yet
another embodiment, the sampling algorithm may include a
quasi-random sampling algorithm described in U.S. Pat. No.
6,529,193, filed Jun. 23, 1997, entitled "System and method for
generating pixel values for pixels in an image using strictly
deterministic methodologies for generating sample points," by
Herkin et al.
[0016] Furthermore, as shown in operation 106, the samples are
swept over at least partially in a depth-based order to identify a
value for the noisy pixel that reduces the noise. For example, the
value of the noisy pixel may include a color value for the noisy
pixel. By identifying the value for the noisy pixel, the noisy
pixel may be reconstructed (i.e. from its initial state in
operation 102) using the identified value. For example, the noisy
pixel may be rendered or otherwise generated for display using the
identified value. More information on determining such value will
be described in more detail below.
[0017] In one embodiment, the depth-based order over which the
samples are at least partially swept may include a front-to-back
order. For example, processing of the samples to identify the value
for the noisy pixel may be performed in the front-to-back order,
such that a front-most sample (i.e. sample with a front-most depth
value) is processed first, a next front-most sample is processed
second, and so forth. Of course, as noted above, the samples may
also be swept over in a partial (i.e. approximate) depth-based
order, where all of the samples are swept over, but only a portion
are swept over in the depth-based order. Such portion may be
predetermined (e.g. every other sample), or the manner in which the
samples are (approximately) depth-based ordered may be
predetermined, as desired. Thus, the samples may optionally be
swept over in the (approximate) front-to-back order only once.
[0018] In another embodiment, the value for the noisy pixel may be
identified using an accumulation performed with respect to the
sweeping of the samples. Such accumulation may include adjusting a
filter weight based on a filter weight determined for each of the
samples. In the present embodiment, the filter weight for a sample
may be directly proportional to a level of blur (or transparency in
the case of noise due to a transparent object) of the sample. For
example, the filter weight for the first sample in the depth-based
order may be identified, and further adjusted for each subsequent
sample in the depth-based order based on the filter weight of such
subsequent samples.
[0019] In one exemplary embodiment, a filter weight associated with
a level of blur for the first sample in the depth-based order may
be identified as the current filter weight, a filter weight
associated with a level of blur for a second sample in the
depth-based order may be identified and used to adjust the
already-adjusted current filter weight, a filter weight associated
with a level of blur for a third sample in the depth-based order
may be identified and used to adjust the already-adjusted filter
weight, etc. until a filter weight associated with a level of blur
for a last sample in the depth-based order is identified and used
to adjust the already-adjusted current filter weight. Thus, the
current filter weight may be updated for each sample, until a final
filter weight is determined.
[0020] The final filter weight may indicate an area associated with
the noisy pixel from which samples are to be selected for use in
identifying the value for the noisy pixel. For example, the final
filter weight may indicate which of the neighboring pixels will
influence the value of the noisy pixel, such that the identified
samples of those neighboring pixels (from operation 104) are used
(e.g. averaged) to identify the value for the noisy pixel.
[0021] To this end, the area having neighboring pixels from which
samples are chosen for use in calculating the value for the noisy
pixel may be dynamically selected. Such dynamic selection may
therefore allow different noisy pixels to be influenced by
different sized areas, and therefore different numbers of samples
depending on the number of neighboring pixels in those areas. Still
yet, by increasing the number of samples contributing to the value
of the noisy pixel, the noisy pixel may be blurred (or further
blurred where the noisy pixel is already blurred), such that a
de-noising blur is effectively provided for the noisy pixel. For
example, where the noise of the image is a result of a blurry
region included in the image, increasing the number of samples
contributing to the value of the noisy pixel may allow for the
noisy pixel to be reconstructed in such a way that additional blur
is provided to the blurry region (i.e. by the reconstructed noisy
pixel). This additional blur may be preferable to viewers of the
image since the noise in the image is decreased by the inclusion of
the additional blur.
[0022] More illustrative information will now be set forth
regarding various optional architectures and features with which
the foregoing framework may or may not be implemented, per the
desires of the user. It should be strongly noted that the following
information is set forth for illustrative purposes and should not
be construed as limiting in any manner. Any of the following
features may be optionally incorporated with or without the
exclusion of other features described.
[0023] FIG. 2 illustrates a method 200 for reducing noise in a
noisy pixel using a depth-based ordering of samples identified with
respect to the noisy pixel, in accordance with another embodiment.
As an option, the method 200 may be carried out in the context of
FIG. 1. Of course, however, the method 200 may be carried out in
any desired environment. It should also be noted that the
aforementioned definitions may apply during the present
description.
[0024] As shown in operation 202, a noisy pixel of an image having
noise is identified. It should be noted that, while the present
method 200 is described with respect to a single pixel, the method
200 may be performed for each noisy pixel in the image. In this
way, the method 200 may be used to reduce noise of the image by
reducing a noise associated with each noisy pixel in the image.
[0025] Additionally, as shown in operation 204, a plurality of
neighboring pixels to the noisy pixel are identified. For example,
a noisy region of the image in which the noisy pixel is located may
be identified. Other pixels within such region also having noise
may then be identified as the neighboring pixels to the noisy
pixel, as an option.
[0026] Further, at least one sample included in each of the
neighboring pixels is identified, utilizing a predetermined
sampling algorithm. Note operation 206. In one embodiment, the
number of samples identified from each of the neighboring pixels
may be predetermined. In another embodiment, the location of such
samples from within each of the neighboring pixels may be
determined by the predetermined sampling algorithm.
[0027] Still yet, as shown in operation 208, the samples are depth
ordered. The samples may be depth ordered using depth information
determined for each of the samples when the samples are identified.
For example, identification of the samples may include identifying
information describing the samples, such as color information and
depth information. In one embodiment, the depth ordering may
include a front-to-back ordering, such that a sample of the least
depth is first in the order and a sample of a greatest depth is
last in the order.
[0028] Moreover, the samples are swept over in the depth order to
identify a value for the noisy pixel that reduces the noise of the
image. Note operation 210. One embodiment for sweeping over the
samples is described below with respect to the method 300 of FIG.
3.
[0029] It should be noted that as another option, the identified
samples may be placed in a plurality of depth-ordered bins, where
each of the bins is configured to store samples within a different
depth range (such that the samples within a bin are not necessarily
stored in any particular order). For example, where the image has
depth of focus, a first bin in the order may store samples of a
depth above a focal plane (i.e. out of focus), a second bin in the
order may store samples in the focal plane (i.e. in focus), and a
third bin may store samples below the focal plane (i.e. out of
focus). Thus, a sample may be placed in one of the bins according
to a determination that the depth of the sample is within the depth
range associated with the bin.
[0030] To this end, sweeping over the samples may include binning
the samples, as described above, and sweeping over the bins in the
depth-based order. Optionally, the method 300 of FIG. 3 may be
applied to the bins, in another embodiment. For example, the filter
weights of the unsorted samples within each bin may be accumulated
(e.g. without reference to any particular depth-order). The
accumulated filter weights for each of the bins may then be
combined based on the depth-ordering of the bins, for identifying
the value for the noisy pixel. By using bins in this manner, the
value of the noisy pixel may be identified with less sorting and
less computation than if all of the samples are depth-sorted.
[0031] FIG. 3 illustrates a method 300 for sweeping over samples
identified with respect to the noisy pixel in a depth-based order,
in accordance with yet another embodiment. As an option, the
present method 300 may be carried out in the context of the
functionality and architecture of FIGS. 1-2. For example, the
method 300 may be carried out with respect to operation 210 of FIG.
2. Of course, however, the method 300 may be carried out in any
desired environment. Again, it should be noted that the
aforementioned definitions may apply during the present
description.
[0032] As shown in operation 302, a first sample in a depth-based
order is identified. The first sample may include a sample
identified from neighboring pixels of a noisy pixel which has a
lowest depth value. For example, the first sample may include the
first sample in the depth order described above with respect to
operation 208 of FIG. 2.
[0033] Furthermore, a filter weight associated with the first
sample is identified. Note operation 304. With respect to the
present embodiment, the filter weight associated with the first
sample indicates an area (e.g. circular area, rectangular area, or
any other predetermined shape) surrounding the first sample. For
example, the filter weight associated with the first sample may
include a value of a radius from the first sample or a diameter of
the area with the first sample being at the center of the area.
[0034] In one embodiment, the filter weight for the first sample
may be a direct function of a level of blur of the sample. For
example, as the level of blur (or in the case of transparency, the
level of transparency) increases, the filter weight may similarly
increase. As an option, each of a plurality of filter weights may
be mapped to a different level of blur capable of being associated
with a sample. As a further option, the filter weights may be
configured by a user for the varying levels of the blur (e.g. where
the levels include a single blur value or a range of blur
values).
[0035] For example, the filter weight may be any
programmer-selected function of sample depth, motion, transparency,
texture frequency content, or even artistic variables such as
visual importance. In one embodiment, the filter weight may be the
circle of confusion at the depth of the first sample. Thus, the
level of blur for the first sample may optionally be determined,
and the associated filter weight identified.
[0036] In addition, as shown in decision 306, it is determined
whether there is a next sample in the depth-based order. If there
is a next sample, the filter weight (i.e. determined with respect
to the previous sample in the depth-based order) is adjusted based
on a filter weight associated with the next sample. Note operation
308. Accordingly, for each subsequent sample in the depth-based
order, the filter weight may be adjusted based on a filter weight
of each subsequent sample, and the final adjusted filter weight may
be identified as a filter weight associated with a desired level of
blur.
[0037] Just by way of example, the filter weight of the first
sample may be adjusted using the filter weight of a next sample in
the depth-based order (to create a first adjusted filter weight),
that first adjusted filter weight may be further adjusted using the
filter weight of another next sample in the depth-based order (to
create a second adjusted filter weight), that second adjusted
filter weight may be further adjusted using the filter weight of
yet another next sample in the depth-based order (to create a third
adjusted filter weight), and so forth.
[0038] It should be noted that such adjustment may be based on any
desired algorithm that takes into account the depth-based ordering
of the samples. For example, a sharp sample in isolation may be
associated with a filter weight representing a small area, but as
more blurry samples are in front of the sharp sample, the filter
weight may be increased such that the area is increased. As another
example, a blurry background sample may be associated with a filter
weight representing a large area, but as more sharp samples are in
front of the blurry sample, the filter weight may be decreased such
that the area is decreased.
[0039] Once it is determined that there is not another sample in
the depth-based order, a final filter weight is applied to
determine a plurality of applicable neighboring samples. Note
operation 310. In the context of the present embodiment, the final
filter weight may include the filter weight associated with the
desired level of blur, as described above. Thus, for example, if
the desired level of blur is greater than zero (i.e. there is some
blur desired), then the filter weight may be larger than a default
filter weight otherwise used to identify a value of a pixel without
noise (i.e. for which blur is not being applied).
[0040] As also note above, each filter weight may indicate an area
surrounding the associated sample. Thus, the final filter weight
may be used to determine an area surrounding the noisy pixel. It
may then be determined which of the samples in the depth-based
order are included in the area, and the samples determined to be in
the area may be identified as the applicable neighboring samples.
To this end, neighboring samples applicable to the noisy pixel may
be identified based on the final filter weight associated with the
desired level of blur for the noisy pixel.
[0041] Still yet, values of the applicable neighboring samples are
averaged. Note operation 312. Such values may include the color
values for the applicable neighboring samples, in the present
embodiment. The result of the averaging may be a value for the
noisy pixel. For example, such value may be used for reconstructing
the noisy pixel. Of course, it should be noted that any other
algorithm other than averaging may be applied to the values for
generating a value for the noisy pixel.
[0042] Table 1 shows one example of an algorithm capable of being
used to implement the method 300 of FIG. 3. Of course, it should be
noted that the algorithm shown in Table 1 is set forth for
illustrative purposes only, and thus should not be construed as
limiting in any way.
TABLE-US-00001 TABLE 1 1: sort all samples that can influence this
pixel, in depth 2: rgb c = (0, 0, 0); 3: float w = 0; 4: float
a.sub.n = 0; // accumulated narrow contribution 5: float a.sub.w =
0; // accumulated wide contribution 6: for each sample i in
front-to-back order do 7: compute d.sub.i from z.sub.i or other
inputs 8: f.sub.n = f(x.sub.i - x.sub.c,y.sub.i - y.sub.c); 9:
f.sub.w = (1/D.sup.2) * f((x.sub.i - x.sub.c)/D, (y.sub.i -
y.sub.c)/D); 10: if d.sub.i < D then 11: w.sub.i = (1 - a.sub.w)
* f.sub.n + a.sub.w * f.sub.w; 12: a.sub.n += (1 - a.sub.w) *
f.sub.n; 13: else 14: w.sub.i = (1 - a.sub.n) * f.sub.w + a.sub.n *
f.sub.n; 15: a.sub.w += (1 - a.sub.n) * f.sub.w; 16: end if 17: w
+= w.sub.i; 18: c += w.sub.i * c.sub.i; 19: end for 20: c.sub.pixel
= c/w;
[0043] In the algorithm shown in Table 1, D is the width of the
filter weight representing a large area (i.e. a wide filter), and
filter weight representing a smaller area (i.e. the narrow filter)
is the default filter used for unblurred pixels. When all the
samples have the same filter weight, the algorithm behaves as
desired and either a narrow or wide blurring diameter is used for
all samples. When there are blurry samples in front of sharp
samples, a filter with more wide weight is used for the sharp
samples as desired. When some of the center pixels are sharp (use
fn) then the contribution of blurry background pixels is
diminished. As an option, the "if" clauses in the algorithm may be
blended (e.g. in the spirit of MIPmaps), or clauses for additional
intermediate scales (i.e. filter weights) may be added, to prevent
a visual break in objects that go in and out of focus.
[0044] Tables 2 illustrates a sweeping algorithm that may be used
which blends between two scales: 1.times.1 and 5.times.5 blocks. In
Table 2, N is the number of samples in the widest tile, and ns is
the number of samples in a pixel. As a default, de-noising blur is
the maximum of the circle of confusion diameter and, if motion blur
is to be smoothed, the length of the projected motion vector in
pixels.
TABLE-US-00002 TABLE 2 float box(float x, float radius) { return
fabs(x) < radius ? 0.5/radius : 0; } // process samples
front-to-back gsort (s, N, sizeof(*s), compare_sample_z); float
cov_1 = 0.0; float cov_5 = 0.0; float cov = 0.0; rgb sum(0, 0, 0);
for (int i = 0; i < N; i++) { // user programmable "denoising"
blur diameter float D = s[i].denoisingblur; float w_1 =
(1/ns)*box(s[i].x,0.5)*box(s[i].y,0.5); float w_5 =
(1/ns)*box(s[i].x,2.5)*box(s[i].y,2.5); float w; float blend =
clamp((D-1)/5, 0, 1); w = blend * (w_5*(1 - cov_1) + w_1*cov_1);
cov_5 += blend * (w_5*(1 - cov_1)); w += (1-blend) * (w_1*(1 -
cov_5) + w_5*cov_5); cov_1 += (1-blend) * (w_1*(1 - cov_5)); cov +=
w; sum += w * s[i].color; } image->setPixel(x, y,
(1/cov)*sum);
[0045] Table 3 illustrates a sweeping algorithm that may be used
when the block sizes are 1.times.1 and 7.times.7 and when there is
a visible jump between the scales. As shown, the intermediate
scales 3.times.3 and 5.times.5 are provided as an improvement.
TABLE-US-00003 TABLE 3 qsort(s, N, sizeof(*s), compare_sample_z);
float cov_1 = 0.0; float cov_3 = 0.0; float cov_5 = 0.0; float
cov_7 = 0.0; float cov = 0.0; rgb sum(0,0,0); for (int i = 0; i
< N; i++) { float D = s[i].denoisingblur; float w_1 =
(1/ns)*box(s[i].x,0.5)*box(s[i].y,0.5) float w_3 =
(1/ns)*box(s[i].x,0.5)*box(s[i].y,1.5) float w_5 =
(1/ns)*box(s[i].x,2.5)*box(s[i].y,2.5) float w_7 =
(1/ns)*box(s[i].x,3.5)*box(s[i].y,3.5) float w; if (D > 7) { w =
w_7*(1 - cov_1 - cov_3 - cov_5) + w_1*cov_1 + w_3*cov_3 +
w_5*cov_5; cov_7 += w_7*(1 - cov_1 - cov_3 - cov_5); } else if (D
> 5) { w = w_5*(1 - cov_1 - cov_3 - cov_7) + w_1*cov_1 +
w_3*cov_3 + w_7*cov_7; cov_5 += w_5*(1 - cov_1 - cov_3 - cov_7); }
else if (D > 3) { w = w_3*(1 - cov_1 - cov_5 - cov_7) +
w_1*cov_1 + w_5*cov_5 + w_7*cov_7; cov_3 += w_3*(1 - cov_1 - cov_5
- cov_7); } else { w = w_1*(1 - cov_3 - cov_5 - cov_7) + w_3*cov_3
+ w_5*cov_5 + w_7*cov_7; cov_1 += w_1*(1 - cov_3 - cov_5 - cov_7);
} cov += w; sum += w * s[i].color; } image->setPixel(x, y,
(1/cov)*sum);
[0046] FIG. 4 illustrates an exemplary system 400 in which the
various architecture and/or functionality of the various previous
embodiments may be implemented. As shown, a system 400 is provided
including at least one host processor 401 which is connected to a
communication bus 402. The system 400 also includes a main memory
404. Control logic (software) and data are stored in the main
memory 404 which may take the form of random access memory
(RAM).
[0047] The system 400 also includes a graphics processor 406 and a
display 408, i.e. a computer monitor. In one embodiment, the
graphics processor 406 may include a plurality of shader modules, a
rasterization module, etc. Each of the foregoing modules may even
be situated on a single semiconductor platform to form a graphics
processing unit (GPU).
[0048] In the present description, a single semiconductor platform
may refer to a sole unitary semiconductor-based integrated circuit
or chip. It should be noted that the term single semiconductor
platform may also refer to multi-chip modules with increased
connectivity which simulate on-chip operation, and make substantial
improvements over utilizing a conventional central processing unit
(CPU) and bus implementation. Of course, the various modules may
also be situated separately or in various combinations of
semiconductor platforms per the desires of the user.
[0049] The system 400 may also include a secondary storage 410. The
secondary storage 410 includes, for example, a hard disk drive
and/or a removable storage drive, representing a floppy disk drive,
a magnetic tape drive, a compact disk drive, etc. The removable
storage drive reads from and/or writes to a removable storage unit
in a well known manner.
[0050] Computer programs, or computer control logic algorithms, may
be stored in the main memory 404 and/or the secondary storage 410.
Such computer programs, when executed, enable the system 400 to
perform various functions. Memory 404, storage 410 and/or any other
storage are possible examples of computer-readable media.
[0051] In one embodiment, the architecture and/or functionality of
the various previous figures may be implemented in the context of
the host processor 401, graphics processor 406, an integrated
circuit (not shown) that is capable of at least a portion of the
capabilities of both the host processor 401 and the graphics
processor 406, a chipset (i.e. a group of integrated circuits
designed to work and sold as a unit for performing related
functions, etc.), and/or any other integrated circuit for that
matter.
[0052] Still yet, the architecture and/or functionality of the
various previous figures may be implemented in the context of a
general computer system, a circuit board system, a game console
system dedicated for entertainment purposes, an
application-specific system, and/or any other desired system. For
example, the system 400 may take the form of a desktop computer,
lap-top computer, and/or any other type of logic. Still yet, the
system 400 may take the form of various other devices m including,
but not limited to a personal digital assistant (PDA) device, a
mobile phone device, a television, etc.
[0053] Further, while not shown, the system 400 may be coupled to a
network [e.g. a telecommunications network, local area network
(LAN), wireless network, wide area network (WAN) such as the
Internet, peer-to-peer network, cable network, etc.) for
communication purposes.
[0054] While various embodiments have been described above, it
should be understood that they have been presented by way of
example only, and not limitation. Thus, the breadth and scope of a
preferred embodiment should not be limited by any of the
above-described exemplary embodiments, but should be defined only
in accordance with the following claims and their equivalents.
* * * * *