Blender V5.3
COM_algorithm_morphological_blur.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include <cstdint>
8
9#include "BLI_math_filter.hh"
11
12#include "COM_context.hh"
13#include "COM_result.hh"
14
15namespace blender::compositor {
16
17/* Possible morphological operations to apply. */
19 /* Dilate by taking the maximum from the original input and the blurred input. Which means the
20 * whites bleeds into the blacks while the blacks don't bleed into the whites. */
22 /* Erode by taking the minimum from the original input and the blurred input. Which means the
23 * blacks bleeds into the whites while the whites don't bleed into the blacks. */
25};
26
27/* Applies a morphological blur on input using the given radius and filter type. This essentially
28 * applies a standard blur operation, but then takes the maximum or minimum from the original input
29 * and blurred input depending on the chosen operation, see the MorphologicalBlurOperation enum for
30 * more information. The output is written to the given output result, which will be allocated
31 * internally and is thus expected not to be previously allocated. */
32void morphological_blur(
33 Context &context,
34 const Result &input,
35 Result &output,
36 const float2 &radius,
37 const MorphologicalBlurOperation operation = MorphologicalBlurOperation::Erode,
39
40} // namespace blender::compositor
#define output
VecBase< float, 2 > float2
unsigned char uint8_t
Definition BKE_text.h:79