forked from hybridgroup/gocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imgproc.h
57 lines (48 loc) · 2.31 KB
/
imgproc.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
54
55
56
57
#ifndef _OPENCV3_CUDA_IMGPROC_H_
#define _OPENCV3_CUDA_IMGPROC_H_
#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
#include <opencv2/opencv.hpp>
#include <opencv2/cudaimgproc.hpp>
#include <opencv2/cudaarithm.hpp>
extern "C" {
#endif
#include "cuda.h"
#ifdef __cplusplus
typedef cv::Ptr<cv::cuda::CannyEdgeDetector>* CannyEdgeDetector;
typedef cv::Ptr<cv::cuda::HoughLinesDetector>* HoughLinesDetector;
typedef cv::Ptr<cv::cuda::HoughSegmentDetector>* HoughSegmentDetector;
#else
typedef void* CannyEdgeDetector;
typedef void* HoughLinesDetector;
typedef void* HoughSegmentDetector;
#endif
// standalone functions
void GpuCvtColor(GpuMat src, GpuMat dst, int code, Stream s);
// CannyEdgeDetector
CannyEdgeDetector CreateCannyEdgeDetector(double lowThresh, double highThresh);
CannyEdgeDetector CreateCannyEdgeDetectorWithParams(double lowThresh, double highThresh, int appertureSize, bool L2gradient);
void CannyEdgeDetector_Close(CannyEdgeDetector det);
void CannyEdgeDetector_Detect(CannyEdgeDetector det, GpuMat img, GpuMat dst, Stream s);
int CannyEdgeDetector_GetAppertureSize(CannyEdgeDetector det);
double CannyEdgeDetector_GetHighThreshold(CannyEdgeDetector det);
bool CannyEdgeDetector_GetL2Gradient(CannyEdgeDetector det);
double CannyEdgeDetector_GetLowThreshold(CannyEdgeDetector det);
void CannyEdgeDetector_SetAppertureSize(CannyEdgeDetector det, int appertureSize);
void CannyEdgeDetector_SetHighThreshold(CannyEdgeDetector det, double highThresh);
void CannyEdgeDetector_SetL2Gradient(CannyEdgeDetector det, bool L2gradient);
void CannyEdgeDetector_SetLowThreshold(CannyEdgeDetector det, double lowThresh);
// HoughLinesDetector
HoughLinesDetector HoughLinesDetector_Create(double rho, double theta, int threshold);
HoughLinesDetector HoughLinesDetector_CreateWithParams(double rho, double theta, int threshold, bool sort, int maxlines);
void HoughLinesDetector_Close(HoughLinesDetector hld);
void HoughLinesDetector_Detect(HoughLinesDetector hld, GpuMat img, GpuMat dst, Stream s);
// HoughSegmentDetector
HoughSegmentDetector HoughSegmentDetector_Create(double rho, double theta, int minLineLength, int maxLineGap);
void HoughSegmentDetector_Close(HoughSegmentDetector hsd);
void HoughSegmentDetector_Detect(HoughSegmentDetector hsd, GpuMat img, GpuMat dst, Stream s);
#ifdef __cplusplus
}
#endif
#endif //_OPENCV3_CUDA_IMGPROC_H_