Blame view

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