@@ -22,7 +22,7 @@ static inline Point normalizeAnchor(Point anchor, Size ksize)
2222 return anchor;
2323}
2424
25- int log2 (int n)
25+ static int log2 (int n)
2626{
2727 int ans = -1 ;
2828 while (n > 0 )
@@ -33,7 +33,7 @@ int log2(int n)
3333 return ans;
3434}
3535
36- int longestRowRunLength (const Mat& kernel)
36+ static int longestRowRunLength (const Mat& kernel)
3737{
3838 int cnt = 0 ;
3939 int maxLen = 0 ;
@@ -54,7 +54,7 @@ int longestRowRunLength(const Mat& kernel)
5454 return maxLen;
5555}
5656
57- int longestColRunLength (const Mat& kernel)
57+ static int longestColRunLength (const Mat& kernel)
5858{
5959 int cnt = 0 ;
6060 int maxLen = 0 ;
@@ -75,7 +75,7 @@ int longestColRunLength(const Mat& kernel)
7575 return maxLen;
7676}
7777
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)
7979{
8080 int rowOfst = 1 << rowDepth;
8181 int colOfst = 1 << colDepth;
@@ -109,7 +109,7 @@ std::vector<Point> findP2RectCorners(const Mat& stNode, int rowDepth, int colDep
109109* Find a set of power-2-rectangles to cover the kernel.
110110* power-2-rectangles is a rectangle whose height and width are both power of 2.
111111*/
112- std::vector<std::vector<std::vector<Point>>> genPow2RectsToCoverKernel (
112+ static std::vector<std::vector<std::vector<Point>>> genPow2RectsToCoverKernel (
113113 const Mat& kernel, int rowDepthLim, int colDepthLim)
114114{
115115 CV_Assert (kernel.type () == CV_8UC1);
@@ -142,7 +142,7 @@ std::vector<std::vector<std::vector<Point>>> genPow2RectsToCoverKernel(
142142/*
143143* Solves the rectilinear steiner arborescence problem greedy.
144144*/
145- Mat SolveRSAPGreedy (const Mat& initialMap)
145+ static Mat SolveRSAPGreedy (const Mat& initialMap)
146146{
147147 CV_Assert (initialMap.type () == CV_8UC1);
148148 std::vector<Point> pos;
@@ -191,7 +191,7 @@ Mat SolveRSAPGreedy(const Mat& initialMap)
191191 return resMap;
192192}
193193
194- Mat sparseTableFillPlanning (
194+ static Mat sparseTableFillPlanning (
195195 std::vector<std::vector<std::vector<Point>>> pow2Rects, int rowDepthLim, int colDepthLim)
196196{
197197 // list up required sparse table nodes.
@@ -239,7 +239,7 @@ enum Op
239239 Min, Max
240240};
241241
242- void morphDfs (int minmax, Mat& st, Mat& dst,
242+ static void morphDfs (int minmax, Mat& st, Mat& dst,
243243 std::vector<std::vector<std::vector<Point>>> row2Rects, const Mat& stPlan,
244244 int rowDepth, int colDepth)
245245{
@@ -276,7 +276,7 @@ void morphDfs(int minmax, Mat& st, Mat& dst,
276276}
277277
278278template <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,
280280 BorderTypes borderType, const Scalar& borderVal)
281281{
282282 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,
302302 } while (--kdi.iterations > 0 );
303303}
304304
305- void morphOp (Op minmax, InputArray _src, OutputArray _dst, kernelDecompInfo kdi,
305+ static void morphOp (Op minmax, InputArray _src, OutputArray _dst, kernelDecompInfo kdi,
306306 BorderTypes borderType, const Scalar& borderVal)
307307{
308308 if (kdi.iterations == 0 || kdi.rows * kdi.cols == 1 )
0 commit comments