<p>Suppose we have an 512x512 image, then the value of pixel j should be  <span class="math-container">$I_j = \int_{0}^{512} \int_{0}^{512} h_j(u,v)L(u,v) \,dudv$</span>, where <span class="math-container">$h_j(u,v)$</span> is the filter function for pixel j, <span class="math-container">$L(u,v)$</span> is the corresponding radiance function.</p>
<p>In practice, we compute the value of pixel j by the formual <span class="math-container">$\frac{\sum_{i=1}^{N} h_j(u_i,v_i)L(u_i,v_i)}{\sum_{i=1}^{N} h_j(u_i,v_i)}$</span>. Veach said that this estimate is slightly biased in page 308 in his thesis.</p>
<p>So my question is what's the expectation of this estimate?</p>

CC BY-SA 4.0
2022-10-07T11:02:42.147Z
I believe they want to estimate $\frac{\int_{\Omega} h_jL}{\int_{\Omega}h_j}$ the estimator above however has expectation $N\int_{\Omega^N} \frac{h_j(x_1)L(x_j)}{\sum_{k=1}^{N}h_j(x_k)}\prod_{k=1}^N p(x_k)\,dx_k$. Assuming their film coordinates are in $[0,1]^2$ then $p = 1$ and what remains is $N\int_{\Omega^N} \frac{h_j(x_1)}{\sum_{k=1}^{N}h_j(x_k)L(x_j)}\prod_{k=1}^N\,dx_k$. So the issue is really that they  don't know the integral of $h_j$.
lightxbulb
CC BY-SA 4.0
2022-10-07T11:09:41.263Z
Typo $L(x_j)$ must be $L(x_1)$ and always in the numerator.
lightxbulb
CC BY-SA 4.0
2022-10-08T07:40:14.723Z
@lightxbulb : If they want to estimate $\frac{\int_{\Omega} h_j(x)L(x)\mathrm{d}x}{\int_{\Omega} h_j(x)\mathrm{d}x} $, why not calculate $H=\int_{\Omega} h_j(x)\mathrm{d}x$ first, and then use $\frac{1}{NH}\sum_{k=1}^{N} h_j(x_k)L(x_k)$ to estimate $\frac{\int_{\Omega} h_j(x)L(x)\mathrm{d}x}{\int_{\Omega} h_j(x)\mathrm{d}x} $, where $x_k\sim U[0,1)^2$?
Andy
CC BY-SA 4.0
2022-10-08T10:27:54.160Z
Because they wanted to have a convex linear combination with weighs that sum up to $1$: $w_k= \frac{h_j(x_k)}{\sum_i h_j(x_i)} \implies \sum_k w_k = 1$.
lightxbulb
CC BY-SA 4.0
2022-10-08T12:50:13.617Z
@lightxbulb : But in this case, the bias and variance is hard to analyse.
Andy
CC BY-SA 4.0
2022-10-08T13:17:51.393Z
Apparently they prefer to a little bit of bias than undershoots and overshoots.
lightxbulb
CC BY-SA 4.0
2022-10-09T10:35:14.740Z
@lightxbulb : But there is almost no difference if we use stratified sampling.
Andy
CC BY-SA 4.0
2022-10-09T11:11:15.203Z
I have no idea what you are talking about. Stratified sampling has no effect on whether an estimator is biased.
lightxbulb
CC BY-SA 4.0
2022-10-09T11:31:13.663Z
@lightxbulb : Yes. I mean the computing processes of the two algorithm, divide by a weighed sum or the actual integral, the computing processes are almost the same. Same sampling postitions, but dividing by the actual integral is unbiased. So I don't understand why they prefer the weighed sum one.
Andy
CC BY-SA 4.0
2022-10-09T11:33:31.190Z
Because it results in a convex linear combination. Otherwise you get some linear combination normalized by something. It can result in undershoots and overshoots, especially if larger approximation error occurs.
lightxbulb
<raytracing><rendering><pathtracing><global-illumination>
Question about reconstruction filter in ray tracing?
Andy
# Question about reconstruction filter in ray tracing?

(Asked by: username_0 on 2022-10-07)

Suppose we have an 512x512 image, then the value of pixel j should be $I\_j = \int\_{0}^{512} \int\_{0}^{512} h\_j(u,v)L(u,v) \,dudv$, where $h\_j(u,v)$ is the filter function for pixel j, $L(u,v)$ is the corresponding radiance function.

In practice, we compute the value of pixel j by the formual $\frac{\sum\_{i=1}^{N} h\_j(u\_i,v\_i)L(u\_i,v\_i)}{\sum\_{i=1}^{N} h\_j(u\_i,v\_i)}$. Veach said that this estimate is slightly biased in page 308 in his thesis.

So my question is what's the expectation of this estimate?

**Tags:** raytracing, rendering, pathtracing, global-illumination

> **Comments:**
> **username_1**: I believe they want to estimate $\frac{\int_{\Omega} h_jL}{\int_{\Omega}h_j}$ the estimator above however has expectation $N\int_{\Omega^N} \frac{h_j(x_1)L(x_j)}{\sum_{k=1}^{N}h_j(x_k)}\prod_{k=1}^N p(x_k)\,dx_k$. Assuming their film coordinates are in $[0,1]^2$ then $p = 1$ and what remains is $N\int_{\Omega^N} \frac{h_j(x_1)}{\sum_{k=1}^{N}h_j(x_k)L(x_j)}\prod_{k=1}^N\,dx_k$. So the issue is really that they  don't know the integral of $h_j$.  
> **username_1**: Typo $L(x_j)$ must be $L(x_1)$ and always in the numerator.  
> **username_0**: @username_1 : If they want to estimate $\frac{\int_{\Omega} h_j(x)L(x)\mathrm{d}x}{\int_{\Omega} h_j(x)\mathrm{d}x} $, why not calculate $H=\int_{\Omega} h_j(x)\mathrm{d}x$ first, and then use $\frac{1}{NH}\sum_{k=1}^{N} h_j(x_k)L(x_k)$ to estimate $\frac{\int_{\Omega} h_j(x)L(x)\mathrm{d}x}{\int_{\Omega} h_j(x)\mathrm{d}x} $, where $x_k\sim U[0,1)^2$?  
> **username_1**: Because they wanted to have a convex linear combination with weighs that sum up to $1$: $w_k= \frac{h_j(x_k)}{\sum_i h_j(x_i)} \implies \sum_k w_k = 1$.  
> **username_0**: @username_1 : But in this case, the bias and variance is hard to analyse.  
> **username_1**: Apparently they prefer to a little bit of bias than undershoots and overshoots.  
> **username_0**: @username_1 : But there is almost no difference if we use stratified sampling.  
> **username_1**: I have no idea what you are talking about. Stratified sampling has no effect on whether an estimator is biased.  
> **username_0**: @username_1 : Yes. I mean the computing processes of the two algorithm, divide by a weighed sum or the actual integral, the computing processes are almost the same. Same sampling postitions, but dividing by the actual integral is unbiased. So I don't understand why they prefer the weighed sum one.  
> **username_1**: Because it results in a convex linear combination. Otherwise you get some linear combination normalized by something. It can result in undershoots and overshoots, especially if larger approximation error occurs.  

---

## 0 answers

