Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/features2d/src/kaze/nldiffusion_functions.h
16337 views
1
/**
2
* @file nldiffusion_functions.h
3
* @brief Functions for non-linear diffusion applications:
4
* 2D Gaussian Derivatives
5
* Perona and Malik conductivity equations
6
* Perona and Malik evolution
7
* @date Dec 27, 2011
8
* @author Pablo F. Alcantarilla
9
*/
10
11
#ifndef __OPENCV_FEATURES_2D_NLDIFFUSION_FUNCTIONS_H__
12
#define __OPENCV_FEATURES_2D_NLDIFFUSION_FUNCTIONS_H__
13
14
/* ************************************************************************* */
15
// Declaration of functions
16
17
namespace cv
18
{
19
20
// Gaussian 2D convolution
21
void gaussian_2D_convolution(const cv::Mat& src, cv::Mat& dst, int ksize_x, int ksize_y, float sigma);
22
23
// Diffusivity functions
24
void pm_g1(InputArray Lx, InputArray Ly, OutputArray dst, float k);
25
void pm_g2(InputArray Lx, InputArray Ly, OutputArray dst, float k);
26
void weickert_diffusivity(InputArray Lx, InputArray Ly, OutputArray dst, float k);
27
void charbonnier_diffusivity(InputArray Lx, InputArray Ly, OutputArray dst, float k);
28
29
float compute_k_percentile(const cv::Mat& img, float perc, float gscale, int nbins, int ksize_x, int ksize_y);
30
31
// Image derivatives
32
void compute_scharr_derivatives(const cv::Mat& src, cv::Mat& dst, int xorder, int yorder, int scale);
33
void compute_derivative_kernels(cv::OutputArray _kx, cv::OutputArray _ky, int dx, int dy, int scale);
34
void image_derivatives_scharr(const cv::Mat& src, cv::Mat& dst, int xorder, int yorder);
35
36
// Nonlinear diffusion filtering scalar step
37
void nld_step_scalar(cv::Mat& Ld, const cv::Mat& c, cv::Mat& Lstep, float stepsize);
38
39
// For non-maxima suppresion
40
bool check_maximum_neighbourhood(const cv::Mat& img, int dsize, float value, int row, int col, bool same_img);
41
42
// Image downsampling
43
void halfsample_image(const cv::Mat& src, cv::Mat& dst);
44
45
}
46
47
#endif
48
49