dicfilter.hpp

Source: src/pyvale/dic/cpp/dicfilter.hpp.

Functions

void apply_filter(Image &img, int kernel_size, double sigma)

Apply a Gaussian filter to image.

Converts integer images to float32. Float32 and float64 images retain their input precision. The filter is applied using separable horizontal and vertical Gaussian convolutions.

Parameters:
  • img – [inout] Image to filter.

  • kernel_size – [in] Odd Gaussian kernel size (e.g. 3, 5, 7).

  • sigma – [in] Gaussian standard deviation (> 0).

Throws:

std::runtime_error – If kernel_size is even or sigma is not positive.