blob: 67d5640953dcb56cb54210c006a0e32b5edbbe22 [file] [log] [blame]
Yash Chainani5458dea2022-06-29 21:05:02 -07001/**
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#include <opencv2/core.hpp>
18
19namespace cv {
20
21// Gaussian 2D convolution
22void gaussian_2D_convolutionV2(const cv::Mat& src, cv::Mat& dst, int ksize_x,
23 int ksize_y, float sigma);
24
25// Diffusivity functions
26void pm_g1V2(const cv::Mat& Lx, const cv::Mat& Ly, cv::Mat& dst, float k);
27void pm_g2V2(const cv::Mat& Lx, const cv::Mat& Ly, cv::Mat& dst, float k);
28void weickert_diffusivityV2(const cv::Mat& Lx, const cv::Mat& Ly, cv::Mat& dst,
29 float k);
30void charbonnier_diffusivityV2(const cv::Mat& Lx, const cv::Mat& Ly,
31 cv::Mat& dst, float k);
32
33float compute_k_percentileV2(const cv::Mat& Lx, const cv::Mat& Ly, float perc,
34 cv::Mat& modgs, cv::Mat& hist);
35
36// Image derivatives
37void compute_scharr_derivative_kernelsV2(cv::OutputArray _kx,
38 cv::OutputArray _ky, int dx, int dy,
39 int scale);
40void image_derivatives_scharrV2(const cv::Mat& src, cv::Mat& dst, int xorder,
41 int yorder);
42
43// Nonlinear diffusion filtering scalar step
44void nld_step_scalarV2(const cv::Mat& Ld, const cv::Mat& c, cv::Mat& Lstep);
45
46// For non-maxima suppresion
47bool check_maximum_neighbourhoodV2(const cv::Mat& img, int dsize, float value,
48 int row, int col, bool same_img);
49
50// Image downsampling
51void halfsample_imageV2(const cv::Mat& src, cv::Mat& dst);
52
53} // namespace cv
54
55#endif