Skip to content

(5.x) Merge 4.x #3413

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

Merged
merged 138 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
9e591fb
Add support for av1 and update fourcc mapping to deal with all combin…
cudawarped Aug 5, 2022
badef60
Remove unused size of get_subbox_chart_physical()
y-guyon Aug 8, 2022
cd97cad
Use T as temp var type in polyanticlockwise()
y-guyon Aug 8, 2022
9685382
Set window_size to 1 if round down results in 0. Without this fix, we…
kishorgandham Aug 21, 2022
4e4e3c3
sfm: Fix redefinition error in 32 bit mingw-w64 environment
Biswa96 Aug 23, 2022
66809ea
Fix memory leak caused by incorrect use of smart pointer.
cudawarped Aug 25, 2022
087a100
Merge pull request #3313 from Qubiz:Qubiz-find-hdr-parser-path-using-…
Qubiz Aug 26, 2022
2b0bbb5
add scaleFactor/setScaleFactor/getScaleFactor
Jul 28, 2022
06e1f62
Merge pull request #3287 from AleksandrPanov:wechat_fix_large_img
asmorkalov Aug 29, 2022
de41bb9
Merge pull request #3340 from cudawarped:cudacodec_add_codecs
asmorkalov Aug 30, 2022
cee17e4
fix output qr corners (accuracy+order), add test
Aug 31, 2022
0be54f2
Untemplate polyanticlockwise() and polyclockwise()
y-guyon Sep 1, 2022
4a91f2f
Merge pull request #3331 from kishorgandham:4.x
asmorkalov Sep 5, 2022
94ca0c5
Move poly*clockwise() definition to common.cpp
y-guyon Sep 5, 2022
7a42990
Merge pull request #3323 from y-guyon:fix_polyanticlockwise
asmorkalov Sep 5, 2022
ebd6445
Merge pull request #3334 from Biswa96:sfm-mingw-sincos
asmorkalov Sep 5, 2022
47bf66f
Merge pull request #3289 from AleksandrPanov:wechat_fix_output_qr_cor…
asmorkalov Sep 5, 2022
467fd62
Merge pull request #3321 from y-guyon:fix_get_subbox_chart_physical
asmorkalov Sep 5, 2022
3559e76
fixed bug and cast warnings
Sep 5, 2022
2216d0c
Merge pull request #3346 from AleksandrPanov:fix_win_warnings
alalek Sep 5, 2022
432cda8
fix cast warnings
Sep 6, 2022
971685c
Merge pull request #3347 from AleksandrPanov:wechat_fix_win_warnings
alalek Sep 6, 2022
b865387
Update edge_drawing.py
sturkmen72 Sep 7, 2022
4476b9b
remove upscale, add tiny qr test
Sep 12, 2022
98c9d36
enable 2 tests, enable dnn detector
Sep 12, 2022
6573353
Replace internal raw pointer with vect.
cudawarped Sep 12, 2022
ce16ef9
Merge pull request #3352 from AleksandrPanov:wechat_enable_tests
asmorkalov Sep 12, 2022
de84cc0
Merge pull request #3350 from AleksandrPanov:wechat_remove_upscale
asmorkalov Sep 12, 2022
14b5933
fix the bug that cannot detect multi qrcode when use_nn_detector is f…
bit1002lst Sep 6, 2022
f30e80e
fix the bug that cannot detect multi qrcode when use_nn_detector is f…
bit1002lst Sep 6, 2022
4c2283f
fix the bug that cannot detect multi qrcode when use_nn_detector is f…
bit1002lst Sep 6, 2022
5d90679
fix the bug that cannot detect multi qrcode when use_nn_detector is f…
bit1002lst Sep 6, 2022
587207b
Initail commit adding nvdec scaling and cropping to cudacodec
cudawarped Aug 25, 2022
1b92ec7
Add missing cmake target.
cudawarped Sep 18, 2022
14157b1
fixed duplicate corners and style
Sep 19, 2022
cfcfd5f
add multi detect test
Sep 19, 2022
a3afb87
add return for nn_detector
Sep 20, 2022
58e7e30
Add other missing target.
cudawarped Sep 21, 2022
74fce7f
Merge pull request #3355 from cudawarped:cudacodec_add_resize_crop
asmorkalov Sep 22, 2022
f9d92f2
adding python smoke test for MSDDetector
berak Sep 23, 2022
6fb484c
adding python smoke test for MSDDetector
berak Sep 23, 2022
18b98a5
Merge pull request #3357 from berak/patch-2
asmorkalov Sep 23, 2022
94d15ee
Merge pull request #3339 from cudawarped:cudacodec_fix_memory_leak
asmorkalov Sep 26, 2022
cef9724
Merge pull request #3351 from bit1002lst:decode_multi_qrcodes
asmorkalov Sep 28, 2022
07c6760
Merge pull request #3349 from sturkmen72:patch-3
asmorkalov Sep 29, 2022
4057993
xphoto fix inpaint fsr
berak Aug 24, 2022
c4027ab
Merge pull request #3336 from berak:xphoto_fix_inpaint_fsr
asmorkalov Oct 3, 2022
9ccca57
Update cudacodec::VideoWriter to work with the latest Nvidia Video Co…
cudawarped Oct 7, 2022
22261ec
Fix documentation warning
cudawarped Oct 9, 2022
e1bd434
Address cmake errors, build warnings and use codec supported by windo…
cudawarped Oct 10, 2022
be91fa8
Workflow Ubuntu 20.04 x64 with CUDA support (4.x)
asenyaev Oct 12, 2022
2f4d9dc
Merge pull request #3363 from asenyaev:asen/cuda_pipelines_4.x
asmorkalov Oct 13, 2022
4fa9c71
Four factory method version.
cudawarped Oct 14, 2022
fbd6827
Two factory methods.
cudawarped Oct 14, 2022
ff5da1e
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
alalek Oct 15, 2022
a8864db
Add read/write functions to xfeatures2d and normalize naming convention
Jul 6, 2021
11b056b
Merge pull request #3322 from MisakiCoca:ellipse
haku-huang Oct 24, 2022
d3b58df
Remove temporary files from accuracy tests.
cudawarped Oct 26, 2022
8679014
Extend Codec and ColorFormat enums instead of using VideoWriter speci…
cudawarped Oct 27, 2022
ea1fe97
Remove slash.
cudawarped Oct 27, 2022
9d84eae
Merge pull request #3360 from cudawarped:nvcuvenc
asmorkalov Oct 28, 2022
1754d03
Merge pull request #3285 from bebuch:4.x
bebuch Nov 16, 2022
9b87bed
Move EncoderParams constructor and add build/run instructions/comments
Nov 22, 2022
9b9ec60
Fix bug in cudacodec preventing it from building against the Nvidia V…
Nov 22, 2022
871d14a
Merge pull request #3380 from cudawarped:fix_video_writer_python_bind…
asmorkalov Nov 23, 2022
cb95689
Merge pull request #3381 from cudawarped:fix_for_video_codec_sdk_12
asmorkalov Nov 23, 2022
d6102ef
Update dictionary.hpp (#3297)
wpwupingwp Nov 27, 2022
4a1b89d
move testCharucoCornersCollinear to CharucoBoard
Oct 10, 2022
29c3a4a
remove static create, remove setters, move EstimateParameters, fix Py…
Nov 2, 2022
0159ea3
add pimpl for ArucoDetector
Nov 2, 2022
95cf9ef
fix dict
Nov 2, 2022
b562b69
fix python/Java tests, add new Java test
Nov 24, 2022
83f9947
fixes
Nov 24, 2022
f64e2d3
remove Ptr RefineParameters
Nov 25, 2022
52c0566
remove Ptr DetectorParameters
Nov 28, 2022
85d7357
fix EstimateParameters
Nov 28, 2022
0af5f73
Reset cuda runtime error code to cudasuccess on runtime failure.
cudawarped Nov 29, 2022
53ab7c3
keep cufftPlan2d across ConvolveImpl::convolve calls
r2d3 Nov 30, 2022
4e0187f
remove Ptr Dictionary
Dec 5, 2022
38b0a77
move py aruco tests
Dec 6, 2022
774dfe1
move java aruco tests
Dec 6, 2022
e28f18c
fixes
Dec 8, 2022
267189d
remove ArucoDetector from contrib py test
Dec 8, 2022
bf4dd56
build: fix/eliminate MSVC warnings
alalek Dec 10, 2022
0792588
Merge pull request #3389 from alalek:build_warnings_msvc
alalek Dec 10, 2022
774a91a
add setDetectorParameters()
Dec 12, 2022
86fc959
renaming draw
Dec 12, 2022
7b1f751
renaming
Dec 13, 2022
9d1c0f5
Merge pull request #3383 from cudawarped:mirror_22633
asmorkalov Dec 14, 2022
c0133e5
Merge pull request #3386 from r2d3:convolve_cuda
asmorkalov Dec 14, 2022
ef510ad
fixing
Dec 14, 2022
874ca26
4.x: Always run CUDA branch on CI.
asmorkalov Dec 15, 2022
8a6ea82
Replace all instances of texture references/objects with texture obje…
cudawarped Oct 15, 2022
6d6b81e
Merge pull request #3391 from asmorkalov:as/run_cuda_always
asmorkalov Dec 15, 2022
afe6ddd
Merge pull request #3325 from AleksandrPanov:move_contrib_aruco_to_ma…
asmorkalov Dec 16, 2022
54d1e5e
Update find_ellipses.cpp
sturkmen72 Oct 24, 2022
b5f4e24
Merge pull request #3369 from sturkmen72:update_find_ellipses
asmorkalov Dec 19, 2022
a28d875
move drawDetectedCornersCharuco()
Dec 19, 2022
27a72e8
Fix aruco detection tutorial
stopmosk Dec 19, 2022
5d8d02a
Remove command line args snippet
stopmosk Dec 20, 2022
8db3e62
Merge pull request #3378 from cudawarped:replace_texture_ref_with_tex…
asmorkalov Dec 20, 2022
00f6afa
Fix aruco board tutorial
stopmosk Dec 20, 2022
eee0b39
Remove trailing whitespaces
stopmosk Dec 20, 2022
58b0fce
Fix code snippet
stopmosk Dec 20, 2022
168a4f1
Fix code snippet
stopmosk Dec 20, 2022
4a81ec4
add CharucoDetector to test
Dec 20, 2022
297724f
move aruco tests to objdetect
Dec 21, 2022
c02d6fd
move aruco perf tests to objdetect
Dec 21, 2022
44162ff
aruco(cleanup): don't use Ptr<FileStorage>
alalek Dec 21, 2022
d1d3c50
Merge pull request #3003 from augustinmanecy:features2d-rw
asmorkalov Dec 21, 2022
95d1aa4
obj-c: remove 'const_fix' usage
alalek Dec 21, 2022
82b7b2c
Merge pull request #3397 from alalek:objdetect_cleanup_aruco_ptr_file…
alalek Dec 21, 2022
4c3af23
add empty PERF_TEST_MAIN(aruco)
Dec 21, 2022
4e0acea
Remove references to deprecated NumPy type aliases.
vrabaud Dec 21, 2022
e22e185
Replace citation
stopmosk Dec 21, 2022
1b130df
Fix aruco detect_markers tutorial and code example
stopmosk Dec 21, 2022
d7787b5
Fix aruco detect_board tutorial and example code
stopmosk Dec 21, 2022
f4868db
move py test_read_write_dict
Dec 21, 2022
522bba3
move drawDetectedDiamonds
Dec 22, 2022
6ccd799
Merge pull request #3399 from vrabaud:numpy_fix
asmorkalov Dec 22, 2022
be58d55
Extract setting coord system from loop body
stopmosk Dec 22, 2022
1b4bab0
Fix tutorials and example code
stopmosk Dec 22, 2022
22d0e71
Fix tutorials and example code
stopmosk Dec 22, 2022
8cc11b2
Replace undefined valid to markersOfBoardDetected
stopmosk Dec 22, 2022
78a377a
Fix doxygen links in tutorial
stopmosk Dec 22, 2022
e2ba6ca
update docs
Dec 22, 2022
83cb56d
Mark deprecated methods
stopmosk Dec 22, 2022
f15e587
Merge pull request #3398 from alalek:issue_22206
alalek Dec 23, 2022
a20b303
Fix for Aruco Objective-C binding
komakai Dec 23, 2022
0c6b04a
Merge pull request #3396 from stopmosk:fix-aruco-tutorials
asmorkalov Dec 23, 2022
af3a467
Merge pull request #3402 from komakai:fix_aruco_objc
alalek Dec 24, 2022
2b95a6d
Fixed SURF linkage issue without nonfree.
asmorkalov Dec 26, 2022
b9111a9
Merge pull request #3403 from asmorkalov:as/surf_link_fix
asmorkalov Dec 26, 2022
2fa21c1
cuda: fix CUDA 12.0 build errors
cudawarped Dec 26, 2022
2276095
Merge pull request #3404 from cudawarped:fix_for_cuda_12
alalek Dec 27, 2022
49bdf7b
Board refactoring.
asmorkalov Dec 27, 2022
e247b68
Merge pull request #3394 from AleksandrPanov:move_contrib_charuco_to_…
asmorkalov Dec 28, 2022
d980cc3
Merge branch 4.x
alalek Jan 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/aruco/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(the_description "ArUco Marker Detection")
ocv_define_module(aruco opencv_core opencv_imgproc opencv_3d opencv_calib WRAP python java objc js)
ocv_define_module(aruco opencv_core opencv_imgproc opencv_3d opencv_calib opencv_objdetect WRAP python java objc js)
ocv_include_directories(${CMAKE_CURRENT_BINARY_DIR})

ocv_add_testdata(samples/ contrib/aruco
Expand Down
87 changes: 77 additions & 10 deletions modules/aruco/include/opencv2/aruco.hpp
Original file line number Diff line number Diff line change
@@ -1,33 +1,100 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
#ifndef __OPENCV_ARUCO_HPP__
#define __OPENCV_ARUCO_HPP__
#ifndef OPENCV_ARUCO_HPP
#define OPENCV_ARUCO_HPP

#include "opencv2/aruco_detector.hpp"
#include "opencv2/aruco/aruco_calib_pose.hpp"
#include "opencv2/objdetect/aruco_detector.hpp"
#include "opencv2/aruco/aruco_calib.hpp"

namespace cv {
namespace aruco {


/**
@deprecated Use class ArucoDetector
* @defgroup aruco Aruco markers, module functionality was moved to objdetect module
* @{
* ArUco Marker Detection, module functionality was moved to objdetect module
* @sa ArucoDetector, CharucoDetector, Board, GridBoard, CharucoBoard
* @}
*/

//! @addtogroup aruco
//! @{

/** @brief detect markers
@deprecated Use class ArucoDetector::detectMarkers
*/
CV_EXPORTS_W void detectMarkers(InputArray image, const Ptr<Dictionary> &dictionary, OutputArrayOfArrays corners,
OutputArray ids, const Ptr<DetectorParameters> &parameters = DetectorParameters::create(),
OutputArray ids, const Ptr<DetectorParameters> &parameters = makePtr<DetectorParameters>(),
OutputArrayOfArrays rejectedImgPoints = noArray());

/**
@deprecated Use class ArucoDetector
/** @brief refine detected markers
@deprecated Use class ArucoDetector::refineDetectedMarkers
*/
CV_EXPORTS_W void refineDetectedMarkers(InputArray image,const Ptr<Board> &board,
InputOutputArrayOfArrays detectedCorners,
InputOutputArray detectedIds, InputOutputArrayOfArrays rejectedCorners,
InputArray cameraMatrix = noArray(), InputArray distCoeffs = noArray(),
float minRepDistance = 10.f, float errorCorrectionRate = 3.f,
bool checkAllOrders = true, OutputArray recoveredIdxs = noArray(),
const Ptr<DetectorParameters> &parameters = DetectorParameters::create());
const Ptr<DetectorParameters> &parameters = makePtr<DetectorParameters>());

/** @brief draw planar board
@deprecated Use Board::generateImage
*/
CV_EXPORTS_W void drawPlanarBoard(const Ptr<Board> &board, Size outSize, OutputArray img, int marginSize,
int borderBits);

/** @brief get board object and image points
@deprecated Use Board::matchImagePoints
*/
CV_EXPORTS_W void getBoardObjectAndImagePoints(const Ptr<Board> &board, InputArrayOfArrays detectedCorners,
InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints);


/** @deprecated Use cv::solvePnP
*/
CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
InputOutputArray tvec, bool useExtrinsicGuess = false);

/**
* @brief Pose estimation for a ChArUco board given some of their corners
* @param charucoCorners vector of detected charuco corners
* @param charucoIds list of identifiers for each corner in charucoCorners
* @param board layout of ChArUco board.
* @param cameraMatrix input 3x3 floating-point camera matrix
* \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
* @param distCoeffs vector of distortion coefficients
* \f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\f$ of 4, 5, 8 or 12 elements
* @param rvec Output vector (e.g. cv::Mat) corresponding to the rotation vector of the board
* (see cv::Rodrigues).
* @param tvec Output vector (e.g. cv::Mat) corresponding to the translation vector of the board.
* @param useExtrinsicGuess defines whether initial guess for \b rvec and \b tvec will be used or not.
*
* This function estimates a Charuco board pose from some detected corners.
* The function checks if the input corners are enough and valid to perform pose estimation.
* If pose estimation is valid, returns true, else returns false.
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
*/
CV_EXPORTS_W bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds,
const Ptr<CharucoBoard> &board, InputArray cameraMatrix,
InputArray distCoeffs, InputOutputArray rvec,
InputOutputArray tvec, bool useExtrinsicGuess = false);

/** @deprecated Use cv::solvePnP
*/
CV_EXPORTS_W void estimatePoseSingleMarkers(InputArrayOfArrays corners, float markerLength,
InputArray cameraMatrix, InputArray distCoeffs,
OutputArray rvecs, OutputArray tvecs, OutputArray objPoints = noArray(),
const Ptr<EstimateParameters>& estimateParameters = makePtr<EstimateParameters>());


/** @deprecated Use CharucoBoard::checkCharucoCornersCollinear
*/
CV_EXPORTS_W bool testCharucoCornersCollinear(const Ptr<CharucoBoard> &board, InputArray charucoIds);

//! @}

}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html
#ifndef __OPENCV_ARUCO_CALIB_POSE_HPP__
#define __OPENCV_ARUCO_CALIB_POSE_HPP__
#include <opencv2/aruco/board.hpp>
#include <opencv2/calib3d.hpp>
#ifndef OPENCV_ARUCO_CALIB_POSE_HPP
#define OPENCV_ARUCO_CALIB_POSE_HPP
#include <opencv2/objdetect/aruco_board.hpp>

namespace cv {
namespace aruco {
Expand All @@ -13,143 +12,54 @@ namespace aruco {
//! @{

/** @brief rvec/tvec define the right handed coordinate system of the marker.
* PatternPos defines center this system and axes direction.
*
* PatternPositionType defines center this system and axes direction.
* Axis X (red color) - first coordinate, axis Y (green color) - second coordinate,
* axis Z (blue color) - third coordinate.
* @sa estimatePoseSingleMarkers(), @ref tutorial_aruco_detection
* @sa estimatePoseSingleMarkers(), check tutorial_aruco_detection in aruco contrib
*/
enum PatternPos {
enum PatternPositionType {
/** @brief The marker coordinate system is centered on the middle of the marker.
*
* The coordinates of the four corners (CCW order) of the marker in its own coordinate system are:
* (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0),
* (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0).
*
* These pattern points define this coordinate system:
* ![Image with axes drawn](images/singlemarkersaxes.jpg)
* ![Image with axes drawn](tutorials/images/singlemarkersaxes.jpg)
*/
ARUCO_CCW_CENTER,
/** @brief The marker coordinate system is centered on the top-left corner of the marker.
*
* The coordinates of the four corners (CW order) of the marker in its own coordinate system are:
* (0, 0, 0), (markerLength, 0, 0),
* (markerLength, markerLength, 0), (0, markerLength, 0).
*
* These pattern points define this coordinate system:
* ![Image with axes drawn](images/singlemarkersaxes2.jpg)
* ![Image with axes drawn](tutorials/images/singlemarkersaxes2.jpg)
*
* These pattern dots are convenient to use with a chessboard/ChArUco board.
*/
ARUCO_CW_TOP_LEFT_CORNER
};

/** @brief Pose estimation parameters
* @param pattern Defines center this system and axes direction (default PatternPos::ARUCO_CCW_CENTER).
*
* @param pattern Defines center this system and axes direction (default PatternPositionType::ARUCO_CCW_CENTER).
* @param useExtrinsicGuess Parameter used for SOLVEPNP_ITERATIVE. If true (1), the function uses the provided
* rvec and tvec values as initial approximations of the rotation and translation vectors, respectively, and further
* optimizes them (default false).
* @param solvePnPMethod Method for solving a PnP problem: see @ref calib3d_solvePnP_flags (default SOLVEPNP_ITERATIVE).
* @sa PatternPos, solvePnP(), @ref tutorial_aruco_detection
* @sa PatternPositionType, solvePnP(), check tutorial_aruco_detection in aruco contrib
*/
struct CV_EXPORTS_W EstimateParameters {
CV_PROP_RW PatternPos pattern;
struct CV_EXPORTS_W_SIMPLE EstimateParameters {
CV_PROP_RW PatternPositionType pattern;
CV_PROP_RW bool useExtrinsicGuess;
CV_PROP_RW SolvePnPMethod solvePnPMethod;
CV_PROP_RW int solvePnPMethod;

EstimateParameters(): pattern(ARUCO_CCW_CENTER), useExtrinsicGuess(false),
solvePnPMethod(SOLVEPNP_ITERATIVE) {}

CV_WRAP static Ptr<EstimateParameters> create() {
return makePtr<EstimateParameters>();
}
CV_WRAP EstimateParameters();
};


/**
* @brief Pose estimation for single markers
*
* @param corners vector of already detected markers corners. For each marker, its four corners
* are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers,
* the dimensions of this array should be Nx4. The order of the corners should be clockwise.
* @sa detectMarkers
* @param markerLength the length of the markers' side. The returning translation vectors will
* be in the same unit. Normally, unit is meters.
* @param cameraMatrix input 3x3 floating-point camera matrix
* \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
* @param distCoeffs vector of distortion coefficients
* \f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\f$ of 4, 5, 8 or 12 elements
* @param rvecs array of output rotation vectors (@sa Rodrigues) (e.g. std::vector<cv::Vec3d>).
* Each element in rvecs corresponds to the specific marker in imgPoints.
* @param tvecs array of output translation vectors (e.g. std::vector<cv::Vec3d>).
* Each element in tvecs corresponds to the specific marker in imgPoints.
* @param objPoints array of object points of all the marker corners
* @param estimateParameters set the origin of coordinate system and the coordinates of the four corners of the marker
* (default estimateParameters.pattern = PatternPos::ARUCO_CCW_CENTER, estimateParameters.useExtrinsicGuess = false,
* estimateParameters.solvePnPMethod = SOLVEPNP_ITERATIVE).
*
* This function receives the detected markers and returns their pose estimation respect to
* 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 coordinate system is centered on the middle (by default) or on the top-left corner of the marker,
* with the Z axis perpendicular to the marker plane.
* estimateParameters defines the coordinates of the four corners of the marker in its own coordinate system (by default) are:
* (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0),
* (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0)
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
* @sa @ref tutorial_aruco_detection
* @sa EstimateParameters
* @sa PatternPos
*/
CV_EXPORTS_W void estimatePoseSingleMarkers(InputArrayOfArrays corners, float markerLength,
InputArray cameraMatrix, InputArray distCoeffs,
OutputArray rvecs, OutputArray tvecs, OutputArray objPoints = noArray(),
const Ptr<EstimateParameters>& estimateParameters = EstimateParameters::create());

/**
* @brief Pose estimation for a board of markers
*
* @param corners vector of already detected markers corners. For each marker, its four corners
* are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
* dimensions of this array should be Nx4. The order of the corners should be clockwise.
* @param ids list of identifiers for each marker in corners
* @param board layout of markers in the board. The layout is composed by the marker identifiers
* and the positions of each marker corner in the board reference system.
* @param cameraMatrix input 3x3 floating-point camera matrix
* \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
* @param distCoeffs vector of distortion coefficients
* \f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\f$ of 4, 5, 8 or 12 elements
* @param rvec Output vector (e.g. cv::Mat) corresponding to the rotation vector of the board
* (see cv::Rodrigues). Used as initial guess if not empty.
* @param tvec Output vector (e.g. cv::Mat) corresponding to the translation vector of the board.
* @param useExtrinsicGuess defines whether initial guess for \b rvec and \b tvec will be used or not.
* Used as initial guess if not empty.
*
* This function receives the detected markers and returns the pose of a marker board composed
* by those markers.
* A Board of marker has a single world coordinate system which is defined by the board layout.
* The returned transformation is the one that transforms points from the board coordinate system
* to the camera coordinate system.
* Input markers that are not included in the board layout are ignored.
* The function returns the number of markers from the input employed for the board pose estimation.
* Note that returning a 0 means the pose has not been estimated.
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
*/
CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
InputOutputArray tvec, bool useExtrinsicGuess = false);

/**
* @brief Given a board configuration and a set of detected markers, returns the corresponding
* image points and object points to call solvePnP
*
* @param board Marker board layout.
* @param detectedCorners List of detected marker corners of the board.
* @param detectedIds List of identifiers for each marker.
* @param objPoints Vector of vectors of board marker points in the board coordinate space.
* @param imgPoints Vector of vectors of the projections of board marker corner points.
*/
CV_EXPORTS_W void getBoardObjectAndImagePoints(const Ptr<Board> &board, InputArrayOfArrays detectedCorners,
InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints);

/**
* @brief Calibrate a camera using aruco markers
*
Expand Down Expand Up @@ -203,29 +113,6 @@ CV_EXPORTS_W double calibrateCameraAruco(InputArrayOfArrays corners, InputArray
const TermCriteria& criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS,
30, DBL_EPSILON));

/**
* @brief Pose estimation for a ChArUco board given some of their corners
* @param charucoCorners vector of detected charuco corners
* @param charucoIds list of identifiers for each corner in charucoCorners
* @param board layout of ChArUco board.
* @param cameraMatrix input 3x3 floating-point camera matrix
* \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
* @param distCoeffs vector of distortion coefficients
* \f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\f$ of 4, 5, 8 or 12 elements
* @param rvec Output vector (e.g. cv::Mat) corresponding to the rotation vector of the board
* (see cv::Rodrigues).
* @param tvec Output vector (e.g. cv::Mat) corresponding to the translation vector of the board.
* @param useExtrinsicGuess defines whether initial guess for \b rvec and \b tvec will be used or not.
*
* This function estimates a Charuco board pose from some detected corners.
* The function checks if the input corners are enough and valid to perform pose estimation.
* If pose estimation is valid, returns true, else returns false.
* @sa use cv::drawFrameAxes to get world coordinate system axis for object points
*/
CV_EXPORTS_W bool estimatePoseCharucoBoard(InputArray charucoCorners, InputArray charucoIds,
const Ptr<CharucoBoard> &board, InputArray cameraMatrix,
InputArray distCoeffs, InputOutputArray rvec,
InputOutputArray tvec, bool useExtrinsicGuess = false);

/**
* @brief Calibrate a camera using Charuco corners
Expand Down
Loading