mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-16 13:57:05 +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 {
|
class CV_EXPORTS_W Board {
|
||||||
public:
|
public:
|
||||||
|
CV_WRAP Board();
|
||||||
|
|
||||||
/** @brief Provide way to create Board by passing necessary data. Specially needed in Python.
|
/** @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 objPoints array of object points of all the marker corners in the board
|
||||||
* @param dictionary the dictionary of markers employed for this 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 {
|
class CV_EXPORTS_W GridBoard : public Board {
|
||||||
public:
|
public:
|
||||||
CV_EXPORTS_W GridBoard();
|
CV_WRAP GridBoard();
|
||||||
/**
|
/**
|
||||||
* @brief Draw a GridBoard
|
* @brief Draw a GridBoard
|
||||||
*
|
*
|
||||||
@@ -142,7 +144,7 @@ protected:
|
|||||||
*/
|
*/
|
||||||
class CV_EXPORTS_W CharucoBoard : public Board {
|
class CV_EXPORTS_W CharucoBoard : public Board {
|
||||||
public:
|
public:
|
||||||
CharucoBoard();
|
CV_WRAP CharucoBoard();
|
||||||
|
|
||||||
// vector of chessboard 3D corners precalculated
|
// vector of chessboard 3D corners precalculated
|
||||||
CV_PROP std::vector<Point3f> chessboardCorners;
|
CV_PROP std::vector<Point3f> chessboardCorners;
|
||||||
|
@@ -306,7 +306,7 @@ public:
|
|||||||
* @param _params marker detection parameters
|
* @param _params marker detection parameters
|
||||||
* @param _refineParams marker refine 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<DetectorParameters> &_params = DetectorParameters::create(),
|
||||||
const Ptr<RefineParameters> &_refineParams = RefineParameters::create()):
|
const Ptr<RefineParameters> &_refineParams = RefineParameters::create()):
|
||||||
dictionary(_dictionary), params(_params), refineParams(_refineParams) {}
|
dictionary(_dictionary), params(_params), refineParams(_refineParams) {}
|
||||||
|
@@ -112,6 +112,8 @@ struct GridBoard::GridImpl {
|
|||||||
|
|
||||||
GridBoard::GridBoard(): gridImpl(makePtr<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) {
|
Ptr<Board> Board::create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &dictionary, InputArray ids) {
|
||||||
CV_Assert(objPoints.total() == ids.total());
|
CV_Assert(objPoints.total() == ids.total());
|
||||||
CV_Assert(objPoints.type() == CV_32FC3 || objPoints.type() == CV_32FC1);
|
CV_Assert(objPoints.type() == CV_32FC3 || objPoints.type() == CV_32FC1);
|
||||||
|
Reference in New Issue
Block a user