forked from hybridgroup/gocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimgproc.h
147 lines (138 loc) · 10.1 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#ifndef _OPENCV3_IMGPROC_H_
#define _OPENCV3_IMGPROC_H_
#include <stdbool.h>
#ifdef __cplusplus
#include <opencv2/opencv.hpp>
extern "C" {
#endif
#ifdef __cplusplus
typedef cv::Ptr<cv::CLAHE>* CLAHE;
#else
typedef void* CLAHE;
#endif
#include "core.h"
DLL_EXPORT double ArcLength(PointVector curve, bool is_closed);
DLL_EXPORT PointVector ApproxPolyDP(PointVector curve, double epsilon, bool closed);
DLL_EXPORT void CvtColor(Mat src, Mat dst, int code);
DLL_EXPORT void EqualizeHist(Mat src, Mat dst);
DLL_EXPORT void CalcHist(struct Mats mats, IntVector chans, Mat mask, Mat hist, IntVector sz, FloatVector rng, bool acc);
DLL_EXPORT void CalcBackProject(struct Mats mats, IntVector chans, Mat hist, Mat backProject, FloatVector rng, bool uniform);
DLL_EXPORT double CompareHist(Mat hist1, Mat hist2, int method);
DLL_EXPORT void ConvexHull(PointVector points, Mat hull, bool clockwise, bool returnPoints);
DLL_EXPORT void ConvexityDefects(PointVector points, Mat hull, Mat result);
DLL_EXPORT void BilateralFilter(Mat src, Mat dst, int d, double sc, double ss);
DLL_EXPORT void Blur(Mat src, Mat dst, Size ps);
DLL_EXPORT void BoxFilter(Mat src, Mat dst, int ddepth, Size ps);
DLL_EXPORT void SqBoxFilter(Mat src, Mat dst, int ddepth, Size ps);
DLL_EXPORT void Dilate(Mat src, Mat dst, Mat kernel);
DLL_EXPORT void DilateWithParams(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType, Scalar borderValue);
DLL_EXPORT void DistanceTransform(Mat src, Mat dst, Mat labels, int distanceType, int maskSize, int labelType);
DLL_EXPORT void Erode(Mat src, Mat dst, Mat kernel);
DLL_EXPORT void ErodeWithParams(Mat src, Mat dst, Mat kernel, Point anchor, int iterations, int borderType);
DLL_EXPORT void MatchTemplate(Mat image, Mat templ, Mat result, int method, Mat mask);
DLL_EXPORT struct Moment Moments(Mat src, bool binaryImage);
DLL_EXPORT void PyrDown(Mat src, Mat dst, Size dstsize, int borderType);
DLL_EXPORT void PyrUp(Mat src, Mat dst, Size dstsize, int borderType);
DLL_EXPORT struct Rect BoundingRect(PointVector pts);
DLL_EXPORT void BoxPoints(RotatedRect rect, Mat boxPts);
DLL_EXPORT double ContourArea(PointVector pts);
DLL_EXPORT struct RotatedRect MinAreaRect(PointVector pts);
DLL_EXPORT struct RotatedRect FitEllipse(PointVector pts);
DLL_EXPORT void MinEnclosingCircle(PointVector pts, Point2f* center, float* radius);
DLL_EXPORT PointsVector FindContours(Mat src, Mat hierarchy, int mode, int method);
DLL_EXPORT double PointPolygonTest(PointVector pts, Point pt, bool measureDist);
DLL_EXPORT int ConnectedComponents(Mat src, Mat dst, int connectivity, int ltype, int ccltype);
DLL_EXPORT int ConnectedComponentsWithStats(Mat src, Mat labels, Mat stats, Mat centroids, int connectivity, int ltype, int ccltype);
DLL_EXPORT void GaussianBlur(Mat src, Mat dst, Size ps, double sX, double sY, int bt);
DLL_EXPORT Mat GetGaussianKernel(int ksize, double sigma, int ktype);
DLL_EXPORT void Laplacian(Mat src, Mat dst, int dDepth, int kSize, double scale, double delta, int borderType);
DLL_EXPORT void Scharr(Mat src, Mat dst, int dDepth, int dx, int dy, double scale, double delta,
int borderType);
DLL_EXPORT Mat GetStructuringElement(int shape, Size ksize);
DLL_EXPORT Scalar MorphologyDefaultBorderValue();
DLL_EXPORT void MorphologyEx(Mat src, Mat dst, int op, Mat kernel);
DLL_EXPORT void MorphologyExWithParams(Mat src, Mat dst, int op, Mat kernel, Point pt, int iterations, int borderType);
DLL_EXPORT void MedianBlur(Mat src, Mat dst, int ksize);
DLL_EXPORT void Canny(Mat src, Mat edges, double t1, double t2);
DLL_EXPORT void CornerSubPix(Mat img, Mat corners, Size winSize, Size zeroZone, TermCriteria criteria);
DLL_EXPORT void GoodFeaturesToTrack(Mat img, Mat corners, int maxCorners, double quality, double minDist);
DLL_EXPORT void GrabCut(Mat img, Mat mask, Rect rect, Mat bgdModel, Mat fgdModel, int iterCount, int mode);
DLL_EXPORT void HoughCircles(Mat src, Mat circles, int method, double dp, double minDist);
DLL_EXPORT void HoughCirclesWithParams(Mat src, Mat circles, int method, double dp, double minDist,
double param1, double param2, int minRadius, int maxRadius);
DLL_EXPORT void HoughLines(Mat src, Mat lines, double rho, double theta, int threshold);
DLL_EXPORT void HoughLinesP(Mat src, Mat lines, double rho, double theta, int threshold);
DLL_EXPORT void HoughLinesPWithParams(Mat src, Mat lines, double rho, double theta, int threshold, double minLineLength, double maxLineGap);
DLL_EXPORT void HoughLinesPointSet(Mat points, Mat lines, int lines_max, int threshold,
double min_rho, double max_rho, double rho_step,
double min_theta, double max_theta, double theta_step);
DLL_EXPORT void Integral(Mat src, Mat sum, Mat sqsum, Mat tilted);
DLL_EXPORT double Threshold(Mat src, Mat dst, double thresh, double maxvalue, int typ);
DLL_EXPORT void AdaptiveThreshold(Mat src, Mat dst, double maxValue, int adaptiveTyp, int typ, int blockSize,
double c);
DLL_EXPORT void ArrowedLine(Mat img, Point pt1, Point pt2, Scalar color, int thickness);
DLL_EXPORT void Circle(Mat img, Point center, int radius, Scalar color, int thickness);
DLL_EXPORT void CircleWithParams(Mat img, Point center, int radius, Scalar color, int thickness, int lineType, int shift);
DLL_EXPORT void Ellipse(Mat img, Point center, Point axes, double angle, double
startAngle, double endAngle, Scalar color, int thickness);
DLL_EXPORT void EllipseWithParams(Mat img, Point center, Point axes, double angle, double
startAngle, double endAngle, Scalar color, int thickness, int lineType, int shift);
DLL_EXPORT void Line(Mat img, Point pt1, Point pt2, Scalar color, int thickness);
DLL_EXPORT void Rectangle(Mat img, Rect rect, Scalar color, int thickness);
DLL_EXPORT void RectangleWithParams(Mat img, Rect rect, Scalar color, int thickness, int lineType, int shift);
DLL_EXPORT void FillPoly(Mat img, PointsVector points, Scalar color);
DLL_EXPORT void FillPolyWithParams(Mat img, PointsVector points, Scalar color, int lineType, int shift, Point offset);
DLL_EXPORT void Polylines(Mat img, PointsVector points, bool isClosed, Scalar color, int thickness);
DLL_EXPORT struct Size GetTextSize(const char* text, int fontFace, double fontScale, int thickness);
DLL_EXPORT struct Size GetTextSizeWithBaseline(const char* text, int fontFace, double fontScale, int thickness, int* baseline);
DLL_EXPORT void PutText(Mat img, const char* text, Point org, int fontFace, double fontScale,
Scalar color, int thickness);
DLL_EXPORT void PutTextWithParams(Mat img, const char* text, Point org, int fontFace, double fontScale,
Scalar color, int thickness, int lineType, bool bottomLeftOrigin);
DLL_EXPORT void Resize(Mat src, Mat dst, Size sz, double fx, double fy, int interp);
DLL_EXPORT void GetRectSubPix(Mat src, Size patchSize, Point center, Mat dst);
DLL_EXPORT Mat GetRotationMatrix2D(Point center, double angle, double scale);
DLL_EXPORT void WarpAffine(Mat src, Mat dst, Mat rot_mat, Size dsize);
DLL_EXPORT void WarpAffineWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode,
Scalar borderValue);
DLL_EXPORT void WarpPerspective(Mat src, Mat dst, Mat m, Size dsize);
DLL_EXPORT void WarpPerspectiveWithParams(Mat src, Mat dst, Mat rot_mat, Size dsize, int flags, int borderMode,
Scalar borderValue);
DLL_EXPORT void Watershed(Mat image, Mat markers);
DLL_EXPORT void ApplyColorMap(Mat src, Mat dst, int colormap);
DLL_EXPORT void ApplyCustomColorMap(Mat src, Mat dst, Mat colormap);
DLL_EXPORT Mat GetPerspectiveTransform(PointVector src, PointVector dst);
DLL_EXPORT Mat GetPerspectiveTransform2f(Point2fVector src, Point2fVector dst);
DLL_EXPORT Mat GetAffineTransform(PointVector src, PointVector dst);
DLL_EXPORT Mat GetAffineTransform2f(Point2fVector src, Point2fVector dst);
DLL_EXPORT Mat FindHomography(Mat src, Mat dst, int method, double ransacReprojThreshold, Mat mask, const int maxIters, const double confidence) ;
DLL_EXPORT void DrawContours(Mat src, PointsVector contours, int contourIdx, Scalar color, int thickness);
DLL_EXPORT void DrawContoursWithParams(Mat src, PointsVector contours, int contourIdx, Scalar color, int thickness, int lineType, Mat hierarchy, int maxLevel, Point offset);
DLL_EXPORT void Sobel(Mat src, Mat dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType);
DLL_EXPORT void SpatialGradient(Mat src, Mat dx, Mat dy, int ksize, int borderType);
DLL_EXPORT void Remap(Mat src, Mat dst, Mat map1, Mat map2, int interpolation, int borderMode, Scalar borderValue);
DLL_EXPORT void Filter2D(Mat src, Mat dst, int ddepth, Mat kernel, Point anchor, double delta, int borderType);
DLL_EXPORT void SepFilter2D(Mat src, Mat dst, int ddepth, Mat kernelX, Mat kernelY, Point anchor, double delta, int borderType);
DLL_EXPORT void LogPolar(Mat src, Mat dst, Point center, double m, int flags);
DLL_EXPORT void FitLine(PointVector pts, Mat line, int distType, double param, double reps, double aeps);
DLL_EXPORT void LinearPolar(Mat src, Mat dst, Point center, double maxRadius, int flags);
DLL_EXPORT double MatchShapes(PointVector contour1, PointVector contour2, int method, double parameter);
DLL_EXPORT bool ClipLine(Size imgSize, Point pt1, Point pt2);
DLL_EXPORT CLAHE CLAHE_Create();
DLL_EXPORT CLAHE CLAHE_CreateWithParams(double clipLimit, Size tileGridSize);
DLL_EXPORT void CLAHE_Close(CLAHE c);
DLL_EXPORT void CLAHE_Apply(CLAHE c, Mat src, Mat dst);
DLL_EXPORT void InvertAffineTransform(Mat src, Mat dst);
DLL_EXPORT Point2f PhaseCorrelate(Mat src1, Mat src2, Mat window, double* response);
DLL_EXPORT void Mat_Accumulate(Mat src, Mat dst);
DLL_EXPORT void Mat_AccumulateWithMask(Mat src, Mat dst, Mat mask);
DLL_EXPORT void Mat_AccumulateSquare(Mat src, Mat dst);
DLL_EXPORT void Mat_AccumulateSquareWithMask(Mat src, Mat dst, Mat mask);
DLL_EXPORT void Mat_AccumulateProduct(Mat src1, Mat src2, Mat dst);
DLL_EXPORT void Mat_AccumulateProductWithMask(Mat src1, Mat src2, Mat dst, Mat mask);
DLL_EXPORT void Mat_AccumulatedWeighted(Mat src, Mat dst, double alpha);
DLL_EXPORT void Mat_AccumulatedWeightedWithMask(Mat src, Mat dst, double alpha, Mat mask);
#ifdef __cplusplus
}
#endif
#endif //_OPENCV3_IMGPROC_H_