Checking camera calibration
I have calibrated a camera and want to check how good the calibration is. I have used the camera_calibration package to calibrate the camera, and the camera_info now looks like this:
seq: 107890
stamp:
secs: 1644410751
nsecs: 887102635
frame_id: "tb3_1/camera"
height: 480
width: 640
distortion_model: "plumb_bob"
D: [0.02671649678130836, -0.06818375047433628, 0.001356081223209799, -2.099463419728962e-05, 0.0]
K: [649.0186923124629, 0.0, 315.2563179012676, 0.0, 651.6174092664056, 235.6077408121116, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [649.7420654296875, 0.0, 314.7318835226943, 0.0, 0.0, 651.9991455078125, 235.5246928536799, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: False
In the package there is a cameracheck.py that should let you check how good the calibration is, but this does not run. I've made sure I'm using the rectified image by using the image_proc package.
Running it like this does not work:
python3 cameracheck.py --size 8x6 --square 0.25 image:=/cv_camera/image_rect_color camera:=/cv_camera
And running it like this does not work either:
python3 cameracheck.py --size 8x6 --square 0.25 image:=/cv_camera/image_rect_color monocular:=/forearm
The node just does nothing, running it results in no response.
As an alternative I tried following https://docs.opencv.org/4.x/dc/dbb/tu... to check how good the calibration is, but I don't fully understand what the values mtx, dist, rvecs, tvecs are supposed to be. The mtx should be K, dist is D, but how do I get tvecs and rvecs?