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
f4dc4b43
Commit
f4dc4b43
authored
Jun 17, 2011
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed calibrateCamera API (ticket #1143)
parent
d5ba7c38
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
calib3d.hpp
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
+1
-1
calibration.cpp
modules/calib3d/src/calibration.cpp
+1
-1
calibrate.py
samples/python2/calibrate.py
+5
-4
No files found.
modules/calib3d/include/opencv2/calib3d/calib3d.hpp
View file @
f4dc4b43
...
...
@@ -562,7 +562,7 @@ CV_EXPORTS_W double calibrateCamera( InputArrayOfArrays objectPoints,
Size
imageSize
,
CV_IN_OUT
InputOutputArray
cameraMatrix
,
CV_IN_OUT
InputOutputArray
distCoeffs
,
OutputArray
rvecs
,
OutputArray
tvecs
,
OutputArray
OfArrays
rvecs
,
OutputArrayOfArrays
tvecs
,
int
flags
=
0
);
//! computes several useful camera characteristics from the camera matrix, camera frame resolution and the physical sensor size.
...
...
modules/calib3d/src/calibration.cpp
View file @
f4dc4b43
...
...
@@ -3351,7 +3351,7 @@ cv::Mat cv::initCameraMatrix2D( InputArrayOfArrays objectPoints,
double
cv
::
calibrateCamera
(
InputArrayOfArrays
_objectPoints
,
InputArrayOfArrays
_imagePoints
,
Size
imageSize
,
InputOutputArray
_cameraMatrix
,
InputOutputArray
_distCoeffs
,
OutputArray
_rvecs
,
OutputArray
_tvecs
,
int
flags
)
OutputArray
OfArrays
_rvecs
,
OutputArrayOfArrays
_tvecs
,
int
flags
)
{
int
rtype
=
CV_64F
;
Mat
cameraMatrix
=
_cameraMatrix
.
getMat
();
...
...
samples/python2/calibrate.py
View file @
f4dc4b43
...
...
@@ -51,7 +51,8 @@ if __name__ == '__main__':
camera_matrix
=
np
.
zeros
((
3
,
3
))
dist_coefs
=
np
.
zeros
(
4
)
img_n
=
len
(
img_points
)
rvecs
=
[
np
.
zeros
(
3
)
for
i
in
xrange
(
img_n
)]
tvecs
=
[
np
.
zeros
(
3
)
for
i
in
xrange
(
img_n
)]
rms
=
cv2
.
calibrateCamera
(
obj_points
,
img_points
,
(
w
,
h
),
camera_matrix
,
dist_coefs
)
#, rvecs, tvecs)
print
rms
rms
,
camera_matrix
,
dist_coefs
,
rvecs
,
tvecs
=
cv2
.
calibrateCamera
(
obj_points
,
img_points
,
(
w
,
h
),
camera_matrix
,
dist_coefs
)
print
"RMS:"
,
rms
print
"camera matrix: "
,
camera_matrix
print
"distortion coefficients: "
,
dist_coefs
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