Skip to content

Commit db55474

Browse files
author
AleksandrPanov
committed
fix indentation, add enum prefix
1 parent 64804f0 commit db55474

File tree

4 files changed

+34
-40
lines changed

4 files changed

+34
-40
lines changed

modules/aruco/include/opencv2/aruco/aruco_calib_pose.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ enum PatternPos {
2727
* These pattern points define this coordinate system:
2828
* ![Image with axes drawn](images/singlemarkersaxes.jpg)
2929
*/
30-
CCW_CENTER,
30+
ARUCO_CCW_CENTER,
3131
/** @brief The marker coordinate system is centered on the top-left corner of the marker.
3232
* The coordinates of the four corners (CW order) of the marker in its own coordinate system are:
3333
* (0, 0, 0), (markerLength, 0, 0),
@@ -38,11 +38,11 @@ enum PatternPos {
3838
*
3939
* These pattern dots are convenient to use with a chessboard/ChArUco board.
4040
*/
41-
CW_TOP_LEFT_CORNER
41+
ARUCO_CW_TOP_LEFT_CORNER
4242
};
4343

4444
/** @brief Pose estimation parameters
45-
* @param pattern Defines center this system and axes direction (default PatternPos::CCW_CENTER).
45+
* @param pattern Defines center this system and axes direction (default PatternPos::ARUCO_CCW_CENTER).
4646
* @param useExtrinsicGuess Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided
4747
* rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further
4848
* optimizes them (default false).
@@ -54,7 +54,7 @@ struct CV_EXPORTS_W EstimateParameters {
5454
CV_PROP_RW bool useExtrinsicGuess;
5555
CV_PROP_RW SolvePnPMethod solvePnPMethod;
5656

57-
EstimateParameters(): pattern(CCW_CENTER), useExtrinsicGuess(false),
57+
EstimateParameters(): pattern(ARUCO_CCW_CENTER), useExtrinsicGuess(false),
5858
solvePnPMethod(SOLVEPNP_ITERATIVE) {}
5959

6060
CV_WRAP static Ptr<EstimateParameters> create() {
@@ -82,7 +82,7 @@ struct CV_EXPORTS_W EstimateParameters {
8282
* Each element in tvecs corresponds to the specific marker in imgPoints.
8383
* @param objPoints array of object points of all the marker corners
8484
* @param estimateParameters set the origin of coordinate system and the coordinates of the four corners of the marker
85-
* (default estimateParameters.pattern = PatternPos::CCW_CENTER, estimateParameters.useExtrinsicGuess = false,
85+
* (default estimateParameters.pattern = PatternPos::ARUCO_CCW_CENTER, estimateParameters.useExtrinsicGuess = false,
8686
* estimateParameters.solvePnPMethod = SOLVEPNP_ITERATIVE).
8787
*
8888
* This function receives the detected markers and returns their pose estimation respect to

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

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,40 @@ class Dictionary;
2525
* - The identifier of all the markers in the board.
2626
*/
2727
class CV_EXPORTS_W Board {
28-
public:
29-
/**
30-
* @brief Provide way to create Board by passing necessary data. Specially needed in Python.
31-
*
32-
* @param objPoints array of object points of all the marker corners in the board
33-
* @param dictionary the dictionary of markers employed for this board
34-
* @param ids vector of the identifiers of the markers in the board
35-
*
36-
*/
28+
public:
29+
/** @brief Provide way to create Board by passing necessary data. Specially needed in Python.
30+
* @param objPoints array of object points of all the marker corners in the board
31+
* @param dictionary the dictionary of markers employed for this board
32+
* @param ids vector of the identifiers of the markers in the board
33+
*/
3734
CV_WRAP static Ptr<Board> create(InputArrayOfArrays objPoints, const Ptr<Dictionary> &dictionary, InputArray ids);
3835

39-
/**
40-
* @brief Set ids vector
41-
*
42-
* @param ids vector of the identifiers of the markers in the board (should be the same size
43-
* as objPoints)
44-
*
45-
* Recommended way to set ids vector, which will fail if the size of ids does not match size
46-
* of objPoints.
47-
*/
36+
/** @brief Set ids vector
37+
* @param ids vector of the identifiers of the markers in the board (should be the same size
38+
* as objPoints)
39+
*
40+
* Recommended way to set ids vector, which will fail if the size of ids does not match size
41+
* of objPoints.
42+
*/
4843
CV_WRAP void setIds(InputArray ids);
4944

50-
/// array of object points of all the marker corners in the board
51-
/// each marker include its 4 corners in this order:
52-
///- objPoints[i][0] - left-top point of i-th marker
53-
///- objPoints[i][1] - right-top point of i-th marker
54-
///- objPoints[i][2] - right-bottom point of i-th marker
55-
///- objPoints[i][3] - left-bottom point of i-th marker
56-
///
57-
/// Markers are placed in a certain order - row by row, left to right in every row.
58-
/// For M markers, the size is Mx4.
45+
/** @brief array of object points of all the marker corners in the board each marker include its 4 corners in this order:
46+
* - objPoints[i][0] - left-top point of i-th marker
47+
* - objPoints[i][1] - right-top point of i-th marker
48+
* - objPoints[i][2] - right-bottom point of i-th marker
49+
* - objPoints[i][3] - left-bottom point of i-th marker
50+
*
51+
* Markers are placed in a certain order - row by row, left to right in every row.
52+
* For M markers, the size is Mx4.
53+
*/
5954
CV_PROP std::vector<std::vector<Point3f> > objPoints;
6055

6156
/// the dictionary of markers employed for this board
6257
CV_PROP Ptr<Dictionary> dictionary;
6358

64-
/// vector of the identifiers of the markers in the board (same size than objPoints)
65-
/// The identifiers refers to the board dictionary
59+
/** @brief vector of the identifiers of the markers in the board (same size than objPoints)
60+
* The identifiers refers to the board dictionary
61+
*/
6662
CV_PROP_RW std::vector<int> ids;
6763

6864
/// coordinate of the bottom right corner of the board, is set when calling the function create()
@@ -173,9 +169,7 @@ class CV_EXPORTS_W CharucoBoard : public Board {
173169
CV_WRAP void draw(Size outSize, OutputArray img, int marginSize = 0, int borderBits = 1);
174170

175171

176-
/**
177-
* @brief Create a CharucoBoard object
178-
*
172+
/** @brief Create a CharucoBoard object
179173
* @param squaresX number of chessboard squares in X direction
180174
* @param squaresY number of chessboard squares in Y direction
181175
* @param squareLength chessboard square side length (normally in meters)

modules/aruco/src/aruco_calib_pose.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ static Mat _getSingleMarkerObjectPoints(float markerLength, const EstimateParame
4747
CV_Assert(markerLength > 0);
4848
Mat objPoints(4, 1, CV_32FC3);
4949
// set coordinate system in the top-left corner of the marker, with Z pointing out
50-
if (estimateParameters.pattern == CW_TOP_LEFT_CORNER) {
50+
if (estimateParameters.pattern == ARUCO_CW_TOP_LEFT_CORNER) {
5151
objPoints.ptr<Vec3f>(0)[0] = Vec3f(0.f, 0.f, 0);
5252
objPoints.ptr<Vec3f>(0)[1] = Vec3f(markerLength, 0.f, 0);
5353
objPoints.ptr<Vec3f>(0)[2] = Vec3f(markerLength, markerLength, 0);
5454
objPoints.ptr<Vec3f>(0)[3] = Vec3f(0.f, markerLength, 0);
5555
}
56-
else if (estimateParameters.pattern == CCW_CENTER) {
56+
else if (estimateParameters.pattern == ARUCO_CCW_CENTER) {
5757
objPoints.ptr<Vec3f>(0)[0] = Vec3f(-markerLength/2.f, markerLength/2.f, 0);
5858
objPoints.ptr<Vec3f>(0)[1] = Vec3f(markerLength/2.f, markerLength/2.f, 0);
5959
objPoints.ptr<Vec3f>(0)[2] = Vec3f(markerLength/2.f, -markerLength/2.f, 0);

modules/aruco/test/test_charucodetection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ void CV_CharucoDiamondDetection::run(int) {
441441
}
442442

443443
Ptr<aruco::EstimateParameters> estimateParameters = aruco::EstimateParameters::create();
444-
estimateParameters->pattern = aruco::CW_TOP_LEFT_CORNER;
444+
estimateParameters->pattern = aruco::ARUCO_CW_TOP_LEFT_CORNER;
445445
// estimate diamond pose
446446
vector< Vec3d > estimatedRvec, estimatedTvec;
447447
aruco::estimatePoseSingleMarkers(diamondCorners, squareLength, cameraMatrix, distCoeffs, estimatedRvec,

0 commit comments

Comments
 (0)