load yaml calibration file to undistort
I used the aruco_calibration_fromimages
tool from aruco utils and I successfully get a resulting *.yaml
file like this:
%YAML:1.0
image_width: 318
image_height: 198
camera_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 2.6088477016556299e+03, 0., 2.0580445249470489e+02, 0.,
6.5584333303970277e+02, 1.0436411882106108e+02, 0., 0., 1. ]
distortion_coefficients: !!opencv-matrix
rows: 1
cols: 5
dt: d
data: [ -2.2705754141856268e+01, 9.6466413037022971e+02,
-2.1446765483140479e-01, 5.2980598312981608e-01,
-2.5475401560626519e+03 ]
Then I read the following tutorial opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_calib3d/py_calibration/py_calibration.html
and I now want to undistort the image from my camera... but I don't understand how to load the *.yaml
file. I don't understand the purpose of the cv2.getOptimalNewCameraMatrix
method, nor what are thoses *mtx
parameters.
Well... I'm lost at the very begining...
I am a beginner of the Aruco. When I run the aruco_calibration_fromimages file, I cannot pass through from this condition.
Usage: out_camera_calibration.yml directory_with_images [options] options: -size maker_size : Size of the markers in meters. -m markersetconfig.yml : By default, the one in utils is assumed. Otherwise, set the file here -auto_orient : forces width larger than height by flipping image 90degs. Press any key to continue . . .
Could you please help me how to run? Thank you in advance!
@zar zar , please do not post answers here, if you have a question or a comment. thank you.
(you probably want to ask your own question)