Blender
V5.3
source
blender
compositor
algorithms
COM_algorithm_deriche_gaussian_blur.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2024 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
BLI_math_vector_types.hh
"
8
9
#include "
COM_context.hh
"
10
#include "
COM_result.hh
"
11
12
namespace
blender::compositor
{
13
14
/* Blur the input using a fourth order IIR filter approximating a Gaussian filter of the given
15
* sigma computed using Deriche's design method. This is based on the following paper:
16
*
17
* Deriche, Rachid. Recursively implementating the Gaussian and its derivatives. Diss. INRIA,
18
* 1993.
19
*
20
* This differs from the standard symmetric separable blur algorithm in that it is faster for high
21
* sigma values, the downside is that it consumes more memory and is only an approximation that
22
* might suffer from fringing and artifacts, though those are typically unnoticeable. This filter
23
* is numerically unstable and not accurate for sigma values larger than 32, in those cases, use
24
* the Van Vliet filter instead. Further, for sigma values less than 3, use direct convolution
25
* instead, since it is faster and more accurate. Neumann boundary is assumed.
26
*
27
* If extend_bounds is true, the input will be zero padded by radius amount of pixels.
28
*
29
* The output is written to the given output result, which will be allocated internally and is thus
30
* expected not to be previously allocated. */
31
void
deriche_gaussian_blur
(
Context
&context,
32
const
Result
&input,
33
Result
&
output
,
34
const
float2
&sigma,
35
const
bool
extend_bounds);
36
37
}
// namespace blender::compositor
BLI_math_vector_types.hh
COM_context.hh
COM_result.hh
output
#define output
blender::compositor::Context
Definition
COM_context.hh:53
blender::compositor::Result
Definition
COM_result.hh:125
blender::compositor
Definition
BKE_node.hh:77
blender::compositor::deriche_gaussian_blur
void deriche_gaussian_blur(Context &context, const Result &input, Result &output, const float2 &sigma, const bool extend_bounds)
Definition
deriche_gaussian_blur.cc:268
blender::gpu::shader::metadata::float2
@ float2
Definition
metadata.hh:72
Generated on
for Blender by
doxygen
1.18.0