Boost GIL


Functions
ImageProcessingMath

Math operations for IP algorithms. More...

Functions

double lanczos (double x, std::ptrdiff_t a)
 Lanczos response at point xLanczos response is defined as: x == 0: 1 -a < x && x < a: 0 otherwise: normalized_sinc(x) / normalized_sinc(x / a)
 
template<typename T = float, typename Allocator = std::allocator<T>>
detail::kernel_2d< T, Allocator > generate_normalized_mean (std::size_t side_length)
 Generate mean kernelFills supplied view with normalized mean in which all entries will be equal to. More...
 
template<typename T = float, typename Allocator = std::allocator<T>>
detail::kernel_2d< T, Allocator > generate_unnormalized_mean (std::size_t side_length)
 Generate kernel with all 1sFills supplied view with 1s (ones)
 
template<typename T = float, typename Allocator = std::allocator<T>>
detail::kernel_2d< T, Allocator > generate_gaussian_kernel (std::size_t side_length, double sigma)
 Generate Gaussian kernelFills supplied view with values taken from Gaussian distribution. See https://en.wikipedia.org/wiki/Gaussian_blur.
 
template<typename T = float, typename Allocator = std::allocator<T>>
detail::kernel_2d< T, Allocator > generate_dx_sobel (unsigned int degree=1)
 Generates Sobel operator in horizontal directionGenerates a kernel which will represent Sobel operator in horizontal direction of specified degree (no need to convolve multiple times to obtain the desired degree). https://www.researchgate.net/publication/239398674_An_Isotropic_3_3_Image_Gradient_Operator.
 
template<typename T = float, typename Allocator = std::allocator<T>>
detail::kernel_2d< T, Allocator > generate_dx_scharr (unsigned int degree=1)
 Generate Scharr operator in horizontal directionGenerates a kernel which will represent Scharr operator in horizontal direction of specified degree (no need to convolve multiple times to obtain the desired degree). https://www.researchgate.net/profile/Hanno_Scharr/publication/220955743_Optimal_Filters_for_Extended_Optical_Flow/links/004635151972eda98f000000/Optimal-Filters-for-Extended-Optical-Flow.pdf.
 
template<typename T = float, typename Allocator = std::allocator<T>>
detail::kernel_2d< T, Allocator > generate_dy_sobel (unsigned int degree=1)
 Generates Sobel operator in vertical directionGenerates a kernel which will represent Sobel operator in vertical direction of specified degree (no need to convolve multiple times to obtain the desired degree). https://www.researchgate.net/publication/239398674_An_Isotropic_3_3_Image_Gradient_Operator.
 
template<typename T = float, typename Allocator = std::allocator<T>>
detail::kernel_2d< T, Allocator > generate_dy_scharr (unsigned int degree=1)
 Generate Scharr operator in vertical directionGenerates a kernel which will represent Scharr operator in vertical direction of specified degree (no need to convolve multiple times to obtain the desired degree). https://www.researchgate.net/profile/Hanno_Scharr/publication/220955743_Optimal_Filters_for_Extended_Optical_Flow/links/004635151972eda98f000000/Optimal-Filters-for-Extended-Optical-Flow.pdf.
 
template<typename GradientView , typename OutputView >
void compute_hessian_entries (GradientView dx, GradientView dy, OutputView ddxx, OutputView dxdy, OutputView ddyy)
 Compute xy gradient, and second order x and y gradientsHessian matrix is defined as a matrix of partial derivates for 2d case, it is [[ddxx, dxdy], [dxdy, ddyy]. d stands for derivative, and x or y stand for direction. For example, dx stands for derivative (gradient) in horizontal direction, and ddxx means second order derivative in horizon direction https://en.wikipedia.org/wiki/Hessian_matrix.
 

Detailed Description

Math operations for IP algorithms.

This is mostly handful of mathemtical operations that are required by other image processing algorithms

Normalized cardinal sine

normalized_sinc(x) = sin(pi * x) / (pi * x)

Function Documentation

◆ generate_normalized_mean()

detail::kernel_2d<T, Allocator> boost::gil::generate_normalized_mean ( std::size_t  side_length)
inline

Generate mean kernelFills supplied view with normalized mean in which all entries will be equal to.

1 / (dst.size())