-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix axes and docs #3256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix axes and docs #3256
Conversation
b4ba56c
to
3c58d9d
Compare
@@ -245,7 +266,7 @@ CV_EXPORTS_W void detectMarkers(InputArray image, const Ptr<Dictionary> &diction | |||
* the camera individually. So for each marker, one rotation and translation vector is returned. | |||
* The returned transformation is the one that transforms points from each marker coordinate system | |||
* to the camera coordinate system. | |||
* The marker corrdinate system is centered on the middle of the marker, with the Z axis | |||
* The marker coordinate system is centered on the top-left corner of the marker, with the Z axis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"top-left corner" is against default behaviour:
EstimateParameters() {
pattern = PatternPos::CCW_center;
useExtrinsicGuess = false;
solvePnPMethod = SOLVEPNP_ITERATIVE;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -286,7 +286,7 @@ translation vectors of the estimated poses will be in the same unit | |||
- The output parameters `rvecs` and `tvecs` are the rotation and translation vectors respectively, for each of the markers | |||
in `markerCorners`. | |||
|
|||
The marker coordinate system that is assumed by this function is placed at the center of the marker | |||
The marker coordinate system that is assumed by this function is placed in the top left corner of the marker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same for documentation here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*refixed
Please add documentation for the new parameters structure and add reference to it. The default behaviour should be presumed. |
|
3c58d9d
to
cf58522
Compare
cf58522
to
6bfc6ad
Compare
* The coordinates of the four corners of the marker in its own coordinate system are: | ||
* (0, 0, 0), (markerLength, 0, 0), | ||
* (markerLength, markerLength, 0), (0, markerLength, 0) | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that CCW and CW meaning should be covered too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
modules/aruco/src/aruco.cpp
Outdated
@@ -810,19 +810,30 @@ static void _identifyCandidates(InputArray _image, vector< vector< vector< Point | |||
|
|||
|
|||
/** | |||
* @brief Return object points for the system centered in a single marker, given the marker length | |||
* @brief Return object points for the system centered in a top left corner of single marker, given the marker length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to cover all function parameters. Center coordinate system is default behaviour, but not the only one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
899a218
to
5f780e2
Compare
5f780e2
to
e4c264a
Compare
087e307
to
c72a832
Compare
@alalek The patch ready for merge. |
*/ | ||
static void _getSingleMarkerObjectPoints(float markerLength, OutputArray _objPoints) { | ||
static void _getSingleMarkerObjectPoints(float markerLength, OutputArray _objPoints, | ||
EstimateParameters estimateParameters) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const reference.
@@ -1221,17 +1233,17 @@ class SinglePoseEstimationParallel : public ParallelLoopBody { | |||
public: | |||
SinglePoseEstimationParallel(Mat& _markerObjPoints, InputArrayOfArrays _corners, | |||
InputArray _cameraMatrix, InputArray _distCoeffs, | |||
Mat& _rvecs, Mat& _tvecs) | |||
Mat& _rvecs, Mat& _tvecs, EstimateParameters _estimateParameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const reference
@@ -1242,21 +1254,20 @@ class SinglePoseEstimationParallel : public ParallelLoopBody { | |||
InputArrayOfArrays corners; | |||
InputArray cameraMatrix, distCoeffs; | |||
Mat& rvecs, tvecs; | |||
EstimateParameters estimateParameters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const reference
|
||
CV_Assert(markerLength > 0); | ||
|
||
Mat markerObjPoints; | ||
_getSingleMarkerObjectPoints(markerLength, markerObjPoints); | ||
_getSingleMarkerObjectPoints(markerLength, markerObjPoints, *estimateParameters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unchecked pointer unreference.
* These pattern points define this coordinate system: | ||
*  | ||
*/ | ||
CCW_center, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing prefix for enum and its values violates OpenCV coding style guide.
Constants MUST be UPPERCASE (defined by the same coding style guide)
fix axes and docs * fix axes docs, tutorial and add estimateParameters, change estimateParameters in test * update docs, add singlemarkersaxes2.jpg * fix docs
fixes #3250
update docs and tutorials for Aruco estimatePoseSingleMarkers()
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.