Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
82e612bb
Commit
82e612bb
authored
Oct 06, 2016
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #794 from mshabunin:aruco-java-wrap
parents
15b392f6
caf7fa97
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
53 deletions
+53
-53
CMakeLists.txt
modules/aruco/CMakeLists.txt
+1
-1
aruco.hpp
modules/aruco/include/opencv2/aruco.hpp
+11
-11
charuco.hpp
modules/aruco/include/opencv2/aruco/charuco.hpp
+9
-9
dictionary.hpp
modules/aruco/include/opencv2/aruco/dictionary.hpp
+2
-2
aruco.cpp
modules/aruco/src/aruco.cpp
+17
-17
charuco.cpp
modules/aruco/src/charuco.cpp
+10
-10
dictionary.cpp
modules/aruco/src/dictionary.cpp
+3
-3
No files found.
modules/aruco/CMakeLists.txt
View file @
82e612bb
set
(
the_description
"ArUco Marker Detection"
)
ocv_define_module
(
aruco opencv_core opencv_imgproc opencv_calib3d WRAP python
)
ocv_define_module
(
aruco opencv_core opencv_imgproc opencv_calib3d WRAP python
java
)
modules/aruco/include/opencv2/aruco.hpp
View file @
82e612bb
...
...
@@ -173,7 +173,7 @@ struct CV_EXPORTS_W DetectorParameters {
* @sa estimatePoseSingleMarkers, estimatePoseBoard
*
*/
CV_EXPORTS_W
void
detectMarkers
(
InputArray
image
,
Ptr
<
Dictionary
>
&
dictionary
,
OutputArrayOfArrays
corners
,
CV_EXPORTS_W
void
detectMarkers
(
InputArray
image
,
const
Ptr
<
Dictionary
>
&
dictionary
,
OutputArrayOfArrays
corners
,
OutputArray
ids
,
const
Ptr
<
DetectorParameters
>
&
parameters
=
DetectorParameters
::
create
(),
OutputArrayOfArrays
rejectedImgPoints
=
noArray
());
...
...
@@ -234,7 +234,7 @@ class CV_EXPORTS_W Board {
* @param ids vector of the identifiers of the markers in the board
*
*/
CV_WRAP
static
Ptr
<
Board
>
create
(
InputArrayOfArrays
objPoints
,
Ptr
<
Dictionary
>
&
dictionary
,
InputArray
ids
);
CV_WRAP
static
Ptr
<
Board
>
create
(
InputArrayOfArrays
objPoints
,
const
Ptr
<
Dictionary
>
&
dictionary
,
InputArray
ids
);
// array of object points of all the marker corners in the board
// each marker include its 4 corners, i.e. for M markers, the size is Mx4
CV_PROP
std
::
vector
<
std
::
vector
<
Point3f
>
>
objPoints
;
...
...
@@ -286,7 +286,7 @@ class CV_EXPORTS_W GridBoard : public Board {
* the marker size and marker separation.
*/
CV_WRAP
static
Ptr
<
GridBoard
>
create
(
int
markersX
,
int
markersY
,
float
markerLength
,
float
markerSeparation
,
Ptr
<
Dictionary
>
&
dictionary
,
int
firstMarker
=
0
);
float
markerSeparation
,
const
Ptr
<
Dictionary
>
&
dictionary
,
int
firstMarker
=
0
);
/**
*
...
...
@@ -344,7 +344,7 @@ class CV_EXPORTS_W GridBoard : public Board {
* 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.
*/
CV_EXPORTS_W
int
estimatePoseBoard
(
InputArrayOfArrays
corners
,
InputArray
ids
,
Ptr
<
Board
>
&
board
,
CV_EXPORTS_W
int
estimatePoseBoard
(
InputArrayOfArrays
corners
,
InputArray
ids
,
const
Ptr
<
Board
>
&
board
,
InputArray
cameraMatrix
,
InputArray
distCoeffs
,
OutputArray
rvec
,
OutputArray
tvec
);
...
...
@@ -383,7 +383,7 @@ CV_EXPORTS_W int estimatePoseBoard(InputArrayOfArrays corners, InputArray ids, P
* homography, and all the marker corners in the board must have the same Z coordinate.
*/
CV_EXPORTS_W
void
refineDetectedMarkers
(
InputArray
image
,
Ptr
<
Board
>
&
board
,
InputOutputArrayOfArrays
detectedCorners
,
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
,
...
...
@@ -447,7 +447,7 @@ CV_EXPORTS_W void drawAxis(InputOutputArray image, InputArray cameraMatrix, Inpu
*
* This function returns a marker image in its canonical form (i.e. ready to be printed)
*/
CV_EXPORTS_W
void
drawMarker
(
Ptr
<
Dictionary
>
&
dictionary
,
int
id
,
int
sidePixels
,
OutputArray
img
,
CV_EXPORTS_W
void
drawMarker
(
const
Ptr
<
Dictionary
>
&
dictionary
,
int
id
,
int
sidePixels
,
OutputArray
img
,
int
borderBits
=
1
);
...
...
@@ -467,7 +467,7 @@ CV_EXPORTS_W void drawMarker(Ptr<Dictionary> &dictionary, int id, int sidePixels
* This function return the image of a planar board, ready to be printed. It assumes
* the Board layout specified is planar by ignoring the z coordinates of the object points.
*/
CV_EXPORTS_W
void
drawPlanarBoard
(
Ptr
<
Board
>
&
board
,
Size
outSize
,
OutputArray
img
,
CV_EXPORTS_W
void
drawPlanarBoard
(
const
Ptr
<
Board
>
&
board
,
Size
outSize
,
OutputArray
img
,
int
marginSize
=
0
,
int
borderBits
=
1
);
...
...
@@ -517,18 +517,18 @@ void _drawPlanarBoardImpl(Board *board, Size outSize, OutputArray img,
* calibration in calibrateCamera(). The function returns the final re-projection error.
*/
CV_EXPORTS_AS
(
calibrateCameraArucoExtended
)
double
calibrateCameraAruco
(
InputArrayOfArrays
corners
,
InputArray
ids
,
InputArray
counter
,
Ptr
<
Board
>
&
board
,
InputArrayOfArrays
corners
,
InputArray
ids
,
InputArray
counter
,
const
Ptr
<
Board
>
&
board
,
Size
imageSize
,
InputOutputArray
cameraMatrix
,
InputOutputArray
distCoeffs
,
OutputArrayOfArrays
rvecs
,
OutputArrayOfArrays
tvecs
,
OutputArray
stdDeviationsIntrinsics
=
noArray
(),
OutputArray
stdDeviationsExtrinsics
=
noArray
()
,
OutputArray
perViewErrors
=
noArray
()
,
int
flags
=
0
,
OutputArray
stdDeviationsIntrinsics
,
OutputArray
stdDeviationsExtrinsics
,
OutputArray
perViewErrors
,
int
flags
=
0
,
TermCriteria
criteria
=
TermCriteria
(
TermCriteria
::
COUNT
+
TermCriteria
::
EPS
,
30
,
DBL_EPSILON
));
/** @brief It's the same function as #calibrateCameraAruco but without calibration error estimation.
*/
CV_EXPORTS_W
double
calibrateCameraAruco
(
InputArrayOfArrays
corners
,
InputArray
ids
,
InputArray
counter
,
Ptr
<
Board
>
&
board
,
InputArrayOfArrays
corners
,
InputArray
ids
,
InputArray
counter
,
const
Ptr
<
Board
>
&
board
,
Size
imageSize
,
InputOutputArray
cameraMatrix
,
InputOutputArray
distCoeffs
,
OutputArrayOfArrays
rvecs
=
noArray
(),
OutputArrayOfArrays
tvecs
=
noArray
(),
int
flags
=
0
,
TermCriteria
criteria
=
TermCriteria
(
TermCriteria
::
COUNT
+
TermCriteria
::
EPS
,
30
,
DBL_EPSILON
));
...
...
modules/aruco/include/opencv2/aruco/charuco.hpp
View file @
82e612bb
...
...
@@ -98,7 +98,7 @@ class CV_EXPORTS_W CharucoBoard : public Board {
* and the size of the markers and chessboard squares.
*/
CV_WRAP
static
Ptr
<
CharucoBoard
>
create
(
int
squaresX
,
int
squaresY
,
float
squareLength
,
float
markerLength
,
Ptr
<
Dictionary
>
&
dictionary
);
float
markerLength
,
const
Ptr
<
Dictionary
>
&
dictionary
);
/**
*
...
...
@@ -155,7 +155,7 @@ class CV_EXPORTS_W CharucoBoard : public Board {
* The function returns the number of interpolated corners.
*/
CV_EXPORTS_W
int
interpolateCornersCharuco
(
InputArrayOfArrays
markerCorners
,
InputArray
markerIds
,
InputArray
image
,
Ptr
<
CharucoBoard
>
&
board
,
InputArray
image
,
const
Ptr
<
CharucoBoard
>
&
board
,
OutputArray
charucoCorners
,
OutputArray
charucoIds
,
InputArray
cameraMatrix
=
noArray
(),
InputArray
distCoeffs
=
noArray
());
...
...
@@ -181,7 +181,7 @@ CV_EXPORTS_W int interpolateCornersCharuco(InputArrayOfArrays markerCorners, Inp
* If pose estimation is valid, returns true, else returns false.
*/
CV_EXPORTS_W
bool
estimatePoseCharucoBoard
(
InputArray
charucoCorners
,
InputArray
charucoIds
,
Ptr
<
CharucoBoard
>
&
board
,
InputArray
cameraMatrix
,
const
Ptr
<
CharucoBoard
>
&
board
,
InputArray
cameraMatrix
,
InputArray
distCoeffs
,
OutputArray
rvec
,
OutputArray
tvec
);
...
...
@@ -239,17 +239,17 @@ CV_EXPORTS_W void drawDetectedCornersCharuco(InputOutputArray image, InputArray
* The function returns the final re-projection error.
*/
CV_EXPORTS_AS
(
calibrateCameraCharucoExtended
)
double
calibrateCameraCharuco
(
InputArrayOfArrays
charucoCorners
,
InputArrayOfArrays
charucoIds
,
Ptr
<
CharucoBoard
>
&
board
,
InputArrayOfArrays
charucoCorners
,
InputArrayOfArrays
charucoIds
,
const
Ptr
<
CharucoBoard
>
&
board
,
Size
imageSize
,
InputOutputArray
cameraMatrix
,
InputOutputArray
distCoeffs
,
OutputArrayOfArrays
rvecs
=
noArray
(),
OutputArrayOfArrays
tvecs
=
noArray
()
,
OutputArray
stdDeviationsIntrinsics
=
noArray
(),
OutputArray
stdDeviationsExtrinsics
=
noArray
()
,
OutputArray
perViewErrors
=
noArray
()
,
int
flags
=
0
,
OutputArrayOfArrays
rvecs
,
OutputArrayOfArrays
tvecs
,
OutputArray
stdDeviationsIntrinsics
,
OutputArray
stdDeviationsExtrinsics
,
OutputArray
perViewErrors
,
int
flags
=
0
,
TermCriteria
criteria
=
TermCriteria
(
TermCriteria
::
COUNT
+
TermCriteria
::
EPS
,
30
,
DBL_EPSILON
));
/** @brief It's the same function as #calibrateCameraCharuco but without calibration error estimation.
*/
CV_EXPORTS_W
double
calibrateCameraCharuco
(
InputArrayOfArrays
charucoCorners
,
InputArrayOfArrays
charucoIds
,
Ptr
<
CharucoBoard
>
&
board
,
InputArrayOfArrays
charucoCorners
,
InputArrayOfArrays
charucoIds
,
const
Ptr
<
CharucoBoard
>
&
board
,
Size
imageSize
,
InputOutputArray
cameraMatrix
,
InputOutputArray
distCoeffs
,
OutputArrayOfArrays
rvecs
=
noArray
(),
OutputArrayOfArrays
tvecs
=
noArray
(),
int
flags
=
0
,
TermCriteria
criteria
=
TermCriteria
(
TermCriteria
::
COUNT
+
TermCriteria
::
EPS
,
30
,
DBL_EPSILON
));
...
...
@@ -326,7 +326,7 @@ CV_EXPORTS_W void drawDetectedDiamonds(InputOutputArray image, InputArrayOfArray
* This function return the image of a ChArUco marker, ready to be printed.
*/
// TODO cannot be exported yet; conversion from/to Vec4i is not wrapped in core
CV_EXPORTS
void
drawCharucoDiamond
(
Ptr
<
Dictionary
>
&
dictionary
,
Vec4i
ids
,
int
squareLength
,
CV_EXPORTS
void
drawCharucoDiamond
(
const
Ptr
<
Dictionary
>
&
dictionary
,
Vec4i
ids
,
int
squareLength
,
int
markerLength
,
OutputArray
img
,
int
marginSize
=
0
,
int
borderBits
=
1
);
...
...
modules/aruco/include/opencv2/aruco/dictionary.hpp
View file @
82e612bb
...
...
@@ -91,7 +91,7 @@ class CV_EXPORTS_W Dictionary {
* @see generateCustomDictionary
*/
CV_WRAP_AS
(
create_from
)
static
Ptr
<
Dictionary
>
create
(
int
nMarkers
,
int
markerSize
,
Ptr
<
Dictionary
>
&
baseDictionary
);
const
Ptr
<
Dictionary
>
&
baseDictionary
);
/**
* @see getPredefinedDictionary
...
...
@@ -194,7 +194,7 @@ CV_EXPORTS_AS(custom_dictionary) Ptr<Dictionary> generateCustomDictionary(
CV_EXPORTS_AS
(
custom_dictionary_from
)
Ptr
<
Dictionary
>
generateCustomDictionary
(
int
nMarkers
,
int
markerSize
,
Ptr
<
Dictionary
>
&
baseDictionary
);
const
Ptr
<
Dictionary
>
&
baseDictionary
);
...
...
modules/aruco/src/aruco.cpp
View file @
82e612bb
...
...
@@ -480,7 +480,7 @@ static int _getBorderErrors(const Mat &bits, int markerSize, int borderSize) {
/**
* @brief Tries to identify one candidate given the dictionary
*/
static
bool
_identifyOneCandidate
(
Ptr
<
Dictionary
>
&
dictionary
,
InputArray
_image
,
static
bool
_identifyOneCandidate
(
const
Ptr
<
Dictionary
>
&
dictionary
,
InputArray
_image
,
InputOutputArray
_corners
,
int
&
idx
,
const
Ptr
<
DetectorParameters
>
&
params
)
{
CV_Assert
(
_corners
.
total
()
==
4
);
...
...
@@ -530,7 +530,7 @@ static bool _identifyOneCandidate(Ptr<Dictionary> &dictionary, InputArray _image
class
IdentifyCandidatesParallel
:
public
ParallelLoopBody
{
public
:
IdentifyCandidatesParallel
(
const
Mat
&
_grey
,
InputArrayOfArrays
_candidates
,
InputArrayOfArrays
_contours
,
Ptr
<
Dictionary
>
&
_dictionary
,
InputArrayOfArrays
_contours
,
const
Ptr
<
Dictionary
>
&
_dictionary
,
vector
<
int
>&
_idsTmp
,
vector
<
char
>&
_validCandidates
,
const
Ptr
<
DetectorParameters
>
&
_params
)
:
grey
(
_grey
),
candidates
(
_candidates
),
contours
(
_contours
),
dictionary
(
_dictionary
),
...
...
@@ -555,7 +555,7 @@ class IdentifyCandidatesParallel : public ParallelLoopBody {
const
Mat
&
grey
;
InputArrayOfArrays
candidates
,
contours
;
Ptr
<
Dictionary
>
&
dictionary
;
const
Ptr
<
Dictionary
>
&
dictionary
;
vector
<
int
>
&
idsTmp
;
vector
<
char
>
&
validCandidates
;
const
Ptr
<
DetectorParameters
>
&
params
;
...
...
@@ -602,7 +602,7 @@ static void _copyVector2Output(vector< vector< Point2f > > &vec, OutputArrayOfAr
* @brief Identify square candidates according to a marker dictionary
*/
static
void
_identifyCandidates
(
InputArray
_image
,
vector
<
vector
<
Point2f
>
>&
_candidates
,
InputArrayOfArrays
_contours
,
Ptr
<
Dictionary
>
&
_dictionary
,
InputArrayOfArrays
_contours
,
const
Ptr
<
Dictionary
>
&
_dictionary
,
vector
<
vector
<
Point2f
>
>&
_accepted
,
vector
<
int
>&
ids
,
const
Ptr
<
DetectorParameters
>
&
params
,
OutputArrayOfArrays
_rejected
=
noArray
())
{
...
...
@@ -775,7 +775,7 @@ class MarkerSubpixelParallel : public ParallelLoopBody {
/**
*/
void
detectMarkers
(
InputArray
_image
,
Ptr
<
Dictionary
>
&
_dictionary
,
OutputArrayOfArrays
_corners
,
void
detectMarkers
(
InputArray
_image
,
const
Ptr
<
Dictionary
>
&
_dictionary
,
OutputArrayOfArrays
_corners
,
OutputArray
_ids
,
const
Ptr
<
DetectorParameters
>
&
_params
,
OutputArrayOfArrays
_rejectedImgPoints
)
{
...
...
@@ -891,7 +891,7 @@ void estimatePoseSingleMarkers(InputArrayOfArrays _corners, float markerLength,
* @brief Given a board configuration and a set of detected markers, returns the corresponding
* image points and object points to call solvePnP
*/
static
void
_getBoardObjectAndImagePoints
(
Ptr
<
Board
>
&
_board
,
InputArray
_detectedIds
,
static
void
_getBoardObjectAndImagePoints
(
const
Ptr
<
Board
>
&
_board
,
InputArray
_detectedIds
,
InputArrayOfArrays
_detectedCorners
,
OutputArray
_imgPoints
,
OutputArray
_objPoints
)
{
...
...
@@ -934,7 +934,7 @@ static void _getBoardObjectAndImagePoints(Ptr<Board> &_board, InputArray _detect
/**
* Project board markers that are not included in the list of detected markers
*/
static
void
_projectUndetectedMarkers
(
Ptr
<
Board
>
&
_board
,
InputOutputArrayOfArrays
_detectedCorners
,
static
void
_projectUndetectedMarkers
(
const
Ptr
<
Board
>
&
_board
,
InputOutputArrayOfArrays
_detectedCorners
,
InputOutputArray
_detectedIds
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
OutputArrayOfArrays
_undetectedMarkersProjectedCorners
,
...
...
@@ -992,7 +992,7 @@ static void _projectUndetectedMarkers(Ptr<Board> &_board, InputOutputArrayOfArra
* Interpolate board markers that are not included in the list of detected markers using
* global homography
*/
static
void
_projectUndetectedMarkers
(
Ptr
<
Board
>
&
_board
,
InputOutputArrayOfArrays
_detectedCorners
,
static
void
_projectUndetectedMarkers
(
const
Ptr
<
Board
>
&
_board
,
InputOutputArrayOfArrays
_detectedCorners
,
InputOutputArray
_detectedIds
,
OutputArrayOfArrays
_undetectedMarkersProjectedCorners
,
OutputArray
_undetectedMarkersIds
)
{
...
...
@@ -1062,7 +1062,7 @@ static void _projectUndetectedMarkers(Ptr<Board> &_board, InputOutputArrayOfArra
/**
*/
void
refineDetectedMarkers
(
InputArray
_image
,
Ptr
<
Board
>
&
_board
,
void
refineDetectedMarkers
(
InputArray
_image
,
const
Ptr
<
Board
>
&
_board
,
InputOutputArrayOfArrays
_detectedCorners
,
InputOutputArray
_detectedIds
,
InputOutputArrayOfArrays
_rejectedCorners
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
float
minRepDistance
,
float
errorCorrectionRate
,
...
...
@@ -1261,7 +1261,7 @@ void refineDetectedMarkers(InputArray _image, Ptr<Board> &_board,
/**
*/
int
estimatePoseBoard
(
InputArrayOfArrays
_corners
,
InputArray
_ids
,
Ptr
<
Board
>
&
board
,
int
estimatePoseBoard
(
InputArrayOfArrays
_corners
,
InputArray
_ids
,
const
Ptr
<
Board
>
&
board
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
OutputArray
_rvec
,
OutputArray
_tvec
)
{
...
...
@@ -1301,7 +1301,7 @@ void GridBoard::draw(Size outSize, OutputArray _img, int marginSize, int borderB
/**
*/
Ptr
<
Board
>
Board
::
create
(
InputArrayOfArrays
objPoints
,
Ptr
<
Dictionary
>
&
dictionary
,
InputArray
ids
)
{
Ptr
<
Board
>
Board
::
create
(
InputArrayOfArrays
objPoints
,
const
Ptr
<
Dictionary
>
&
dictionary
,
InputArray
ids
)
{
CV_Assert
(
objPoints
.
total
()
==
ids
.
total
());
CV_Assert
(
objPoints
.
type
()
==
CV_32FC3
);
...
...
@@ -1319,14 +1319,14 @@ Ptr<Board> Board::create(InputArrayOfArrays objPoints, Ptr<Dictionary> &dictiona
Ptr
<
Board
>
res
=
makePtr
<
Board
>
();
ids
.
copyTo
(
res
->
ids
);
res
->
objPoints
=
obj_points_vector
;
res
->
dictionary
=
dictionary
;
res
->
dictionary
=
cv
::
makePtr
<
Dictionary
>
(
dictionary
)
;
return
res
;
}
/**
*/
Ptr
<
GridBoard
>
GridBoard
::
create
(
int
markersX
,
int
markersY
,
float
markerLength
,
float
markerSeparation
,
Ptr
<
Dictionary
>
&
dictionary
,
int
firstMarker
)
{
const
Ptr
<
Dictionary
>
&
dictionary
,
int
firstMarker
)
{
CV_Assert
(
markersX
>
0
&&
markersY
>
0
&&
markerLength
>
0
&&
markerSeparation
>
0
);
...
...
@@ -1442,7 +1442,7 @@ void drawAxis(InputOutputArray _image, InputArray _cameraMatrix, InputArray _dis
/**
*/
void
drawMarker
(
Ptr
<
Dictionary
>
&
dictionary
,
int
id
,
int
sidePixels
,
OutputArray
_img
,
int
borderBits
)
{
void
drawMarker
(
const
Ptr
<
Dictionary
>
&
dictionary
,
int
id
,
int
sidePixels
,
OutputArray
_img
,
int
borderBits
)
{
dictionary
->
drawMarker
(
id
,
sidePixels
,
_img
,
borderBits
);
}
...
...
@@ -1546,7 +1546,7 @@ void _drawPlanarBoardImpl(Board *_board, Size outSize, OutputArray _img, int mar
/**
*/
void
drawPlanarBoard
(
Ptr
<
Board
>
&
_board
,
Size
outSize
,
OutputArray
_img
,
int
marginSize
,
void
drawPlanarBoard
(
const
Ptr
<
Board
>
&
_board
,
Size
outSize
,
OutputArray
_img
,
int
marginSize
,
int
borderBits
)
{
_drawPlanarBoardImpl
(
_board
,
outSize
,
_img
,
marginSize
,
borderBits
);
}
...
...
@@ -1556,7 +1556,7 @@ void drawPlanarBoard(Ptr<Board> &_board, Size outSize, OutputArray _img, int mar
/**
*/
double
calibrateCameraAruco
(
InputArrayOfArrays
_corners
,
InputArray
_ids
,
InputArray
_counter
,
Ptr
<
Board
>
&
board
,
Size
imageSize
,
InputOutputArray
_cameraMatrix
,
const
Ptr
<
Board
>
&
board
,
Size
imageSize
,
InputOutputArray
_cameraMatrix
,
InputOutputArray
_distCoeffs
,
OutputArrayOfArrays
_rvecs
,
OutputArrayOfArrays
_tvecs
,
OutputArray
_stdDeviationsIntrinsics
,
...
...
@@ -1602,7 +1602,7 @@ double calibrateCameraAruco(InputArrayOfArrays _corners, InputArray _ids, InputA
/**
*/
double
calibrateCameraAruco
(
InputArrayOfArrays
_corners
,
InputArray
_ids
,
InputArray
_counter
,
Ptr
<
Board
>
&
board
,
Size
imageSize
,
InputOutputArray
_cameraMatrix
,
const
Ptr
<
Board
>
&
board
,
Size
imageSize
,
InputOutputArray
_cameraMatrix
,
InputOutputArray
_distCoeffs
,
OutputArrayOfArrays
_rvecs
,
OutputArrayOfArrays
_tvecs
,
int
flags
,
TermCriteria
criteria
)
{
return
calibrateCameraAruco
(
_corners
,
_ids
,
_counter
,
board
,
imageSize
,
_cameraMatrix
,
_distCoeffs
,
_rvecs
,
_tvecs
,
...
...
modules/aruco/src/charuco.cpp
View file @
82e612bb
...
...
@@ -121,7 +121,7 @@ void CharucoBoard::draw(Size outSize, OutputArray _img, int marginSize, int bord
/**
*/
Ptr
<
CharucoBoard
>
CharucoBoard
::
create
(
int
squaresX
,
int
squaresY
,
float
squareLength
,
float
markerLength
,
Ptr
<
Dictionary
>
&
dictionary
)
{
float
markerLength
,
const
Ptr
<
Dictionary
>
&
dictionary
)
{
CV_Assert
(
squaresX
>
1
&&
squaresY
>
1
&&
markerLength
>
0
&&
squareLength
>
markerLength
);
Ptr
<
CharucoBoard
>
res
=
makePtr
<
CharucoBoard
>
();
...
...
@@ -230,7 +230,7 @@ void CharucoBoard::_getNearestMarkerCorners() {
/**
* Remove charuco corners if any of their minMarkers closest markers has not been detected
*/
static
unsigned
int
_filterCornersWithoutMinMarkers
(
Ptr
<
CharucoBoard
>
&
_board
,
static
unsigned
int
_filterCornersWithoutMinMarkers
(
const
Ptr
<
CharucoBoard
>
&
_board
,
InputArray
_allCharucoCorners
,
InputArray
_allCharucoIds
,
InputArray
_allArucoIds
,
int
minMarkers
,
...
...
@@ -399,7 +399,7 @@ static unsigned int _selectAndRefineChessboardCorners(InputArray _allCorners, In
* distance to their closest markers
*/
static
void
_getMaximumSubPixWindowSizes
(
InputArrayOfArrays
markerCorners
,
InputArray
markerIds
,
InputArray
charucoCorners
,
Ptr
<
CharucoBoard
>
&
board
,
InputArray
charucoCorners
,
const
Ptr
<
CharucoBoard
>
&
board
,
vector
<
Size
>
&
sizes
)
{
unsigned
int
nCharucoCorners
=
(
unsigned
int
)
charucoCorners
.
getMat
().
total
();
...
...
@@ -453,7 +453,7 @@ static void _getMaximumSubPixWindowSizes(InputArrayOfArrays markerCorners, Input
*/
static
int
_interpolateCornersCharucoApproxCalib
(
InputArrayOfArrays
_markerCorners
,
InputArray
_markerIds
,
InputArray
_image
,
Ptr
<
CharucoBoard
>
&
_board
,
const
Ptr
<
CharucoBoard
>
&
_board
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
OutputArray
_charucoCorners
,
OutputArray
_charucoIds
)
{
...
...
@@ -504,7 +504,7 @@ static int _interpolateCornersCharucoApproxCalib(InputArrayOfArrays _markerCorne
*/
static
int
_interpolateCornersCharucoLocalHom
(
InputArrayOfArrays
_markerCorners
,
InputArray
_markerIds
,
InputArray
_image
,
Ptr
<
CharucoBoard
>
&
_board
,
const
Ptr
<
CharucoBoard
>
&
_board
,
OutputArray
_charucoCorners
,
OutputArray
_charucoIds
)
{
...
...
@@ -592,7 +592,7 @@ static int _interpolateCornersCharucoLocalHom(InputArrayOfArrays _markerCorners,
/**
*/
int
interpolateCornersCharuco
(
InputArrayOfArrays
_markerCorners
,
InputArray
_markerIds
,
InputArray
_image
,
Ptr
<
CharucoBoard
>
&
_board
,
InputArray
_image
,
const
Ptr
<
CharucoBoard
>
&
_board
,
OutputArray
_charucoCorners
,
OutputArray
_charucoIds
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
)
{
...
...
@@ -681,7 +681,7 @@ static bool _arePointsEnoughForPoseEstimation(const vector< Point3f > &points) {
/**
*/
bool
estimatePoseCharucoBoard
(
InputArray
_charucoCorners
,
InputArray
_charucoIds
,
Ptr
<
CharucoBoard
>
&
_board
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
const
Ptr
<
CharucoBoard
>
&
_board
,
InputArray
_cameraMatrix
,
InputArray
_distCoeffs
,
OutputArray
_rvec
,
OutputArray
_tvec
)
{
CV_Assert
((
_charucoCorners
.
getMat
().
total
()
==
_charucoIds
.
getMat
().
total
()));
...
...
@@ -711,7 +711,7 @@ bool estimatePoseCharucoBoard(InputArray _charucoCorners, InputArray _charucoIds
/**
*/
double
calibrateCameraCharuco
(
InputArrayOfArrays
_charucoCorners
,
InputArrayOfArrays
_charucoIds
,
Ptr
<
CharucoBoard
>
&
_board
,
Size
imageSize
,
const
Ptr
<
CharucoBoard
>
&
_board
,
Size
imageSize
,
InputOutputArray
_cameraMatrix
,
InputOutputArray
_distCoeffs
,
OutputArrayOfArrays
_rvecs
,
OutputArrayOfArrays
_tvecs
,
OutputArray
_stdDeviationsIntrinsics
,
...
...
@@ -746,7 +746,7 @@ double calibrateCameraCharuco(InputArrayOfArrays _charucoCorners, InputArrayOfAr
/**
*/
double
calibrateCameraCharuco
(
InputArrayOfArrays
_charucoCorners
,
InputArrayOfArrays
_charucoIds
,
Ptr
<
CharucoBoard
>
&
_board
,
Size
imageSize
,
const
Ptr
<
CharucoBoard
>
&
_board
,
Size
imageSize
,
InputOutputArray
_cameraMatrix
,
InputOutputArray
_distCoeffs
,
OutputArrayOfArrays
_rvecs
,
OutputArrayOfArrays
_tvecs
,
int
flags
,
TermCriteria
criteria
)
{
...
...
@@ -894,7 +894,7 @@ void detectCharucoDiamond(InputArray _image, InputArrayOfArrays _markerCorners,
/**
*/
void
drawCharucoDiamond
(
Ptr
<
Dictionary
>
&
dictionary
,
Vec4i
ids
,
int
squareLength
,
int
markerLength
,
void
drawCharucoDiamond
(
const
Ptr
<
Dictionary
>
&
dictionary
,
Vec4i
ids
,
int
squareLength
,
int
markerLength
,
OutputArray
_img
,
int
marginSize
,
int
borderBits
)
{
CV_Assert
(
squareLength
>
0
&&
markerLength
>
0
&&
squareLength
>
markerLength
);
...
...
modules/aruco/src/dictionary.cpp
View file @
82e612bb
...
...
@@ -70,7 +70,7 @@ Dictionary::Dictionary(const Mat &_bytesList, int _markerSize, int _maxcorr) {
/**
*/
Ptr
<
Dictionary
>
Dictionary
::
create
(
int
nMarkers
,
int
markerSize
)
{
Ptr
<
Dictionary
>
baseDictionary
=
makePtr
<
Dictionary
>
();
const
Ptr
<
Dictionary
>
baseDictionary
=
makePtr
<
Dictionary
>
();
return
create
(
nMarkers
,
markerSize
,
baseDictionary
);
}
...
...
@@ -78,7 +78,7 @@ Ptr<Dictionary> Dictionary::create(int nMarkers, int markerSize) {
/**
*/
Ptr
<
Dictionary
>
Dictionary
::
create
(
int
nMarkers
,
int
markerSize
,
Ptr
<
Dictionary
>
&
baseDictionary
)
{
const
Ptr
<
Dictionary
>
&
baseDictionary
)
{
return
generateCustomDictionary
(
nMarkers
,
markerSize
,
baseDictionary
);
}
...
...
@@ -377,7 +377,7 @@ static int _getSelfDistance(const Mat &marker) {
/**
*/
Ptr
<
Dictionary
>
generateCustomDictionary
(
int
nMarkers
,
int
markerSize
,
Ptr
<
Dictionary
>
&
baseDictionary
)
{
const
Ptr
<
Dictionary
>
&
baseDictionary
)
{
Ptr
<
Dictionary
>
out
=
makePtr
<
Dictionary
>
();
out
->
markerSize
=
markerSize
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment