Radtan distortion model
fcladera opened this issue · comments
We tracked down the problem of #5 to be the camera model, not the ROS version. This is our yaml:
cam0:
cam_overlaps: [1]
camera_model: pinhole
distortion_coeffs: [-0.39654918708083786, 0.1558790317565405, -0.0010594148000153032,
0.00025709826301464087]
distortion_model: radtan
intrinsics: [1073.6761539395402, 1073.8330237715743, 639.8740708893763, 350.2857551988687]
resolution: [1280, 800]
rostopic: /ovc/left/image_raw
cam1:
T_cn_cnm1:
- [0.9999989072413765, -0.00011383197661488926, 0.0014739600837072292, -0.11987932107607416]
- [0.0001063945042586905, 0.9999872682098861, 0.0050450072678856275, 5.2472004355748504e-05]
- [-0.0014745156007061513, -0.005044844933658041, 0.999986187576275, -0.000119575350025956]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: [0]
camera_model: pinhole
distortion_coeffs: [-0.3966983368290133, 0.15458308333712786, -0.0009595676428343468,
0.0005824619005361072]
distortion_model: radtan
intrinsics: [1070.4739652775727, 1070.8246115855497, 660.8552697003395, 357.0592968241504]
resolution: [1280, 800]
rostopic: /ovc/right/image_raw
Using equidistant
instead of radtan
works with multicam_calibration
. I don't know if this is an issue, but it may be a good idea to add a note in the readme. I can submit a PR for this.
Thanks again @berndpfrommer for your help!
I just successfully calibrated a (albeit single) camera with radtan under noetic without error. I see nothing wrong with your input file. How can I repeat this failure? It's kinda weird that it throws this error about the matrix type being wrong (cut-and-paste from #5):
Termination: CONVERGENCE (Function tolerance reached. |cost_change|/cost: 1.557614e-13 <= 1.000000e-12)
[ INFO] [1627162181.284741213]: writing calibration to /home/dcist/autonomy-ws/src/autonomy_stack/calibration/multicam_calibration/calib/example/./ovc-2021-07-24-17-29-41.yaml
[ERROR] [1627162181.294380799]: Exception thrown while processing service call: OpenCV(4.2.0) ../modules/core/src/matmul.dispatch.cpp:337: error: (-215:Assertion failed) type == B.type() in function 'gemm'
As the frames arrive the calibration node writes a file "corners.csv" somewhere. Do you still have that? That should allow me to reproduce the error. Thanks!
was bug with input arguments to stereoRectify(). The bug only bites when calibrating radtan stereo cameras.
Fixed.
What was the input argument error, and how did you fix? I'm getting the same error with stereoRectify, and my distortion model is plumb_bob, not radtan
NVM, fixed it myself. In my case, the issue was I had initialized the translation vector as Vec3f in input to stereoCalibrate, but stereoRectify required Vec3d