bilinear_filter#
- class deepinv.physics.blur.bilinear_filter(factor=2)[source]#
Bases:
Bilinear filter.
It has size (2*factor, 2*factor) and is defined as
\[\begin{split}\begin{equation*} w(x, y) = \begin{cases} (1 - |x|) \cdot (1 - |y|) & \text{if } |x| \leq 1 \text{ and } |y| \leq 1 \\ 0 & \text{otherwise} \end{cases} \end{equation*}\end{split}\]for \(x, y \in {-\text{factor} + 0.5, -\text{factor} + 0.5 + 1/\text{factor}, \ldots, \text{factor} - 0.5}\).
- Parameters:
factor (int) – downsampling factor