Skip to content

Commit 3ffaecb

Browse files
committed
非公開分をcpp側に移動
1 parent bd20e2a commit 3ffaecb

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

modules/ximgproc/include/opencv2/ximgproc/sparse_table_morphology.hpp

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
#include <opencv2/core.hpp>
99
#include <vector>
1010

11-
namespace cv {
12-
namespace stMorph {
11+
namespace cv { namespace stMorph {
1312

1413
//! @addtogroup imgproc_filter
1514
//! @{
@@ -84,22 +83,6 @@ CV_EXPORTS_W void morphologyEx( InputArray src, OutputArray dst,
8483

8584
//! @}
8685

87-
// normalizeAnchor; Copied from filterengine.hpp.
88-
static inline Point normalizeAnchor(Point anchor, Size ksize)
89-
{
90-
if (anchor.x == -1)
91-
anchor.x = ksize.width / 2;
92-
if (anchor.y == -1)
93-
anchor.y = ksize.height / 2;
94-
CV_Assert(anchor.inside(Rect(0, 0, ksize.width, ksize.height)));
95-
return anchor;
96-
}
97-
98-
enum Op
99-
{
100-
Min, Max
101-
};
102-
10386
/*
10487
* Find a set of power-2-rectangles to cover the kernel.
10588
* power-2-rectangles is a rectangle whose height and width are both power of 2.
@@ -120,8 +103,7 @@ CV_EXPORTS_W int log2(int n);
120103
CV_EXPORTS_W int longestRowRunLength(const Mat& kernel);
121104
CV_EXPORTS_W int longestColRunLength(const Mat& kernel);
122105

123-
}} // cv::stMorph::
124-
106+
}}
125107
#endif
126108

127109
/*

modules/ximgproc/src/sparse_table_morphology.cpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,23 @@
77
#include <utility>
88
#include <vector>
99

10-
namespace cv {
11-
namespace stMorph {
10+
namespace cv { namespace stMorph {
11+
12+
// normalizeAnchor; Copied from filterengine.hpp.
13+
static inline Point normalizeAnchor(Point anchor, Size ksize)
14+
{
15+
if (anchor.x == -1)
16+
anchor.x = ksize.width / 2;
17+
if (anchor.y == -1)
18+
anchor.y = ksize.height / 2;
19+
CV_Assert(anchor.inside(Rect(0, 0, ksize.width, ksize.height)));
20+
return anchor;
21+
}
22+
23+
enum Op
24+
{
25+
Min, Max
26+
};
1227

1328
int log2(int n)
1429
{
@@ -415,4 +430,4 @@ void morphologyEx(InputArray src, OutputArray dst, int op,
415430
}
416431
}
417432

418-
}} // cv::st::
433+
}}

0 commit comments

Comments
 (0)