forked from hybridgroup/gocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filters.h
38 lines (31 loc) · 1.19 KB
/
filters.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
#ifndef _GOCV_CUDA_FILTERS_H_
#define _GOCV_CUDA_FILTERS_H_
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
#include <opencv2/opencv.hpp>
#include <opencv2/cudafilters.hpp>
extern "C" {
#endif
#include "cuda.h"
#ifdef __cplusplus
typedef cv::Ptr<cv::cuda::Filter>* GaussianFilter;
typedef cv::Ptr<cv::cuda::Filter>* SobelFilter;
#else
typedef void* GaussianFilter;
typedef void* SobelFilter;
#endif
// GaussianFilter
GaussianFilter CreateGaussianFilter(int srcType, int dstType, Size ksize, double sigma1);
GaussianFilter CreateGaussianFilterWithParams(int srcType, int dstType, Size ksize, double sigma1, double sigma2, int rowBorderMode, int columnBorderMode);
void GaussianFilter_Close(GaussianFilter gf);
void GaussianFilter_Apply(GaussianFilter gf, GpuMat img, GpuMat dst, Stream s);
// SobelFilter
SobelFilter CreateSobelFilter(int srcType, int dstType, int dx, int dy);
SobelFilter CreateSobelFilterWithParams(int srcType, int dstType, int dx, int dy, int ksize, double scale, int rowBorderMode, int columnBorderMode);
void SobelFilter_Close(SobelFilter sf);
void SobelFilter_Apply(SobelFilter sf, GpuMat img, GpuMat dst, Stream s);
#ifdef __cplusplus
}
#endif
#endif //_GOCV_CUDA_FILTERS_H_