urbste / OpenImuCameraCalibrator

Camera calibration tool
GNU Affero General Public License v3.0
230 stars 48 forks source link

EstimateRadialDistUncalibratedAbsolutePose error #6

Closed gongping108 closed 3 years ago

gongping108 commented 3 years ago

EstimateRadialDistUncalibratedAbsolutePose double free or corruption (out)

urbste commented 3 years ago

Hi, could you maybe provide some more information? Are you using the example datasets or your own? Which environment?

urbste commented 3 years ago

Hi. I guess the problem is that you are using --camera_model=PINHOLE. PINHOLE alone only models focal length and principal point but no other distortion coefficients. As you can see in the example dataset, the lines of the checkerboard are not straight anymore and hence you have to use a camera model that models these effects.

So please use any of the other camera models: e.g. try --camera_model=DIVISION_UNDISTORTION

gongping108 commented 3 years ago

I use --camera_model=PINHOLE. Calibration failed. Given Used

Linear solver DENSE_QR DENSE_QR Threads 1 1 Linear solver ordering 1,3 1

Cost: Initial -1.000000e+00

Minimizer iterations 0 Successful steps 0 Unsuccessful steps 0 Line search steps 0

Time (in seconds): Preprocessor 0.000019

Residual only evaluation 0.000000 (0) Line search cost evaluation 0.000000 Jacobian & residual evaluation 0.000034 (1) Line search gradient evaluation 0.000000 Linear solver 0.000000 (0) Line search polynomial minimization 0.000000 Minimizer 0.000042

Postprocessor 0.000002 Total 0.000063

Termination: FAILURE (Residual and Jacobian evaluation failed.) E0619 12:06:18.392709 20784 camera_calibrator.cc:307] Calibration failed.

urbste commented 3 years ago

Please use --camera_model=DIVISION_UNDISTORTION

gongping108 commented 3 years ago

I use the example datasets. --path_calib_dataset=/media/root/linux/laneline/kitti_cal/GoPro9/dataset3 --checker_size_m=0.021 --image_downsample_factor=2 –camera_model=DIVISION_UNDISTORTION environment: Ubuntu18.04 melodic. I cannot find the function EstimateRadialDistUncalibratedAbsolutePose

gongping108 commented 3 years ago

I'm really really really need your help! Thanks

urbste commented 3 years ago

Did you clone my fork of TheiaSfM? This function is included in this fork https://github.com/urbste/TheiaSfM/blob/feature/r7pfr/src/theia/sfm/estimators/estimate_radial_dist_uncalibrated_absolute_pose.h

git clone https://github.com/urbste/TheiaSfM cd TheiaSfM && git checkout cda5d4f && mkdir -p build && cd build cmake .. && make -j4 sudo make install

gongping108 commented 3 years ago

Thanks! I always use your TheiaSfm! finally error: double free or corruption (out) In estimator.h std::vector tempmodels; if (!estimator.EstimateModel(data_subset, &temp_models)) { continue; }

gongping108 commented 3 years ago

I make TheiaSfM, option(BUILD_TESTING "Enable testing" ON) ! All tests passed!

gongping108 commented 3 years ago

Thanks urbste! After updated The problem has been solved !