MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ filter_separable() [2/2]

MAYAFLUX_API std::vector< float > MayaFlux::Kinesis::Vision::filter_separable ( std::span< const float >  src,
uint32_t  w,
uint32_t  h,
std::span< const float >  kernel_x,
std::span< const float >  kernel_y 
)

Apply a separable 2D filter via two 1D passes.

Applies kernel_x horizontally then kernel_y vertically. Both kernels are applied with clamp-to-edge border handling.

Parameters
srcSingle-channel float span, size must be w * h.
wImage width in pixels.
hImage height in pixels.
kernel_xHorizontal 1D kernel. Length must be odd.
kernel_yVertical 1D kernel. Length must be odd.
Returns
Filtered float vector of length w * h.

Definition at line 489 of file ImageFilter.cpp.

492{
493 const size_t n = static_cast<size_t>(w) * h;
494 std::vector<float> tmp(n);
495 std::vector<float> out(n);
496 filter_separable(src, tmp, out, w, h, kernel_x, kernel_y);
497 return out;
498}
uint32_t h
Definition InkPress.cpp:28
std::vector< float > filter_separable(std::span< const float > src, uint32_t w, uint32_t h, std::span< const float > kernel_x, std::span< const float > kernel_y)
Apply a separable 2D filter via two 1D passes.

References filter_separable(), and h.

Referenced by filter_separable(), gaussian_blur(), and MayaFlux::Kinesis::Vision::VisionExecutor::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: