Skip to content

Conversation

@chris-hagen
Copy link

Description

The double sphere calibration using asymmetric circlegrid patterns fails on common pattern sizes. The intrinsics are not getting initialized properly though the calibration imagery and detection looks fine.

[DEBUG] [1741341647.594944]: calibrateIntrinsics: intrinsics guess: [0. 0. 0. 0. 0. 0.]
[DEBUG] [1741341647.597938]: calibrateIntrinsics: distortion guess: []          
[DEBUG] [1741341647.601171]: calibrateIntrinsics: adding camera error terms for 84 calibration targets
[DEBUG] [1741341647.635674]: calibrateIntrinsics: added 3024 camera error terms                                                                                 
No linear system solver set in the options. Defaulting to the sparse_cholesky solver
Using the sparse_cholesky linear system solver                                                                                                                  
Using the levenberg_marquardt trust region policy                               
[DEBUG] [1741341647.639727]: Before optimization:                                                                                                               
[DEBUG] [1741341647.645821]:  Reprojection error squarred (camL):  mean 243182.28379997588, median 233123.48769726523, std: 135897.35797906824
No linear system solver set in the options. Defaulting to the sparse_cholesky solver
Using the sparse_cholesky linear system solver                                  
Using the levenberg_marquardt trust region policy                               
Initializing                                                                                                                                                    
Optimization problem initialized with 170 design variables and 3024 error terms 
The Jacobian matrix is 6048 x 510                                                                                                                               
[0.0]: J: 7.35383e+08                                                           
[1]: J: nan, dJ: nan, deltaX: nan, LM - lambda:10 mu:2                                                                                                          
[DEBUG] [1741341647.662138]: calibrateIntrinsics: guess for intrinsics cam: [nan nan nan nan nan nan]
[DEBUG] [1741341647.664781]: calibrateIntrinsics: guess for distortion cam: []  
        Projection initialized to: [nan nan nan nan nan nan]                                                                                                    
        Distortion initialized to: []                                           

Issue Cause

Asymmetric circlegrids define a column pairs as one column. Due to that common pattern sizes (e.g. 8 columns or 4 column pairs) internally get treated as half of the real columns in the sensor of the GridCalibrationTagetBase class (e.g. 4). This leads to the issue that the defined minimum corner threshold of 4 mostly won't be reached and the observations get dropped.

Solution

Taking into account the target type when evaluating the minimum corner threshold in the OmniProjection and OmniCameraGeometry classes fixes that and enables the double sphere calibration with common asymmetric circlegrid pattern sizes.

@chris-hagen chris-hagen force-pushed the fix-circlegrid-corners branch from 14fefd8 to 9d3992a Compare March 7, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant