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