mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-16 05:17:39 +08:00
add CV_WRAP, add default Board constructor
This commit is contained in:

committed by
AleksandrPanov

parent
ba4d60ee8c
commit
d1fe61a467
@@ -26,6 +26,8 @@ class Dictionary;
|
||||
*/
|
||||
class CV_EXPORTS_W Board {
|
||||
public:
|
||||
CV_WRAP Board();
|
||||
|
||||
/** @brief Provide way to create Board by passing necessary data. Specially needed in Python.
|
||||
* @param objPoints array of object points of all the marker corners in the board
|
||||
* @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
|
||||
|
||||
class CV_EXPORTS_W GridBoard : public Board {
|
||||
public:
|
||||
CV_EXPORTS_W GridBoard();
|
||||
CV_WRAP GridBoard();
|
||||
/**
|
||||
* @brief Draw a GridBoard
|
||||
*
|
||||
@@ -142,7 +144,7 @@ protected:
|
||||
*/
|
||||
class CV_EXPORTS_W CharucoBoard : public Board {
|
||||
public:
|
||||
CharucoBoard();
|
||||
CV_WRAP CharucoBoard();
|
||||
|
||||
// vector of chessboard 3D corners precalculated
|
||||
CV_PROP std::vector<Point3f> chessboardCorners;
|
||||
|
@@ -306,7 +306,7 @@ public:
|
||||
* @param _params marker detection parameters
|
||||
* @param _refineParams marker refine detection parameters
|
||||
*/
|
||||
ArucoDetector(const Ptr<Dictionary> &_dictionary = getPredefinedDictionary(DICT_4X4_50),
|
||||
CV_WRAP ArucoDetector(const Ptr<Dictionary> &_dictionary = getPredefinedDictionary(DICT_4X4_50),
|
||||
const Ptr<DetectorParameters> &_params = DetectorParameters::create(),
|
||||
const Ptr<RefineParameters> &_refineParams = RefineParameters::create()):
|
||||
dictionary(_dictionary), params(_params), refineParams(_refineParams) {}
|
||||
|
@@ -112,6 +112,8 @@ struct GridBoard::GridImpl {
|
||||
|
||||
GridBoard::GridBoard(): gridImpl(makePtr<GridImpl>()) {}
|
||||
|
||||
Board::Board(): dictionary(makePtr<Dictionary>(getPredefinedDictionary(PREDEFINED_DICTIONARY_NAME::DICT_4X4_50))) {}
|
||||
|
||||
Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &dictionary, InputArray ids) {
|
||||
CV_Assert(objPoints.total() == ids.total());
|
||||
CV_Assert(objPoints.type() == CV_32FC3 || objPoints.type() == CV_32FC1);
|
||||
|
Reference in New Issue
Block a user