@@ -22,7 +22,7 @@ static inline Point normalizeAnchor(Point anchor, Size ksize)
22
22
return anchor;
23
23
}
24
24
25
- int log2 (int n)
25
+ static int log2 (int n)
26
26
{
27
27
int ans = -1 ;
28
28
while (n > 0 )
@@ -33,7 +33,7 @@ int log2(int n)
33
33
return ans;
34
34
}
35
35
36
- int longestRowRunLength (const Mat& kernel)
36
+ static int longestRowRunLength (const Mat& kernel)
37
37
{
38
38
int cnt = 0 ;
39
39
int maxLen = 0 ;
@@ -54,7 +54,7 @@ int longestRowRunLength(const Mat& kernel)
54
54
return maxLen;
55
55
}
56
56
57
- int longestColRunLength (const Mat& kernel)
57
+ static int longestColRunLength (const Mat& kernel)
58
58
{
59
59
int cnt = 0 ;
60
60
int maxLen = 0 ;
@@ -75,7 +75,7 @@ int longestColRunLength(const Mat& kernel)
75
75
return maxLen;
76
76
}
77
77
78
- std::vector<Point> findP2RectCorners (const Mat& stNode, int rowDepth, int colDepth)
78
+ static std::vector<Point> findP2RectCorners (const Mat& stNode, int rowDepth, int colDepth)
79
79
{
80
80
int rowOfst = 1 << rowDepth;
81
81
int colOfst = 1 << colDepth;
@@ -109,7 +109,7 @@ std::vector<Point> findP2RectCorners(const Mat& stNode, int rowDepth, int colDep
109
109
* Find a set of power-2-rectangles to cover the kernel.
110
110
* power-2-rectangles is a rectangle whose height and width are both power of 2.
111
111
*/
112
- std::vector<std::vector<std::vector<Point>>> genPow2RectsToCoverKernel (
112
+ static std::vector<std::vector<std::vector<Point>>> genPow2RectsToCoverKernel (
113
113
const Mat& kernel, int rowDepthLim, int colDepthLim)
114
114
{
115
115
CV_Assert (kernel.type () == CV_8UC1);
@@ -142,7 +142,7 @@ std::vector<std::vector<std::vector<Point>>> genPow2RectsToCoverKernel(
142
142
/*
143
143
* Solves the rectilinear steiner arborescence problem greedy.
144
144
*/
145
- Mat SolveRSAPGreedy (const Mat& initialMap)
145
+ static Mat SolveRSAPGreedy (const Mat& initialMap)
146
146
{
147
147
CV_Assert (initialMap.type () == CV_8UC1);
148
148
std::vector<Point> pos;
@@ -191,7 +191,7 @@ Mat SolveRSAPGreedy(const Mat& initialMap)
191
191
return resMap;
192
192
}
193
193
194
- Mat sparseTableFillPlanning (
194
+ static Mat sparseTableFillPlanning (
195
195
std::vector<std::vector<std::vector<Point>>> pow2Rects, int rowDepthLim, int colDepthLim)
196
196
{
197
197
// list up required sparse table nodes.
@@ -239,7 +239,7 @@ enum Op
239
239
Min, Max
240
240
};
241
241
242
- void morphDfs (int minmax, Mat& st, Mat& dst,
242
+ static void morphDfs (int minmax, Mat& st, Mat& dst,
243
243
std::vector<std::vector<std::vector<Point>>> row2Rects, const Mat& stPlan,
244
244
int rowDepth, int colDepth)
245
245
{
@@ -276,7 +276,7 @@ void morphDfs(int minmax, Mat& st, Mat& dst,
276
276
}
277
277
278
278
template <typename T>
279
- void morphOp (Op minmax, InputArray _src, OutputArray _dst, kernelDecompInfo kdi,
279
+ static void morphOp (Op minmax, InputArray _src, OutputArray _dst, kernelDecompInfo kdi,
280
280
BorderTypes borderType, const Scalar& borderVal)
281
281
{
282
282
T nil = (minmax == Op::Min) ? std::numeric_limits<T>::max () : std::numeric_limits<T>::min ();
@@ -302,7 +302,7 @@ void morphOp(Op minmax, InputArray _src, OutputArray _dst, kernelDecompInfo kdi,
302
302
} while (--kdi.iterations > 0 );
303
303
}
304
304
305
- void morphOp (Op minmax, InputArray _src, OutputArray _dst, kernelDecompInfo kdi,
305
+ static void morphOp (Op minmax, InputArray _src, OutputArray _dst, kernelDecompInfo kdi,
306
306
BorderTypes borderType, const Scalar& borderVal)
307
307
{
308
308
if (kdi.iterations == 0 || kdi.rows * kdi.cols == 1 )
0 commit comments