-
Notifications
You must be signed in to change notification settings - Fork 0
/
guidedfilter.h
executable file
·53 lines (44 loc) · 1.49 KB
/
guidedfilter.h
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
48
49
50
51
52
53
/**
* This code has been adapted from:
* https://github.com/acstacey/GLFCV
* Copyright (c) 2017 Adam Stacey
* to use the OpenCV CUDA API.
*
* It implements the guided filter by Kaiming He (http://kaiminghe.com/eccv10/)
*
*/
/**
* gfcuda - Using pybind11 to generate a binding that implement guided filter with opencv and cuda.
*
* Copyright (C) 2020 TracelessLe
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef GUIDED_FILTER_H
#define GUIDED_FILTER_H
#include <opencv2/opencv.hpp>
class GuidedFilterImpl;
class GuidedFilter {
public:
GuidedFilter(const cv::cuda::GpuMat &I, int r, double eps);
~GuidedFilter();
cv::cuda::GpuMat filter(const cv::cuda::GpuMat &p, int depth = -1) const;
private:
GuidedFilterImpl *impl_;
};
cv::Mat guidedFilter(const cv::Mat &I,
const cv::Mat &p, int r,
double eps, int depth = -1);
#endif