-
Notifications
You must be signed in to change notification settings - Fork 5.8k
aruco refactoring and class interface #3240
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
Conversation
1152e93
to
9567454
Compare
5bd62f7
to
36e28be
Compare
dc7d392
to
ef2ec1d
Compare
3614e3c
to
5775474
Compare
d0f2ba6
to
c471967
Compare
c5ade77
to
dfd8e9b
Compare
Thanks a lot for the patch! I tested the solution manually and it works for me. Couple of general comments on the code:
|
dfd8e9b
to
2b78dfe
Compare
CV_EXPORTS_W void estimatePoseSingleMarkers(InputArrayOfArrays corners, float markerLength, | ||
InputArray cameraMatrix, InputArray distCoeffs, | ||
OutputArray rvecs, OutputArray tvecs, OutputArray _objPoints = noArray(), | ||
Ptr<EstimateParameters> estimateParameters = EstimateParameters::create()); |
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.
for now it's fine, but when we move these functions to the main opencv module, can we consider using named parameters concept, which will provide more convenient API, especially for Python and modern C++ users? (https://github.com/opencv/opencv/wiki/OE-34.-Named-Parameters)
Size imageSize, InputOutputArray cameraMatrix, InputOutputArray distCoeffs, | ||
OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, OutputArray stdDeviationsIntrinsics, | ||
OutputArray stdDeviationsExtrinsics, OutputArray perViewErrors, int flags = 0, | ||
TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON)); |
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.
since this is new API, do we need both Extended and simple variants? Can we retain just extended? (and maybe later convert it to "named-parameters" style (see above))
private: | ||
// number of markers in X and Y directions | ||
int _markersX, _markersY; | ||
|
||
// marker side length (normally in meters) | ||
float _markerLength; | ||
|
||
// separation between markers in the grid | ||
float _markerSeparation; |
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.
no changes and no objectives here
f572d15
to
4b321ac
Compare
@alalek, |
create aruco_utils.hpp move Board, GridBoard, CharucoBoard to board.hpp/board.cpp refactoring _getSingleMarkerObjectPoints() refactoring _extractBits() refactoring _findMarkerContours() fix _copyVector2Output() in detectMarkers() move testCharucoCornersCollinear() to board.hpp/board.cpp move poseEstimate()/calibAruco() to aruco_calib_pose.hpp reduce include files move detectMarkers() to class ArucoDetector move refineDetectedMarkers() to class ArucoDetector add C API wrapper to detectMarkers(), refineDetectedMarkers() update tests and samples to class API add py tests: test_aruco_detector, test_aruco_detector_refine refactoring, fix docs add java tests: testArucoIssue3133, testArucoDetector add readWriteParameter(), update readParameter() implemented cv::Algorithm - read/write, added read/write to RefineParameters, added write to DetectorParameters merge PatternPos/EstimateParameters after rebase remove empty docstring for private function fixes fixes license
f720075
to
1f003fe
Compare
92a77df
to
a8be488
Compare
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.
👍 LGTM
a8be488
to
230b6c9
Compare
All 11 commits are merged. They should be squashed instead. |
the use of this software, even if advised of the possibility of such damage. | ||
*/ | ||
|
||
#include "precomp.hpp" |
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.
precomp.hpp
must be restored.
@@ -7,7 +7,6 @@ | |||
#include "opencv2/ts.hpp" | |||
#include "opencv2/imgproc.hpp" | |||
#include "opencv2/calib3d.hpp" | |||
#include "opencv2/aruco.hpp" | |||
#include <opencv2/aruco/charuco.hpp> |
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.
What is the purpose of this change?
If you want to remove module's headers, then remove them all (charuco.hpp is still here).
Currently it looks like that something was broken and there is a hack to hide that (so user code may be broken too).
Preparing ArUco module to move to main opencv repository.
ArucoDetector
class (with detectMarkers() and refineDetectedMarkers() methods)ArucoDetector
inherits from classcv::Algorithm
and implemented read()/write()possible add class BaseBoard to work with calibrateCamera/PoseEstimation/SolvePnP?
To move ArUco module to main opencv repository need to move all files except "aruco.cpp" and "aruco.hpp"
Before merging, it is necessary to make a git squash.
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.