Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
f81fdd58
Unverified
Commit
f81fdd58
authored
5 years ago
by
atinfinity
Committed by
GitHub
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #16445 from atinfinity:fixed-typo
* fixed typo * add compatibility code to handle migration
parent
a6f3a212
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
19 deletions
+22
-19
calibCommon.hpp
apps/interactive-calibration/calibCommon.hpp
+1
-1
defaultConfig.xml
apps/interactive-calibration/defaultConfig.xml
+1
-1
frameProcessor.cpp
apps/interactive-calibration/frameProcessor.cpp
+1
-1
main.cpp
apps/interactive-calibration/main.cpp
+1
-1
parametersController.cpp
apps/interactive-calibration/parametersController.cpp
+6
-3
interactive_calibration.markdown
.../interactive_calibration/interactive_calibration.markdown
+3
-3
persistence_yml.cpp
modules/core/src/persistence_yml.cpp
+4
-4
falsecolor.cpp
samples/cpp/falsecolor.cpp
+5
-5
No files found.
apps/interactive-calibration/calibCommon.hpp
View file @
f81fdd58
...
...
@@ -80,7 +80,7 @@ namespace calib
cv
::
Size
boardSize
;
int
charucoDictName
;
int
calibrationStep
;
float
charucoSquareLeng
ht
,
charucoMarkerSize
;
float
charucoSquareLeng
th
,
charucoMarkerSize
;
float
captureDelay
;
float
squareSize
;
float
templDst
;
...
...
This diff is collapsed.
Click to expand it.
apps/interactive-calibration/defaultConfig.xml
View file @
f81fdd58
<?xml version="1.0"?>
<opencv_storage>
<charuco_dict>
0
</charuco_dict>
<charuco_square_leng
ht>
200
</charuco_square_lenght
>
<charuco_square_leng
th>
200
</charuco_square_length
>
<charuco_marker_size>
100
</charuco_marker_size>
<calibration_step>
1
</calibration_step>
<max_frames_num>
30
</max_frames_num>
...
...
This diff is collapsed.
Click to expand it.
apps/interactive-calibration/frameProcessor.cpp
View file @
f81fdd58
...
...
@@ -273,7 +273,7 @@ CalibProcessor::CalibProcessor(cv::Ptr<calibrationData> data, captureParameters
#ifdef HAVE_OPENCV_ARUCO
mArucoDictionary
=
cv
::
aruco
::
getPredefinedDictionary
(
cv
::
aruco
::
PREDEFINED_DICTIONARY_NAME
(
capParams
.
charucoDictName
));
mCharucoBoard
=
cv
::
aruco
::
CharucoBoard
::
create
(
mBoardSize
.
width
,
mBoardSize
.
height
,
capParams
.
charucoSquareLeng
ht
,
mCharucoBoard
=
cv
::
aruco
::
CharucoBoard
::
create
(
mBoardSize
.
width
,
mBoardSize
.
height
,
capParams
.
charucoSquareLeng
th
,
capParams
.
charucoMarkerSize
,
mArucoDictionary
);
#endif
break
;
...
...
This diff is collapsed.
Click to expand it.
apps/interactive-calibration/main.cpp
View file @
f81fdd58
...
...
@@ -181,7 +181,7 @@ int main(int argc, char** argv)
cv
::
aruco
::
getPredefinedDictionary
(
cv
::
aruco
::
PREDEFINED_DICTIONARY_NAME
(
capParams
.
charucoDictName
));
cv
::
Ptr
<
cv
::
aruco
::
CharucoBoard
>
charucoboard
=
cv
::
aruco
::
CharucoBoard
::
create
(
capParams
.
boardSize
.
width
,
capParams
.
boardSize
.
height
,
capParams
.
charucoSquareLeng
ht
,
capParams
.
charucoMarkerSize
,
dictionary
);
capParams
.
charucoSquareLeng
th
,
capParams
.
charucoMarkerSize
,
dictionary
);
globalData
->
totalAvgErr
=
cv
::
aruco
::
calibrateCameraCharuco
(
globalData
->
allCharucoCorners
,
globalData
->
allCharucoIds
,
charucoboard
,
globalData
->
imageSize
,
...
...
This diff is collapsed.
Click to expand it.
apps/interactive-calibration/parametersController.cpp
View file @
f81fdd58
...
...
@@ -37,7 +37,10 @@ bool calib::parametersController::loadFromFile(const std::string &inputFileName)
}
readFromNode
(
reader
[
"charuco_dict"
],
mCapParams
.
charucoDictName
);
readFromNode
(
reader
[
"charuco_square_lenght"
],
mCapParams
.
charucoSquareLenght
);
if
(
readFromNode
(
reader
[
"charuco_square_lenght"
],
mCapParams
.
charucoSquareLength
))
{
std
::
cout
<<
"DEPRECATION: Parameter 'charuco_square_lenght' has been deprecated (typo). Use 'charuco_square_length' instead."
<<
std
::
endl
;
}
readFromNode
(
reader
[
"charuco_square_length"
],
mCapParams
.
charucoSquareLength
);
readFromNode
(
reader
[
"charuco_marker_size"
],
mCapParams
.
charucoMarkerSize
);
readFromNode
(
reader
[
"camera_resolution"
],
mCapParams
.
cameraResolution
);
readFromNode
(
reader
[
"calibration_step"
],
mCapParams
.
calibrationStep
);
...
...
@@ -51,7 +54,7 @@ bool calib::parametersController::loadFromFile(const std::string &inputFileName)
bool
retValue
=
checkAssertion
(
mCapParams
.
charucoDictName
>=
0
,
"Dict name must be >= 0"
)
&&
checkAssertion
(
mCapParams
.
charucoMarkerSize
>
0
,
"Marker size must be positive"
)
&&
checkAssertion
(
mCapParams
.
charucoSquareLeng
ht
>
0
,
"Square size must be positive"
)
&&
checkAssertion
(
mCapParams
.
charucoSquareLeng
th
>
0
,
"Square size must be positive"
)
&&
checkAssertion
(
mCapParams
.
minFramesNum
>
1
,
"Minimal number of frames for calibration < 1"
)
&&
checkAssertion
(
mCapParams
.
calibrationStep
>
0
,
"Calibration step must be positive"
)
&&
checkAssertion
(
mCapParams
.
maxFramesNum
>
mCapParams
.
minFramesNum
,
"maxFramesNum < minFramesNum"
)
&&
...
...
@@ -119,7 +122,7 @@ bool calib::parametersController::loadFromParser(cv::CommandLineParser &parser)
mCapParams
.
board
=
chAruco
;
mCapParams
.
boardSize
=
cv
::
Size
(
6
,
8
);
mCapParams
.
charucoDictName
=
0
;
mCapParams
.
charucoSquareLeng
ht
=
200
;
mCapParams
.
charucoSquareLeng
th
=
200
;
mCapParams
.
charucoMarkerSize
=
100
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
doc/tutorials/calib3d/interactive_calibration/interactive_calibration.markdown
View file @
f81fdd58
...
...
@@ -64,7 +64,7 @@ By default values of advanced parameters are stored in defaultConfig.xml
<?xml version="1.0"?>
<opencv
_storage
>
<charuco
_dict
>
0
</charuco
_dict
>
<charuco
_square_leng
ht
>
200
</charuco
_square_lenght
>
<charuco
_square_leng
th
>
200
</charuco
_square_length
>
<charuco
_marker_size
>
100
</charuco
_marker_size
>
<calibration
_step
>
1
</calibration
_step
>
<max
_frames_num
>
30
</max
_frames_num
>
...
...
@@ -78,7 +78,7 @@ By default values of advanced parameters are stored in defaultConfig.xml
@endcode
-
*charuco_dict*
: name of special dictionary, which has been used for generation of chAruco pattern
-
*charuco_square_leng
ht
*
: size of square on chAruco board (in pixels)
-
*charuco_square_leng
th
*
: size of square on chAruco board (in pixels)
-
*charuco_marker_size*
: size of Aruco markers on chAruco board (in pixels)
-
*calibration_step*
: interval in frames between launches of @ref cv::calibrateCamera
-
*max_frames_num*
: if number of frames for calibration is greater then this value frames filter starts working.
...
...
@@ -91,7 +91,7 @@ QR faster than SVD, but potentially less precise
-
*frame_filter_conv_param*
: parameter which used in linear convolution of bicriterial frames filter
-
*camera_resolution*
: resolution of camera which is used for calibration
**Note:**
*charuco_dict*
,
*charuco_square_leng
ht
*
and
*charuco_marker_size*
are used for chAruco pattern generation
**Note:**
*charuco_dict*
,
*charuco_square_leng
th
*
and
*charuco_marker_size*
are used for chAruco pattern generation
(see Aruco module description for details:
[
Aruco tutorials
](
https://github.com/opencv/opencv_contrib/tree/master/modules/aruco/tutorials
)
)
Default chAruco pattern:
...
...
This diff is collapsed.
Click to expand it.
modules/core/src/persistence_yml.cpp
View file @
f81fdd58
...
...
@@ -201,20 +201,20 @@ icvYMLParseValue( CvFileStorage* fs, char* ptr, CvFileNode* node,
if
(
d
==
'<'
)
//support of full type heading from YAML 1.2
{
const
char
*
yamlTypeHeading
=
"<tag:yaml.org,2002:"
;
const
size_t
headingLeng
ht
=
strlen
(
yamlTypeHeading
);
const
size_t
headingLeng
th
=
strlen
(
yamlTypeHeading
);
char
*
typeEndPtr
=
++
ptr
;
do
d
=
*++
typeEndPtr
;
while
(
cv_isprint
(
d
)
&&
d
!=
' '
&&
d
!=
'>'
);
if
(
d
==
'>'
&&
(
size_t
)(
typeEndPtr
-
ptr
)
>
headingLeng
ht
)
if
(
d
==
'>'
&&
(
size_t
)(
typeEndPtr
-
ptr
)
>
headingLeng
th
)
{
if
(
memcmp
(
ptr
,
yamlTypeHeading
,
headingLeng
ht
)
==
0
)
if
(
memcmp
(
ptr
,
yamlTypeHeading
,
headingLeng
th
)
==
0
)
{
value_type
|=
CV_NODE_USER
;
*
typeEndPtr
=
' '
;
ptr
+=
headingLeng
ht
-
1
;
ptr
+=
headingLeng
th
-
1
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
samples/cpp/falsecolor.cpp
View file @
f81fdd58
...
...
@@ -41,10 +41,10 @@ static Mat DrawMyImage(int thickness,int nbShape)
{
Mat
img
=
Mat
::
zeros
(
500
,
256
*
thickness
+
100
,
CV_8UC1
);
int
offsetx
=
50
,
offsety
=
25
;
int
lineLeng
ht
=
50
;
int
lineLeng
th
=
50
;
for
(
int
i
=
0
;
i
<
256
;
i
++
)
line
(
img
,
Point
(
thickness
*
i
+
offsetx
,
offsety
),
Point
(
thickness
*
i
+
offsetx
,
offsety
+
lineLeng
ht
),
Scalar
(
i
),
thickness
);
line
(
img
,
Point
(
thickness
*
i
+
offsetx
,
offsety
),
Point
(
thickness
*
i
+
offsetx
,
offsety
+
lineLeng
th
),
Scalar
(
i
),
thickness
);
RNG
r
;
Point
center
;
int
radius
;
...
...
@@ -57,19 +57,19 @@ static Mat DrawMyImage(int thickness,int nbShape)
int
typeShape
=
r
.
uniform
(
MyCIRCLE
,
MyELLIPSE
+
1
);
switch
(
typeShape
)
{
case
MyCIRCLE
:
center
=
Point
(
r
.
uniform
(
offsetx
,
img
.
cols
-
offsetx
),
r
.
uniform
(
offsety
+
lineLeng
ht
,
img
.
rows
-
offsety
));
center
=
Point
(
r
.
uniform
(
offsetx
,
img
.
cols
-
offsetx
),
r
.
uniform
(
offsety
+
lineLeng
th
,
img
.
rows
-
offsety
));
radius
=
r
.
uniform
(
1
,
min
(
offsetx
,
offsety
));
circle
(
img
,
center
,
radius
,
Scalar
(
i
),
-
1
);
break
;
case
MyRECTANGLE
:
center
=
Point
(
r
.
uniform
(
offsetx
,
img
.
cols
-
offsetx
),
r
.
uniform
(
offsety
+
lineLeng
ht
,
img
.
rows
-
offsety
));
center
=
Point
(
r
.
uniform
(
offsetx
,
img
.
cols
-
offsetx
),
r
.
uniform
(
offsety
+
lineLeng
th
,
img
.
rows
-
offsety
));
width
=
r
.
uniform
(
1
,
min
(
offsetx
,
offsety
));
height
=
r
.
uniform
(
1
,
min
(
offsetx
,
offsety
));
rc
=
Rect
(
center
-
Point
(
width
,
height
)
/
2
,
center
+
Point
(
width
,
height
)
/
2
);
rectangle
(
img
,
rc
,
Scalar
(
i
),
-
1
);
break
;
case
MyELLIPSE
:
center
=
Point
(
r
.
uniform
(
offsetx
,
img
.
cols
-
offsetx
),
r
.
uniform
(
offsety
+
lineLeng
ht
,
img
.
rows
-
offsety
));
center
=
Point
(
r
.
uniform
(
offsetx
,
img
.
cols
-
offsetx
),
r
.
uniform
(
offsety
+
lineLeng
th
,
img
.
rows
-
offsety
));
width
=
r
.
uniform
(
1
,
min
(
offsetx
,
offsety
));
height
=
r
.
uniform
(
1
,
min
(
offsetx
,
offsety
));
angle
=
r
.
uniform
(
0
,
180
);
...
...
This diff is collapsed.
Click to expand it.
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