POV-Ray : Newsgroups : povray.advanced-users : Focal-Blur Insight questions... : Re: Focal-Blur Insight questions... Server Time
29 Jul 2024 08:13:56 EDT (-0400)
  Re: Focal-Blur Insight questions...  
From: Retsam
Date: 12 Mar 2003 19:55:07
Message: <web.3e6fd67e99f959c52a3ff2e70@news.povray.org>
Variance and confidence are two very diffferent things, at least in
statistics (not sure how POV calculates them, though I am going to check
the source code later).  Variance is related to standard deviation, and is
not dependent on the number of samples so much as it is dependent on the
sample set.  Think of it in terms of antialiasing, which is very similar to
focal blur in some ways.

If you have an image with a lot of detail, or with sharp edges, then a
single pixel, if viewed at infinite resolution, might contain reds, greens,
blues, yellows, etc.  This would result in a large variance.  Or it might
just contain shades of red, or subtly different shades of orange.  Then the
variance would be very low.  If the entire pixel contained one solid color,
then it would have a variance of 0.

The confidence is a function of the number of samples taken.  In a very
simple example, assume you flip a coin.  Every time you flip the coin, it
comes up heads.  After ten flips, you've still only gotten heads.  What's
your confidence that the coin is a double-headed coin, as opposed to a
normal head-tail coin?  In this case, the odds that a head-tail coin would
get ten straight heads is 1/1024, and the odds that a two-headed coin would
get ten straight heads is 1/1.  The ratio of those two probabilties gives a
confidence of just over 0.999.

Charles Fusner wrote:
>Tim Nikias wrote:
>> I'd expect POV to shoot rays for focal-blur, but what does
>> it actually do to judge if the pixel-color traced so far is
>> probably reaalllly close to the exact color? How can
>> POV be "confident" about that? I guess that variance,
>> telling in the docs that its a tolerance on "samples taken
>> so far", just tells POV: "See, the most recent samples all
>> look pretty much the same, lets stop tracing."
>>
>
>I only know some school book statistics, but based on that,
>I'd say that's a pretty close guess. IIRC, the theory is
>based on the idea that in a random sampling, the sum of all
>samples tend to gravitate toward some mean value. That mean
>itself will fluctate as more samples are taken, but will
>tend to become increasingly fixed as a sufficiently
>representative number of samples have been taken. I think
>at this point, average variance from the mean is used to
>determine what constitutes "sufficiently representative."
>
>It's a good question, though, because I'm not clear why POV
>needs both a variance and confidence keyword. I gathered that
>variance must fall, I believe, to consititute "close enough."
>
>My guess is that variance as used in POV terms will terminate the
>sampling early if the confidence has *not* been reached, *but*
>the variance is now so low anyway that it can't possibly contribute
>to the pixel color (given the output bit depth). Sort of a double
>adaptive method that offers the sampling two possible reasons to
>stop to make absolutely sure no more samples are taken than
>matter.
>
>@C[$F];
>The Silver Tome ::  http://www.silvertome.com
>"You may sing to my cat if you like..."
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.