You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run bin/intrinsic_calib with the suggesting parameters, I got the following error: [1] 13750 segmentation fault (core dumped) bin/intrinsic_calib -i ../data/images -p img --camera-model mei -v. Firstly I searched the issues for help and found that only #65 has the similar problem as me. After some exploring, I finally get it work properly. For someone who may get similar problems, I log my tuning process down here. Just like @dkoguciuk does, for sake of completeness, I enable the -v option and run the program and get the following log(BTW, my eigen versoin is 3.3.3 and ceres version is 1.13.0, and I use ubuntu 14.04):
Then I run the program under gdb environment with command gdb --args bin/intrinsic_calib -i ../data/images -p img --camera-model mei, and the log is as following:
(gdb) run
Starting program: /home/wyh/WkDir/Calib/camodocal-master/build/bin/intrinsic_calib -i ../data/images -p img --camera-model mei
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffaae7c700 (LWP 13951)]
[New Thread 0x7fffaa67b700 (LWP 13952)]
[New Thread 0x7fffa7e7a700 (LWP 13953)]
# INFO: Camera model: Mei
[New Thread 0x7fffa18fb700 (LWP 13955)]
[New Thread 0x7fffa10fa700 (LWP 13956)]
[New Thread 0x7fffa08f9700 (LWP 13957)]
[New Thread 0x7fff9bfff700 (LWP 13958)]
[New Thread 0x7fff9b7fe700 (LWP 13959)]
[New Thread 0x7fff9affd700 (LWP 13960)]
[New Thread 0x7fff9a7fc700 (LWP 13961)]
[New Thread 0x7fff99ffb700 (LWP 13962)]
[New Thread 0x7fff997fa700 (LWP 13963)]
[New Thread 0x7fff98ff9700 (LWP 13964)]
[New Thread 0x7fff8ffff700 (LWP 13965)]
[New Thread 0x7fff8e137700 (LWP 13966)]
[New Thread 0x7fff8d936700 (LWP 13967)]
[New Thread 0x7fff8d135700 (LWP 13970)]
[New Thread 0x7fff8c934700 (LWP 13971)]
[New Thread 0x7fff79fff700 (LWP 13972)]
[New Thread 0x7fff797fe700 (LWP 13973)]
[New Thread 0x7fff78ffd700 (LWP 13974)]
[New Thread 0x7fff73fff700 (LWP 13975)]
[New Thread 0x7fff737fe700 (LWP 13976)]
Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x81) at malloc.c:2931
2931 malloc.c: No such file or directory.
(gdb) backtrace
#0 __GI___libc_free (mem=0x81) at malloc.c:2931
#1 0x00007ffff0d64247 in ceres::AutoDiffCostFunction<camodocal::ReprojectionError1<camodocal::CataCamera>, 2, 9, 4, 3, 0, 0, 0, 0, 0, 0, 0>::~AutoDiffCostFunction() ()
from /home/wyh/WkDir/Calib/camodocal-master/build/lib/libcamodocal_camera_models.so
#2 0x00000000004774bf in void ceres::STLDeleteUniqueContainerPointers<__gnu_cxx::__normal_iterator<ceres::CostFunction**, std::vector<ceres::CostFunction*, std::allocator<ceres::CostFunction*> > > >(__gnu_cxx::__normal_iterator<ceres::CostFunction**, std::vector<ceres::CostFunction*, std::allocator<ceres::CostFunction*> > >, __gnu_cxx::__normal_iterator<ceres::CostFunction**, std::vector<ceres::CostFunction*, std::allocator<ceres::CostFunction*> > >) ()
#3 0x000000000046dbf8 in ceres::internal::ProblemImpl::~ProblemImpl() ()
#4 0x0000000000467691 in ceres::Problem::~Problem() ()
#5 0x00007ffff74bff65 in camodocal::CameraCalibration::optimize(boost::shared_ptr<camodocal::Camera>&, std::vector<cv::Mat, std::allocator<cv::Mat> >&, std::vector<cv::Mat, std::allocator<cv::Mat> >&) const () from /home/wyh/WkDir/Calib/camodocal-master/build/lib/libcamodocal_calib.so
#6 0x00007ffff74c07ab in camodocal::CameraCalibration::calibrateHelper(boost::shared_ptr<camodocal::Camera>&, std::vector<cv::Mat, std::allocator<cv::Mat> >&, std::vector<cv::Mat, std::allocator<cv::Mat> >&) const () from /home/wyh/WkDir/Calib/camodocal-master/build/lib/libcamodocal_calib.so
#7 0x00007ffff74c0c71 in camodocal::CameraCalibration::calibrate() ()
from /home/wyh/WkDir/Calib/camodocal-master/build/lib/libcamodocal_calib.so
#8 0x000000000045c0cf in main ()
Seems something is wrong with the ceres destrction functions. So what I do is to change different ceres versions. Then I get the source code of ceres from github, and try 1.12.0 but the same result. And when I change to 1.11.0 (via git checkout 1.11.0, and the commit number is 41455566a), there is eigen version uncompatible:
Not any problem in cmake process, but when I try to make ceres, the following error messages come out:
In file included from /usr/local/include/eigen3/Eigen/Core:348:0,
from /home/wyh/Downloads/ceres-solver/include/ceres/jet.h:165,
from /home/wyh/Downloads/ceres-solver/internal/ceres/jet_test.cc:31:
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, Eigen::Matrix<ceres::Jet<double, 2>, 2, 2>, false>’:
/usr/local/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: required by substitution of ‘template<class T> typename Eigen::internal::enable_if<true, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, ceres::Jet<double, 2>, Eigen::internal::scalar_product_op<T, ceres::Jet<double, 2> > > >::value>::type, ceres::Jet<double, 2> >, const typename Eigen::internal::plain_constant_type<Eigen::Matrix<ceres::Jet<double, 2>, 2, 1, 0, 2, 1>, typename Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, ceres::Jet<double, 2>, Eigen::internal::scalar_product_op<T, ceres::Jet<double, 2> > > >::value>::type>::type, const Eigen::Matrix<ceres::Jet<double, 2>, 2, 1, 0, 2, 1> > >::type Eigen::operator*(const T&, const StorageBaseType&) [with T = Eigen::Matrix<ceres::Jet<double, 2>, 2, 2>]’
/home/wyh/Downloads/ceres-solver/internal/ceres/jet_test.cc:459:12: required from here
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h:64:8: error: no type named ‘Literal’ in ‘struct Eigen::NumTraits<ceres::Jet<double, 2> >’
struct promote_scalar_arg<S,T,false> : promote_scalar_arg_unsupported<S,T,typename NumTraits<S>::Literal> {};
^
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, Eigen::Matrix<ceres::Jet<double, 2>, 2, 1, 0, 2, 1>, false>’:
/usr/local/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: required by substitution of ‘template<class T> typename Eigen::internal::enable_if<true, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::traits<T>::Scalar, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits<T>::Scalar, T> > >::value>::type>, const Derived, const typename Eigen::internal::plain_constant_type<Derived, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits<T>::Scalar, T> > >::value>::type>::type> >::type Eigen::MatrixBase<Derived>::operator*(const T&) const [with T = T; Derived = Eigen::Matrix<ceres::Jet<double, 2>, 2, 2>] [with T = Eigen::Matrix<ceres::Jet<double, 2>, 2, 1, 0, 2, 1>]’
/home/wyh/Downloads/ceres-solver/internal/ceres/jet_test.cc:459:12: required from here
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h:64:8: error: no type named ‘Literal’ in ‘struct Eigen::NumTraits<ceres::Jet<double, 2> >’
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 2>, 2, 1, 0, 2, 1> >, false>’:
/usr/local/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: required by substitution of ‘template<class T> typename Eigen::internal::enable_if<true, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, ceres::Jet<double, 2>, Eigen::internal::scalar_product_op<T, ceres::Jet<double, 2> > > >::value>::type, ceres::Jet<double, 2> >, const typename Eigen::internal::plain_constant_type<Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 2>, 2, 2> >, typename Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<T, ceres::Jet<double, 2>, Eigen::internal::scalar_product_op<T, ceres::Jet<double, 2> > > >::value>::type>::type, const Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 2>, 2, 2> > > >::type Eigen::operator*(const T&, const StorageBaseType&) [with T = Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 2>, 2, 1, 0, 2, 1> >]’
/home/wyh/Downloads/ceres-solver/internal/ceres/jet_test.cc:460:37: required from here
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h:64:8: error: no type named ‘Literal’ in ‘struct Eigen::NumTraits<ceres::Jet<double, 2> >’
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::promote_scalar_arg<ceres::Jet<double, 2>, Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 2>, 2, 2> >, false>’:
/usr/local/include/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h:50:1: required by substitution of ‘template<class T> typename Eigen::internal::enable_if<true, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<typename Eigen::internal::traits<T>::Scalar, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits<T>::Scalar, T> > >::value>::type>, const Derived, const typename Eigen::internal::plain_constant_type<Derived, typename Eigen::internal::promote_scalar_arg<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::has_ReturnType<Eigen::ScalarBinaryOpTraits<typename Eigen::internal::traits<T>::Scalar, T, Eigen::internal::scalar_product_op<typename Eigen::internal::traits<T>::Scalar, T> > >::value>::type>::type> >::type Eigen::MatrixBase<Derived>::operator*(const T&) const [with T = T; Derived = Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 2>, 2, 1, 0, 2, 1> >] [with T = Eigen::Transpose<Eigen::Matrix<ceres::Jet<double, 2>, 2, 2> >]’
/home/wyh/Downloads/ceres-solver/internal/ceres/jet_test.cc:460:37: required from here
/usr/local/include/eigen3/Eigen/src/Core/util/XprHelper.h:64:8: error: no type named ‘Literal’ in ‘struct Eigen::NumTraits<ceres::Jet<double, 2> >’
make[2]: *** [internal/ceres/CMakeFiles/jet_test.dir/jet_test.cc.o] Error 1
make[1]: *** [internal/ceres/CMakeFiles/jet_test.dir/all] Error 2
make: *** [all] Error 2
So I change the eigen version to 3.2.10 and the error disappear and finally the segmentation fault also disappears and the program runs normally. Finally the libraries and tools I use are Eigen 3.2.10, ceres 1.11.0 and cmake 3.6.3. And the following is the output intrinsic parameters:
[camera] # INFO: Final reprojection error: 0.312 pixels
[camera] # INFO: Camera Parameters:
model_type MEI
camera_name camera
image_width 1280
image_height 960
Mirror Parameters
xi 0.8508641084
Distortion Parameters
k1 -0.3162948324
k2 0.0803981985
p1 -0.0002393541
p2 0.0006171507
Projection Parameters
gamma1 714.7558811236
gamma2 716.7897975933
u0 637.5525880360
v0 476.9495313017
# INFO: Calibration took a total time of 4.245 sec.
# INFO: Wrote calibration file to camera_camera_calib.yaml
The text was updated successfully, but these errors were encountered:
Hello,
When I run bin/intrinsic_calib with the suggesting parameters, I got the following error:
[1] 13750 segmentation fault (core dumped) bin/intrinsic_calib -i ../data/images -p img --camera-model mei -v
. Firstly I searched the issues for help and found that only #65 has the similar problem as me. After some exploring, I finally get it work properly. For someone who may get similar problems, I log my tuning process down here. Just like @dkoguciuk does, for sake of completeness, I enable the-v
option and run the program and get the following log(BTW, my eigen versoin is 3.3.3 and ceres version is 1.13.0, and I use ubuntu 14.04):Then I run the program under gdb environment with command
gdb --args bin/intrinsic_calib -i ../data/images -p img --camera-model mei
, and the log is as following:Seems something is wrong with the ceres destrction functions. So what I do is to change different ceres versions. Then I get the source code of ceres from github, and try 1.12.0 but the same result. And when I change to 1.11.0 (via
git checkout 1.11.0
, and the commit number is41455566a
), there is eigen version uncompatible:Not any problem in cmake process, but when I try to make ceres, the following error messages come out:
So I change the eigen version to 3.2.10 and the error disappear and finally the segmentation fault also disappears and the program runs normally. Finally the libraries and tools I use are Eigen 3.2.10, ceres 1.11.0 and cmake 3.6.3. And the following is the output intrinsic parameters:
The text was updated successfully, but these errors were encountered: