kalibr icon indicating copy to clipboard operation
kalibr copied to clipboard

No corners could be extracted

Open 1zgh opened this issue 10 months ago • 3 comments

I've taken a lot of photos, why do I keep having this problem? Can anyone help me see it, here's my error and photos. Thank you so much!!

importing libraries Initializing cam0: Camera model: pinhole-radtan Dataset: /data/20240423/vis_ir_nir.bag Topic: /cam0/image_raw Number of images: 43 Extracting calibration target corners Progress 43 / 43 Time remaining: 59m 60s
[FATAL] [1713867776.590952]: No corners could be extracted for camera /cam0/image_raw! Check the calibration target configuration and dataset. Traceback (most recent call last): File "/catkin_ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate_cameras", line 465, in main() File "/catkin_ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate_cameras", line 188, in main if not cam.initGeometryFromObservations(observations): File "/catkin_ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraCalibrator.py", line 57, in initGeometryFromObservations success = self.geometry.initializeIntrinsics(observations) RuntimeError: [Exception] /catkin_ws/src/kalibr/aslam_cv/aslam_cameras/include/aslam/cameras/implementation/PinholeProjection.hpp:716: initializeIntrinsics() assert(observations.size() != 0) failed: Need min. one observation 2024041780560000000 Screenshot from 2024-04-23 18-28-11

1zgh avatar Apr 23 '24 10:04 1zgh

Hello! Did you checked yout target table .yaml? In this file you have to specify the number of rows and columns as well as the square size.

AntonioLuisGlez avatar May 09 '24 09:05 AntonioLuisGlez

I had the same error. It turned out that rows and columns are something completely different. Therefore, I specified incorrect data in the configuration grid.yaml file. You need to correctly count rows and columns like this. image

katafoxi avatar Jun 28 '24 13:06 katafoxi

Regarding AprilGrids, sometimes the problem lies not in incorrect configuration written in .yaml, but in wrong ID assignment issues. Here assumed that IDs are starting with 0: https://github.com/ethz-asl/kalibr/blob/1f60227442d25e36365ef5f72cd80b9666d73467/aslam_cv/aslam_cameras_april/src/GridCalibrationTargetAprilgrid.cpp#L132

As a hotfix, you can find out the start ID and subtract it from all the IDs. For my case I was able to obtain proper calibration with this fix.

WFram avatar Jun 28 '24 14:06 WFram