Skip to content

Commit d1fe61a

Browse files
AleksandrPanovAleksandrPanov
authored andcommitted
add CV_WRAP, add default Board constructor
1 parent ba4d60e commit d1fe61a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

modules/aruco/include/opencv2/aruco/board.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class Dictionary;
2626
*/
2727
class CV_EXPORTS_W Board {
2828
public:
29+
CV_WRAP Board();
30+
2931
/** @brief Provide way to create Board by passing necessary data. Specially needed in Python.
3032
* @param objPoints array of object points of all the marker corners in the board
3133
* @param dictionary the dictionary of markers employed for this board
@@ -91,7 +93,7 @@ CV_EXPORTS_W void drawPlanarBoard(const Ptr<Board> &board, Size outSize, OutputA
9193

9294
class CV_EXPORTS_W GridBoard : public Board {
9395
public:
94-
CV_EXPORTS_W GridBoard();
96+
CV_WRAP GridBoard();
9597
/**
9698
* @brief Draw a GridBoard
9799
*
@@ -142,7 +144,7 @@ class CV_EXPORTS_W GridBoard : public Board {
142144
*/
143145
class CV_EXPORTS_W CharucoBoard : public Board {
144146
public:
145-
CharucoBoard();
147+
CV_WRAP CharucoBoard();
146148

147149
// vector of chessboard 3D corners precalculated
148150
CV_PROP std::vector<Point3f> chessboardCorners;

modules/aruco/include/opencv2/aruco_detector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class CV_EXPORTS_W ArucoDetector : public Algorithm
306306
* @param _params marker detection parameters
307307
* @param _refineParams marker refine detection parameters
308308
*/
309-
ArucoDetector(const Ptr<Dictionary> &_dictionary = getPredefinedDictionary(DICT_4X4_50),
309+
CV_WRAP ArucoDetector(const Ptr<Dictionary> &_dictionary = getPredefinedDictionary(DICT_4X4_50),
310310
const Ptr<DetectorParameters> &_params = DetectorParameters::create(),
311311
const Ptr<RefineParameters> &_refineParams = RefineParameters::create()):
312312
dictionary(_dictionary), params(_params), refineParams(_refineParams) {}

modules/aruco/src/board.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ struct GridBoard::GridImpl {
112112

113113
GridBoard::GridBoard(): gridImpl(makePtr<GridImpl>()) {}
114114

115+
Board::Board(): dictionary(makePtr<Dictionary>(getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME::DICT_4X4_50))) {}
116+
115117
Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &dictionary, InputArray ids) {
116118
CV_Assert(objPoints.total() == ids.total());
117119
CV_Assert(objPoints.type() == CV_32FC3 || objPoints.type() == CV_32FC1);

0 commit comments

Comments
 (0)