Skip to content

Commit eada220

Browse files
committed
Merge pull request #554 from cr333:aruco-python
2 parents 6dc1f41 + e90ae8e commit eada220

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

modules/aruco/include/opencv2/aruco.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,14 @@ class CV_EXPORTS_W Board {
228228
public:
229229
// array of object points of all the marker corners in the board
230230
// each marker include its 4 corners, i.e. for M markers, the size is Mx4
231-
std::vector< std::vector< Point3f > > objPoints;
231+
CV_PROP std::vector< std::vector< Point3f > > objPoints;
232232

233233
// the dictionary of markers employed for this board
234-
Ptr<Dictionary> dictionary;
234+
CV_PROP Ptr<Dictionary> dictionary;
235235

236236
// vector of the identifiers of the markers in the board (same size than objPoints)
237237
// The identifiers refers to the board dictionary
238-
std::vector< int > ids;
238+
CV_PROP std::vector< int > ids;
239239
};
240240

241241

@@ -259,7 +259,7 @@ class CV_EXPORTS_W GridBoard : public Board {
259259
*
260260
* This function return the image of the GridBoard, ready to be printed.
261261
*/
262-
void draw(Size outSize, OutputArray img, int marginSize = 0, int borderBits = 1);
262+
CV_WRAP void draw(Size outSize, OutputArray img, int marginSize = 0, int borderBits = 1);
263263

264264

265265
/**
@@ -282,17 +282,17 @@ class CV_EXPORTS_W GridBoard : public Board {
282282
/**
283283
*
284284
*/
285-
Size getGridSize() const { return Size(_markersX, _markersY); }
285+
CV_WRAP Size getGridSize() const { return Size(_markersX, _markersY); }
286286

287287
/**
288288
*
289289
*/
290-
float getMarkerLength() const { return _markerLength; }
290+
CV_WRAP float getMarkerLength() const { return _markerLength; }
291291

292292
/**
293293
*
294294
*/
295-
float getMarkerSeparation() const { return _markerSeparation; }
295+
CV_WRAP float getMarkerSeparation() const { return _markerSeparation; }
296296

297297

298298
private:

modules/aruco/include/opencv2/aruco/charuco.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ class CV_EXPORTS_W CharucoBoard : public Board {
6363

6464
public:
6565
// vector of chessboard 3D corners precalculated
66-
std::vector< Point3f > chessboardCorners;
66+
CV_PROP std::vector< Point3f > chessboardCorners;
6767

6868
// for each charuco corner, nearest marker id and nearest marker corner id of each marker
69-
std::vector< std::vector< int > > nearestMarkerIdx;
70-
std::vector< std::vector< int > > nearestMarkerCorners;
69+
CV_PROP std::vector< std::vector< int > > nearestMarkerIdx;
70+
CV_PROP std::vector< std::vector< int > > nearestMarkerCorners;
7171

7272
/**
7373
* @brief Draw a ChArUco board
@@ -80,7 +80,7 @@ class CV_EXPORTS_W CharucoBoard : public Board {
8080
*
8181
* This function return the image of the ChArUco board, ready to be printed.
8282
*/
83-
void draw(Size outSize, OutputArray img, int marginSize = 0, int borderBits = 1);
83+
CV_WRAP void draw(Size outSize, OutputArray img, int marginSize = 0, int borderBits = 1);
8484

8585

8686
/**
@@ -103,17 +103,17 @@ class CV_EXPORTS_W CharucoBoard : public Board {
103103
/**
104104
*
105105
*/
106-
Size getChessboardSize() const { return Size(_squaresX, _squaresY); }
106+
CV_WRAP Size getChessboardSize() const { return Size(_squaresX, _squaresY); }
107107

108108
/**
109109
*
110110
*/
111-
float getSquareLength() const { return _squareLength; }
111+
CV_WRAP float getSquareLength() const { return _squareLength; }
112112

113113
/**
114114
*
115115
*/
116-
float getMarkerLength() const { return _markerLength; }
116+
CV_WRAP float getMarkerLength() const { return _markerLength; }
117117

118118
private:
119119
void _getNearestMarkerCorners();

modules/aruco/include/opencv2/aruco/dictionary.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ namespace aruco {
6161
class CV_EXPORTS_W Dictionary {
6262

6363
public:
64-
CV_PROP_RW Mat bytesList; // marker code information
65-
CV_PROP_RW int markerSize; // number of bits per dimension
66-
CV_PROP_RW int maxCorrectionBits; // maximum number of bits that can be corrected
64+
CV_PROP Mat bytesList; // marker code information
65+
CV_PROP int markerSize; // number of bits per dimension
66+
CV_PROP int maxCorrectionBits; // maximum number of bits that can be corrected
6767

6868

6969
/**
@@ -114,7 +114,7 @@ class CV_EXPORTS_W Dictionary {
114114
/**
115115
* @brief Draw a canonical marker image
116116
*/
117-
void drawMarker(int id, int sidePixels, OutputArray _img, int borderBits = 1) const;
117+
CV_WRAP void drawMarker(int id, int sidePixels, OutputArray _img, int borderBits = 1) const;
118118

119119

120120
/**

0 commit comments

Comments
 (0)