<p>I am replying to the last edit of the question.</p>

<p>You can show that <span class="math-container">$\|h_j * f \|^2_2 \leq \|h_j\|^2_1\|f\|^2_2$</span> from Young's theorem. Provided that  <span class="math-container">$\|h_j\|_1 \leq 1$</span> you have: <span class="math-container">$\|h_j * f \|^2_2 \leq \|f\|^2_2$</span>. Additionally for <span class="math-container">$g_j$</span> I believe you want to clamp the indicator function to <span class="math-container">$\{h_j &gt; 0 \wedge f &gt; 0\}$</span>. Then <span class="math-container">$\int_{\{h_j&gt;0 \wedge f&gt;0\}} a\leq \int_{\{f&gt;0\}}a$</span> (since the integrands are always non-negative: <span class="math-container">$a\geq 0$</span>). This basically proves that the inequality holds for the left terms of the quadratic expansions, the middle terms are both negative, <strike>so those may be ignored</strike>. The only thing left to prove is: <span class="math-container">$(\frac{1}{\mu(\{h_j&gt;0 \wedge f&gt;0\})}\int h_jf)^2 \leq (\frac{1}{\mu(\{f&gt;0\})}\int f)^2$</span>, which is the case if <span class="math-container">$h_j \leq 1$</span> everywhere. Basically, as long as your filter <span class="math-container">$h_j$</span> preserves the minimum and maximum of the image, you're good (this is not an unreasonable requirement for a filter, note however, that there are filers that do not preserve min-max).</p>

<p>Edit: My bad, the middle terms may not be ignored (at least the one on the right of the inequality). Which means you are left to prove that:</p>

<p><span class="math-container">$$\frac{(\int h_jf)^2}{\mu(\{h_j&gt;0 \wedge f&gt;0\})} \geq \frac{(\int f)^2}{\mu(\{f&gt;0\})}$$</span>, which will be a problem.</p>

<p>I guess one has to use tighter bounds to relate the mixed term with the squared terms.</p>

<p>Edit 2:</p>

<p>Let's consider the expression as a whole then:</p>

<p><span class="math-container">$$\int \left(h_jf - \frac{\int h_jf}{\mu(\{h_j &gt; 0 \wedge f &gt; 0\})} \right)^2 \leq \alpha \int \left(f - \frac{\int f}{\mu(\{f &gt; 0\})} \right)^2$$</span>
<span class="math-container">$$ 0 \leq \alpha\int (f)^2 - \int (h_jf)^2 +\alpha\frac{(\int f)^2}{\mu^2(\{f &gt; 0\})} - \frac{(\int h_jf)^2}{\mu^2(\{h_j &gt; 0 \wedge f &gt; 0\})} + \frac{2(\int h_jf)^2}{\mu(\{h_j &gt; 0 \wedge f &gt; 0\})} - \alpha\frac{2(\int f)^2}{\mu(\{f &gt; 0\})}$$</span>
<span class="math-container">$$ 0 \leq \alpha\left(\int (f)^2 - \frac{(1-2\mu(\{f &gt; 0\}))(\int f)^2}{\mu^2(\{f &gt; 0\})}\right) - \left( \int (h_jf)^2 - \frac{(1-2\mu(\{h_j &gt; 0 \wedge f &gt; 0\}))(\int h_jf)^2}{\mu^2(\{h_j &gt; 0 \wedge f &gt; 0\})}\right) $$</span></p>

<p><span class="math-container">$$0 \leq \left(\int(\sqrt{\alpha}f)^2-\int (h_jf)^2\right) - \left(\frac{\alpha(1-2\mu(\{f &gt; 0\}))(\int f)^2}{\mu^2(\{f &gt; 0\})}  - \frac{(1-2\mu(\{h_j &gt; 0 \wedge f &gt; 0\}))(\int h_jf)^2}{\mu^2(\{h_j &gt; 0 \wedge f &gt; 0\})}\right) $$</span></p>

<p><span class="math-container">$$0 \leq \left(\int(\sqrt{\alpha}f)^2-\int (h_jf)^2\right) - \left(a \left(\int \sqrt{\alpha}f\right)^2 - b\left(\int h_jf\right)^2\right)$$</span></p>

<p>Note also that <span class="math-container">$\left(\int u\right)^2 \leq \int u^2$</span>. Then with an appropriate <span class="math-container">$\alpha$</span> and <span class="math-container">$h_j$</span> bounded it should hold. You may want to study the <span class="math-container">$a,b$</span> tems also.</p>

CC BY-SA 4.0
2020-03-02T12:30:54.737Z
Thank you for your answer. It would be enough for me to show (b) for the box filter with radius 1/2.
0xbadf00d
CC BY-SA 4.0
2020-03-02T12:47:35.317Z
Regarding your "whole term equation": Note that it simplifies to $$\mu|h_jf|^2-\frac{|\mu(h_jf)|^2}{\mu(B_j)}\le\alpha\left[\mu|f|^2-\frac{|\mu f|^2}{\mu(B)}\right],$$ where $B:=\{f\ne0\}$, $B_j:=B\cap\{h_j>0\}$ and $\mu g:=\int g\:{\rm d}\mu$. And it might be useful to note that, if each $h_j$ is a box filter and hence takes only the values $0$ or $1$, we've got $|h_j|^2=h_j$.
0xbadf00d
CC BY-SA 4.0
2020-03-02T12:57:45.077Z
And let me note that the aspect of (b) I'm looking for is that we can bound the left-hand side in terms of the variance of $f$.  So, the factor $\frac1{\mu(B)}$ before the integral in the definition of $f_0$ is not important for me.
0xbadf00d
CC BY-SA 4.0
2020-03-02T13:00:45.130Z
If you set $a=b=1$, then $h_j \leq \sqrt{\alpha}$ is your requirement. But I believe you allow for $\alpha$ to be any, thus you just require for $h_j$ to never go to infinity (which holds for filters). Since it's also an integral, I would say that it's even ok for it to explode on sets of measure zero.
lightxbulb
CC BY-SA 4.0
2020-03-02T13:04:48.773Z
How do I need to read your equation lines? Are they meant to be equivalent to each other or are they meant to be implications (eq. 1 implies eq.2 and so on)? I begin to struggle what you did from (and including) the third equation on. Do you agree that your first equation is  equivalent to the one in my second comment?
0xbadf00d
CC BY-SA 4.0
2020-03-02T13:06:03.150Z
And note that your claim "$\left(\int u\right)^2 \leq \int u^2$" is not correct, unless you normalize the measure over which you're taking the integrals.
0xbadf00d
CC BY-SA 4.0
2020-03-02T13:06:11.877Z
The equations in the second edit are equivalent - it's just algebraic transformations. I have a meeting in a few minutes, so I cannot exactly go in details, but try writing it down ($a,b$ are just substitute variables).
lightxbulb
CC BY-SA 4.0
2020-03-02T13:06:35.687Z
Substitute variables for what?
0xbadf00d
CC BY-SA 4.0
2020-03-02T13:07:14.857Z
The ugly fractions.
lightxbulb
CC BY-SA 4.0
2020-03-02T13:11:44.497Z
You've made a mistake in your third equation. The $\mu^2$ in the denominator should be a $\mu$. I guess you've pulled the corresponding term out of the integral and forgot to multiply it with the measure over which the integral is taken.
0xbadf00d
CC BY-SA 4.0
2020-03-02T15:04:51.283Z
You mentioned that $(\int u)^2 \leq \int u^2$ doesn't have to hold. Do you have a reference for this? As far as I know Holder's inequality holds regardless of the normalization of the measure. I am not sure what the issue with $\mu^2$ is - or at least I cannot find the mistake. I haven't pulled anything out of the integral - I just took the common denominator so I could merge the terms.
lightxbulb
CC BY-SA 4.0
2020-03-02T15:07:50.520Z
Sure. You're using [Jensen's inequality](https://en.wikipedia.org/wiki/Jensen%27s_inequality#Measure-theoretic_and_probabilistic_form). Hölder's inequality is the same in this particular case. You cannot use it cause you would need to apply it for the second function to be the constant function $1$. Now you only need to note that the $p$-norm of the constant $1$ is equal to the measure of the entire space. So you we need to divide this factor out (hence normalize the measure) again.
0xbadf00d
CC BY-SA 4.0
2020-03-02T15:10:10.120Z
Ok, got what you meant. Honestly, I would keep my measure normalized to avoid this, but in the alternate case I guess you would have to pop-out a constant out of the integrals. I don't think it should change much with respect to the conclusion though. Actually it should probably make the equation more symmetric.
lightxbulb
CC BY-SA 4.0
2020-03-02T15:12:47.117Z
Regarding the second part of your comment: Simply note that $$\int_{B_j}\left(\frac{\int h_jf}{\mu(B_j)} \right)^2\:{\rm d}\mu=\mu(B_j)\cdot\left(\frac{\int h_jf\:{\rm d}\mu}{\mu(B_j)} \right)^2.$$ Hence the square is canceled out. Doing this with the other term as well yields the equation in my second comment.
0xbadf00d
CC BY-SA 4.0
2020-03-02T15:16:06.997Z
Finally, regarding your latest comment: Keeping the measure normalized might be problematic. Note that $\mu$ is *not* a finite measure (it is a $\sigma$-finite measure though); hence it cannot be normalized. However, it would be sufficient for the purpose of the question that the trace of $\mu$ on $\{f\ne0\}$ is finite (i.e. that $\mu(B)<\infty$). But I have no clue if we can assume this without loss of generality.
0xbadf00d
CC BY-SA 4.0
2020-03-02T15:24:27.437Z
In practice your (a) and (b) should always hold (even without all of those arguments), provided that you assume $f < \infty$, and $h_j$ is min-max preserving. I am still unsure why you are considering any dimensions beyond the film ones though. Ideally I would just work with a function $g$ defined only on the film - then you do not even need to care about any of the above, and you can just work with assumptions on $g$.
lightxbulb
CC BY-SA 4.0
2020-03-02T15:29:25.627Z
But $f$ is not defined on the film. We can clearly use that $I_j=\int\sigma_M^{\otimes\{0,\:1\}}({\rm d}(x_0,x_1))h_j(x_0,x_1)\int\sigma_M^{\otimes\{2,\:\ldots\:,\:k\}}({\rm d}(x_2,\ldots,x_k))f(x_0,\ldots,f_k)$ (considering paths of length $k$ only), but I don't see how this simplifies the problem.
0xbadf00d
CC BY-SA 4.0
2020-03-02T15:32:03.737Z
Consider the image function $g(x,y) = \int_{\Omega}W(x,y, \omega)L_i(x,y,\omega)\,d\omega$. This basically gives you the intensity at every point of the film. It's a lot nicer to work with - and as far as I got it, you only care about the vertex on the film (at least the filter does). Your problem reduces to an image processing problem through that simplification. Then you simply have $I_j = \int\int h_j(x,y)g(x,y)\,dx\,dy$.
lightxbulb
CC BY-SA 4.0
2020-03-02T20:00:45.527Z
The reason why I'm considering the path space is that my actual concern is slightly more complicated. First of all: Note that (and I missed that before) the inequality (b) in the question simply follows from the fact that if $X$ is a Hilbert space (say $H$) valued random variable on a probability space $(\Omega,\mathcal A,\operatorname P)$, then the function $H\ni x\mapsto\operatorname E\left[\left\|X-x\right\|_H^2\right]$ attains its minimum at $\operatorname E[X]$. Assuming $\lambda(B)\in(0,\infty)$, we only need to apply this fact to $X=f$ and $\operatorname P:=\frac{\lambda(1_Bf)}{λ(B)}$.
0xbadf00d
CC BY-SA 4.0
2020-03-02T20:37:26.753Z
I lost you. I have no idea what you are trying to do anymore, or why. Random new details keep popping up in your formulation without rhyme or reason (at least from my perspective). What are you trying to do? Why do you need to consider the whole path space as opposed to just the image function? I believe these two questions are related, but seeing as I do not get what your end goal is, it's hard to help even if I want to.
lightxbulb
CC BY-SA 4.0
2020-03-02T12:00:58.207Z
2020-03-02T12:55:23.620Z
2020-03-02T12:55:23.620Z
lightxbulb
<p>The function <span class="math-container">$h_j$</span> is going to be a low-pass filter of some type. Its role is to turn the infinite-resolution image <span class="math-container">$f$</span> into a band-limited one so that it can be sampled to produce pixel values without aliasing. Typical shapes for <span class="math-container">$h_j$</span> in practice could be like a box, tent, bicubic, or Gaussian function.</p>
<p>Such a filter would generally be expected to have the following properties:</p>
<ul>
<li>Defined over the image plane, <span class="math-container">$h_j: \mathbb{R}^2 \to \mathbb{R}$</span></li>
<li>Is an area density, i.e. has units of inverse area (and scales accordingly under changes of coordinates)</li>
<li>Compactly supported, with its region of support commensurate with the pixel spacing (typically having a radius of 1–2 pixels in all directions)</li>
<li>Smooth, or at least piecewise smooth</li>
<li>Finite-valued</li>
<li>Integrates to 1, <span class="math-container">$\int_{\mathbb{R}^2} h_j(x) \, dx^2 = 1$</span></li>
<li>The filters for different pixels <span class="math-container">$j$</span> differ only by translation, <span class="math-container">$h_j(x) = h(x - x_j)$</span> where <span class="math-container">$h$</span> is the filter centered at 0, and <span class="math-container">$x_j$</span> is the center of the <span class="math-container">$j$</span>th pixel.</li>
<li>Symmetric, <span class="math-container">$h(-x) = h(x)$</span></li>
<li>Factors into 1D filters along the x and y axes, <span class="math-container">$h(x, y) = h(x)h(y)$</span></li>
</ul>
<p>(The last three properties might not be true for some exotic cases, such as rendering to a curved or nonlinearly warped display, but would be expected to hold for rendering an ordinary 2D image.)</p>
<p>You'll note one property I didn't mention was <span class="math-container">$h_j \geq 0$</span>. That's because it is actually convenient to use filters with negative lobes sometimes, as they can improve image sharpness. See for example the <a href="https://en.wikipedia.org/wiki/Mitchell-Netravali_filters" rel="nofollow noreferrer">Mitchell–Netravali filters</a>. Nor do we necessarily have <span class="math-container">$h_j \leq 1$</span> everywhere. Actually the values of <span class="math-container">$h_j$</span> depend on the coordinate system, since it's an area density, so a statement like <span class="math-container">$h_j \leq 1$</span> is meaningless without specifying some particular coordinates.</p>
<p>Regarding your properties, for (a), yes the norm of the filter should be bounded. As mentioned, the filter integrates to 1. Without negative lobes, the 1-norm of the filter should be exactly 1. The 1-norm of a filter with negative lobes would be expected to be somewhat greater than 1 but still finite.</p>
<p>For property (b), I'm not 100% sure but I think that this is indeed guaranteed by the fact that <span class="math-container">$h_j$</span> is (piecewise) smooth and has a support that doesn't get arbitrarily small. The size of the filter is on the order of the pixel spacing (otherwise it doesn't work for antialiasing), so the variance within a single pixel's filter footprint can't be much more than (variance of entire image * number of pixels). You could probably formalize that with Chebyshev's inequality or some such.</p>

CC BY-SA 4.0
2020-11-27T22:49:48.050Z
2020-11-27T22:49:48.050Z
Nathan Reed
<p>Let <span class="math-container">$f$</span> denote the measurement contribution function for paths of length <span class="math-container">$k\in\mathbb N$</span>, i.e. <span class="math-container">$$f(x)=g(x_0\leftrightarrow x_1)W_{\text e}(x_1\to x_0)t_k(x_0,\ldots,x_k)L_{\text e}(x_k\to x_{k-1}),$$</span> where <span class="math-container">$$t_k(x)=\prod_{i=2}^kg(x_{i-1}\leftrightarrow x_i)f_{\text s}(x_i\to x_{i-1}\to x_{i-2}),$$</span> and <span class="math-container">$h_j$</span> denote the image reconstruction filter of the <span class="math-container">$j$</span>th pixel so that the measurement <span class="math-container">$I_j$</span> of the <span class="math-container">$j$</span>th pixel color is given by <span class="math-container">$$I_j=\int h_jf\:{\rm d}\mu.$$</span></p>

<p>What can we assume know about <span class="math-container">$h_j$</span> in general? One thing is that it will only depend on first two vertices of a path.</p>

<p>There are two properties which I really would like to being able to assume: (a) <span class="math-container">$c:=\sup_j\left\|h_j\right\|&lt;\infty$</span> (b) <span class="math-container">$\int|g_j|^2\:{\rm d}\mu\le\alpha\int|f_0|^2\:{\rm d}\mu$</span> for some <span class="math-container">$\alpha\ge0$</span>, where <span class="math-container">$g_j:=1_{\{\:h_j\:&gt;\:0\:\}}\left(h_jf-\frac1{\mu\left(\left\{h_j&gt;0\right\}\right)}I_j\right)$</span> and <span class="math-container">$f_0:=1_{\{\:f\:\ne\:0\:\}}\left(f-\frac1{\mu\left(\left\{f\ne0\right\}\right)}\int f\:{\rm d}\mu\right)$</span>.</p>

<p>However, I know almost nothing about the mathematical properties of <span class="math-container">$h_j$</span> and so it's hard for me to verify if these properties hold. I guess that generally <span class="math-container">$h_j\ge0$</span>, but I'm even unsure about that. Maybe even <span class="math-container">$h_j\in[0,1]$</span>? It would be great if someone could answer if (a) and/or (b) hold or link me to a reference.</p>

CC BY-SA 4.0
2020-02-20T05:21:53.123Z
Technically you can pick it to be whatever you like. In practice it is a low-pass filter and the first requirement is obviously desirable. You cannot guarantee the second one for arbitrary $f$ and $h$. How did you come up with (b)?
lightxbulb
CC BY-SA 4.0
2020-02-20T05:34:27.913Z
(b) is closely related to the asymptotic variance of estimates of $I_j$. I've missed a constant on the right-hand side. Does it change your comment?
0xbadf00d
CC BY-SA 4.0
2020-02-20T05:48:48.597Z
With the $\alpha$ it's trivial if you can guarantee that $\exists \alpha, \forall x, \, |h_j(x)f(x) - I_j|^2 \leq \alpha |f(x) - \int f|^2$. Note that this may prove problematic only at points where the right hand-side is zero. So I guess you need some extra assumptions on $h$.
lightxbulb
CC BY-SA 4.0
2020-02-20T05:57:38.483Z
@lightxbulb Yes, that' clear. But, again, I'm lacking information on $h$. Can we say more if we assume that $h$ is a "Box filter"?
0xbadf00d
CC BY-SA 4.0
2020-02-20T06:05:55.590Z
If you can rewrite the reconstruction as convolution with a low pass filter, I believe you can use Young's theorem to get a bound. Sketch: $\|e * h\|^2_2 \leq \|e\|^2_2\|h\|^2_1$, if the 1-norm of $h$ is less or equal to 1 (should probably hold for your low pass filter), then you can bound the lhs by the 2-norm of $e$.
lightxbulb
CC BY-SA 4.0
2020-02-20T06:10:53.890Z
@lightxbulb What are $e$ and $h$ in your equation?
0xbadf00d
CC BY-SA 4.0
2020-02-20T06:17:45.313Z
Functions in $L^2$ and $L^1$. It's just an idea, I haven't looked into the details of applying this to your problem. But it solves a similar problem where $e = f - \int f$. I believe it should be applicable to your problem with a few more details taken care of.
lightxbulb
CC BY-SA 4.0
2020-02-20T10:04:49.553Z
@lightxbulb I'll think about that. Thanks. What's worrying me more at the moment is the scaling problem described here: https://computergraphics.stackexchange.com/q/9589/9254. I'm sure you know the answer to it. Would be great if you could take a look.
0xbadf00d
CC BY-SA 4.0
2020-02-21T09:50:31.370Z
@lightxbulb Wait a second. When $I_j$ is estimated using Metropolis Light Transport, is the filter being applied at all? From the pbrt implementation (see http://www.pbr-book.org/3ed-2018/Light_Transport_III_Bidirectional_Methods/Metropolis_Light_Transport.html#fragment-Splatbothcurrentandproposedsamplestomonofilm-0) this doesn't seem to be the case, since the samples are directly splatted to the single pixel corresponding to the raster position.
0xbadf00d
CC BY-SA 4.0
2020-02-21T09:50:37.833Z
@lightxbulb So, it seems like $h_j$ is simply $1$ if the ray from the camera to the first vertex has an intersection with the image plane corresponding to pixel $j$ and $0$ otherwise. Am I missing something?
0xbadf00d
CC BY-SA 4.0
2020-02-21T11:38:03.547Z
I haven't looked into PBRT in a while, let alone waddled through their implementation details, so I cannot answer your question. The questions you have, however, illustrates something notable about the PBRT book: it doesn't go into enough theoretical details - it's more of a book about how to implement the PBRT code, and not so much on the fundamentals of light transport. I would recommend reading the papers on MLT, rather than trying to reverse-engineer the theory from their code.
lightxbulb
CC BY-SA 4.0
2020-03-02T11:28:43.193Z
@lightxbulb I don't think that we can show (b) in its previous form, but I've managed to replace the desired inequality by an inequality in terms of the average over the filter support. Do you think we can show this now?
0xbadf00d
<raytracing><physically-based><global-illumination><monte-carlo><filtering>
Properties of the image reconstruction filter in rendering
0xbadf00d
# Properties of the image reconstruction filter in rendering

(Asked by: username_0 on 2020-02-19)

Let $f$ denote the measurement contribution function for paths of length $k\in\mathbb N$, i.e. $$f(x)=g(x\_0\leftrightarrow x\_1)W\_{\text e}(x\_1\to x\_0)t\_k(x\_0,\ldots,x\_k)L\_{\text e}(x\_k\to x\_{k-1}),$$ where $$t\_k(x)=\prod\_{i=2}^kg(x\_{i-1}\leftrightarrow x\_i)f\_{\text s}(x\_i\to x\_{i-1}\to x\_{i-2}),$$ and $h\_j$ denote the image reconstruction filter of the $j$th pixel so that the measurement $I\_j$ of the $j$th pixel color is given by $$I\_j=\int h\_jf\:{\rm d}\mu.$$

What can we assume know about $h\_j$ in general? One thing is that it will only depend on first two vertices of a path.

There are two properties which I really would like to being able to assume: (a) $c:=\sup\_j\left\|h\_j\right\|<\infty$ (b) $\int|g\_j|^2\:{\rm d}\mu\le\alpha\int|f\_0|^2\:{\rm d}\mu$ for some $\alpha\ge0$, where $g\_j:=1\_{\{\:h\_j\:>\:0\:\}}\left(h\_jf-\frac1{\mu\left(\left\{h\_j>0\right\}\right)}I\_j\right)$ and $f\_0:=1\_{\{\:f\:\ne\:0\:\}}\left(f-\frac1{\mu\left(\left\{f\ne0\right\}\right)}\int f\:{\rm d}\mu\right)$.

However, I know almost nothing about the mathematical properties of $h\_j$ and so it's hard for me to verify if these properties hold. I guess that generally $h\_j\ge0$, but I'm even unsure about that. Maybe even $h\_j\in[0,1]$? It would be great if someone could answer if (a) and/or (b) hold or link me to a reference.

**Tags:** raytracing, physically-based, global-illumination, monte-carlo, filtering

> **Comments:**
> **username_1**: Technically you can pick it to be whatever you like. In practice it is a low-pass filter and the first requirement is obviously desirable. You cannot guarantee the second one for arbitrary $f$ and $h$. How did you come up with (b)?  
> **username_0**: (b) is closely related to the asymptotic variance of estimates of $I_j$. I've missed a constant on the right-hand side. Does it change your comment?  
> **username_1**: With the $\alpha$ it's trivial if you can guarantee that $\exists \alpha, \forall x, \, |h_j(x)f(x) - I_j|^2 \leq \alpha |f(x) - \int f|^2$. Note that this may prove problematic only at points where the right hand-side is zero. So I guess you need some extra assumptions on $h$.  
> **username_0**: @username_1 Yes, that' clear. But, again, I'm lacking information on $h$. Can we say more if we assume that $h$ is a "Box filter"?  
> **username_1**: If you can rewrite the reconstruction as convolution with a low pass filter, I believe you can use Young's theorem to get a bound. Sketch: $\|e * h\|^2_2 \leq \|e\|^2_2\|h\|^2_1$, if the 1-norm of $h$ is less or equal to 1 (should probably hold for your low pass filter), then you can bound the lhs by the 2-norm of $e$.  
> **username_0**: @username_1 What are $e$ and $h$ in your equation?  
> **username_1**: Functions in $L^2$ and $L^1$. It's just an idea, I haven't looked into the details of applying this to your problem. But it solves a similar problem where $e = f - \int f$. I believe it should be applicable to your problem with a few more details taken care of.  
> **username_0**: @username_1 I'll think about that. Thanks. What's worrying me more at the moment is the scaling problem described here: https://computergraphics.stackexchange.com/q/9589/9254. I'm sure you know the answer to it. Would be great if you could take a look.  
> **username_0**: @username_1 Wait a second. When $I_j$ is estimated using Metropolis Light Transport, is the filter being applied at all? From the pbrt implementation (see http://www.pbr-book.org/3ed-2018/Light_Transport_III_Bidirectional_Methods/Metropolis_Light_Transport.html#fragment-Splatbothcurrentandproposedsamplestomonofilm-0) this doesn't seem to be the case, since the samples are directly splatted to the single pixel corresponding to the raster position.  
> **username_0**: @username_1 So, it seems like $h_j$ is simply $1$ if the ray from the camera to the first vertex has an intersection with the image plane corresponding to pixel $j$ and $0$ otherwise. Am I missing something?  
> **username_1**: I haven't looked into PBRT in a while, let alone waddled through their implementation details, so I cannot answer your question. The questions you have, however, illustrates something notable about the PBRT book: it doesn't go into enough theoretical details - it's more of a book about how to implement the PBRT code, and not so much on the fundamentals of light transport. I would recommend reading the papers on MLT, rather than trying to reverse-engineer the theory from their code.  
> **username_0**: @username_1 I don't think that we can show (b) in its previous form, but I've managed to replace the desired inequality by an inequality in terms of the average over the filter support. Do you think we can show this now?  

---

## 2 answers

### Answer by username_1 on 2020-03-02. Score: 1

I am replying to the last edit of the question.

You can show that $\|h\_j \* f \|^2\_2 \leq \|h\_j\|^2\_1\|f\|^2\_2$ from Young's theorem. Provided that $\|h\_j\|\_1 \leq 1$ you have: $\|h\_j \* f \|^2\_2 \leq \|f\|^2\_2$. Additionally for $g\_j$ I believe you want to clamp the indicator function to $\{h\_j > 0 \wedge f > 0\}$. Then $\int\_{\{h\_j>0 \wedge f>0\}} a\leq \int\_{\{f>0\}}a$ (since the integrands are always non-negative: $a\geq 0$). This basically proves that the inequality holds for the left terms of the quadratic expansions, the middle terms are both negative, so those may be ignored. The only thing left to prove is: $(\frac{1}{\mu(\{h\_j>0 \wedge f>0\})}\int h\_jf)^2 \leq (\frac{1}{\mu(\{f>0\})}\int f)^2$, which is the case if $h\_j \leq 1$ everywhere. Basically, as long as your filter $h\_j$ preserves the minimum and maximum of the image, you're good (this is not an unreasonable requirement for a filter, note however, that there are filers that do not preserve min-max).

Edit: My bad, the middle terms may not be ignored (at least the one on the right of the inequality). Which means you are left to prove that:

$$\frac{(\int h\_jf)^2}{\mu(\{h\_j>0 \wedge f>0\})} \geq \frac{(\int f)^2}{\mu(\{f>0\})}$$, which will be a problem.

I guess one has to use tighter bounds to relate the mixed term with the squared terms.

Edit 2:

Let's consider the expression as a whole then:

$$\int \left(h\_jf - \frac{\int h\_jf}{\mu(\{h\_j > 0 \wedge f > 0\})} \right)^2 \leq \alpha \int \left(f - \frac{\int f}{\mu(\{f > 0\})} \right)^2$$
$$ 0 \leq \alpha\int (f)^2 - \int (h\_jf)^2 +\alpha\frac{(\int f)^2}{\mu^2(\{f > 0\})} - \frac{(\int h\_jf)^2}{\mu^2(\{h\_j > 0 \wedge f > 0\})} + \frac{2(\int h\_jf)^2}{\mu(\{h\_j > 0 \wedge f > 0\})} - \alpha\frac{2(\int f)^2}{\mu(\{f > 0\})}$$
$$ 0 \leq \alpha\left(\int (f)^2 - \frac{(1-2\mu(\{f > 0\}))(\int f)^2}{\mu^2(\{f > 0\})}\right) - \left( \int (h\_jf)^2 - \frac{(1-2\mu(\{h\_j > 0 \wedge f > 0\}))(\int h\_jf)^2}{\mu^2(\{h\_j > 0 \wedge f > 0\})}\right) $$

$$0 \leq \left(\int(\sqrt{\alpha}f)^2-\int (h\_jf)^2\right) - \left(\frac{\alpha(1-2\mu(\{f > 0\}))(\int f)^2}{\mu^2(\{f > 0\})} - \frac{(1-2\mu(\{h\_j > 0 \wedge f > 0\}))(\int h\_jf)^2}{\mu^2(\{h\_j > 0 \wedge f > 0\})}\right) $$

$$0 \leq \left(\int(\sqrt{\alpha}f)^2-\int (h\_jf)^2\right) - \left(a \left(\int \sqrt{\alpha}f\right)^2 - b\left(\int h\_jf\right)^2\right)$$

Note also that $\left(\int u\right)^2 \leq \int u^2$. Then with an appropriate $\alpha$ and $h\_j$ bounded it should hold. You may want to study the $a,b$ tems also.

> **Comments:**
> **username_0**: Thank you for your answer. It would be enough for me to show (b) for the box filter with radius 1/2.  
> **username_0**: Regarding your "whole term equation": Note that it simplifies to $$\mu|h_jf|^2-\frac{|\mu(h_jf)|^2}{\mu(B_j)}\le\alpha\left[\mu|f|^2-\frac{|\mu f|^2}{\mu(B)}\right],$$ where $B:=\{f\ne0\}$, $B_j:=B\cap\{h_j>0\}$ and $\mu g:=\int g\:{\rm d}\mu$. And it might be useful to note that, if each $h_j$ is a box filter and hence takes only the values $0$ or $1$, we've got $|h_j|^2=h_j$.  
> **username_0**: And let me note that the aspect of (b) I'm looking for is that we can bound the left-hand side in terms of the variance of $f$.  So, the factor $\frac1{\mu(B)}$ before the integral in the definition of $f_0$ is not important for me.  
> **username_1**: If you set $a=b=1$, then $h_j \leq \sqrt{\alpha}$ is your requirement. But I believe you allow for $\alpha$ to be any, thus you just require for $h_j$ to never go to infinity (which holds for filters). Since it's also an integral, I would say that it's even ok for it to explode on sets of measure zero.  
> **username_0**: How do I need to read your equation lines? Are they meant to be equivalent to each other or are they meant to be implications (eq. 1 implies eq.2 and so on)? I begin to struggle what you did from (and including) the third equation on. Do you agree that your first equation is  equivalent to the one in my second comment?  
> **username_0**: And note that your claim "$\left(\int u\right)^2 \leq \int u^2$" is not correct, unless you normalize the measure over which you're taking the integrals.  
> **username_1**: The equations in the second edit are equivalent - it's just algebraic transformations. I have a meeting in a few minutes, so I cannot exactly go in details, but try writing it down ($a,b$ are just substitute variables).  
> **username_0**: Substitute variables for what?  
> **username_1**: The ugly fractions.  
> **username_0**: You've made a mistake in your third equation. The $\mu^2$ in the denominator should be a $\mu$. I guess you've pulled the corresponding term out of the integral and forgot to multiply it with the measure over which the integral is taken.  
> **username_1**: You mentioned that $(\int u)^2 \leq \int u^2$ doesn't have to hold. Do you have a reference for this? As far as I know Holder's inequality holds regardless of the normalization of the measure. I am not sure what the issue with $\mu^2$ is - or at least I cannot find the mistake. I haven't pulled anything out of the integral - I just took the common denominator so I could merge the terms.  
> **username_0**: Sure. You're using [Jensen's inequality](https://en.wikipedia.org/wiki/Jensen%27s_inequality#Measure-theoretic_and_probabilistic_form). Hölder's inequality is the same in this particular case. You cannot use it cause you would need to apply it for the second function to be the constant function $1$. Now you only need to note that the $p$-norm of the constant $1$ is equal to the measure of the entire space. So you we need to divide this factor out (hence normalize the measure) again.  
> **username_1**: Ok, got what you meant. Honestly, I would keep my measure normalized to avoid this, but in the alternate case I guess you would have to pop-out a constant out of the integrals. I don't think it should change much with respect to the conclusion though. Actually it should probably make the equation more symmetric.  
> **username_0**: Regarding the second part of your comment: Simply note that $$\int_{B_j}\left(\frac{\int h_jf}{\mu(B_j)} \right)^2\:{\rm d}\mu=\mu(B_j)\cdot\left(\frac{\int h_jf\:{\rm d}\mu}{\mu(B_j)} \right)^2.$$ Hence the square is canceled out. Doing this with the other term as well yields the equation in my second comment.  
> **username_0**: Finally, regarding your latest comment: Keeping the measure normalized might be problematic. Note that $\mu$ is *not* a finite measure (it is a $\sigma$-finite measure though); hence it cannot be normalized. However, it would be sufficient for the purpose of the question that the trace of $\mu$ on $\{f\ne0\}$ is finite (i.e. that $\mu(B)<\infty$). But I have no clue if we can assume this without loss of generality.  
> **username_1**: In practice your (a) and (b) should always hold (even without all of those arguments), provided that you assume $f < \infty$, and $h_j$ is min-max preserving. I am still unsure why you are considering any dimensions beyond the film ones though. Ideally I would just work with a function $g$ defined only on the film - then you do not even need to care about any of the above, and you can just work with assumptions on $g$.  
> **username_0**: But $f$ is not defined on the film. We can clearly use that $I_j=\int\sigma_M^{\otimes\{0,\:1\}}({\rm d}(x_0,x_1))h_j(x_0,x_1)\int\sigma_M^{\otimes\{2,\:\ldots\:,\:k\}}({\rm d}(x_2,\ldots,x_k))f(x_0,\ldots,f_k)$ (considering paths of length $k$ only), but I don't see how this simplifies the problem.  
> **username_1**: Consider the image function $g(x,y) = \int_{\Omega}W(x,y, \omega)L_i(x,y,\omega)\,d\omega$. This basically gives you the intensity at every point of the film. It's a lot nicer to work with - and as far as I got it, you only care about the vertex on the film (at least the filter does). Your problem reduces to an image processing problem through that simplification. Then you simply have $I_j = \int\int h_j(x,y)g(x,y)\,dx\,dy$.  
> **username_0**: The reason why I'm considering the path space is that my actual concern is slightly more complicated. First of all: Note that (and I missed that before) the inequality (b) in the question simply follows from the fact that if $X$ is a Hilbert space (say $H$) valued random variable on a probability space $(\Omega,\mathcal A,\operatorname P)$, then the function $H\ni x\mapsto\operatorname E\left[\left\|X-x\right\|_H^2\right]$ attains its minimum at $\operatorname E[X]$. Assuming $\lambda(B)\in(0,\infty)$, we only need to apply this fact to $X=f$ and $\operatorname P:=\frac{\lambda(1_Bf)}{λ(B)}$.  
> **username_1**: I lost you. I have no idea what you are trying to do anymore, or why. Random new details keep popping up in your formulation without rhyme or reason (at least from my perspective). What are you trying to do? Why do you need to consider the whole path space as opposed to just the image function? I believe these two questions are related, but seeing as I do not get what your end goal is, it's hard to help even if I want to.  

---

### Answer by username_2 on 2020-11-27. Score: 0

The function $h\_j$ is going to be a low-pass filter of some type. Its role is to turn the infinite-resolution image $f$ into a band-limited one so that it can be sampled to produce pixel values without aliasing. Typical shapes for $h\_j$ in practice could be like a box, tent, bicubic, or Gaussian function.

Such a filter would generally be expected to have the following properties:

* Defined over the image plane, $h\_j: \mathbb{R}^2 \to \mathbb{R}$
* Is an area density, i.e. has units of inverse area (and scales accordingly under changes of coordinates)
* Compactly supported, with its region of support commensurate with the pixel spacing (typically having a radius of 1–2 pixels in all directions)
* Smooth, or at least piecewise smooth
* Finite-valued
* Integrates to 1, $\int\_{\mathbb{R}^2} h\_j(x) \, dx^2 = 1$
* The filters for different pixels $j$ differ only by translation, $h\_j(x) = h(x - x\_j)$ where $h$ is the filter centered at 0, and $x\_j$ is the center of the $j$th pixel.
* Symmetric, $h(-x) = h(x)$
* Factors into 1D filters along the x and y axes, $h(x, y) = h(x)h(y)$

(The last three properties might not be true for some exotic cases, such as rendering to a curved or nonlinearly warped display, but would be expected to hold for rendering an ordinary 2D image.)

You'll note one property I didn't mention was $h\_j \geq 0$. That's because it is actually convenient to use filters with negative lobes sometimes, as they can improve image sharpness. See for example the [Mitchell–Netravali filters](https://en.wikipedia.org/wiki/Mitchell-Netravali_filters). Nor do we necessarily have $h\_j \leq 1$ everywhere. Actually the values of $h\_j$ depend on the coordinate system, since it's an area density, so a statement like $h\_j \leq 1$ is meaningless without specifying some particular coordinates.

Regarding your properties, for (a), yes the norm of the filter should be bounded. As mentioned, the filter integrates to 1. Without negative lobes, the 1-norm of the filter should be exactly 1. The 1-norm of a filter with negative lobes would be expected to be somewhat greater than 1 but still finite.

For property (b), I'm not 100% sure but I think that this is indeed guaranteed by the fact that $h\_j$ is (piecewise) smooth and has a support that doesn't get arbitrarily small. The size of the filter is on the order of the pixel spacing (otherwise it doesn't work for antialiasing), so the variance within a single pixel's filter footprint can't be much more than (variance of entire image \* number of pixels). You could probably formalize that with Chebyshev's inequality or some such.


---

