安装支持eigen线性迭代的ceres_solver
Ceres可以求解以下形式的有界约束非线性最小二乘问题:
这种形式的问题来源于科学工程的多个领域,从统计学的曲线拟合到计算机视觉中从图像中构建三维模型。
最近在做sfm方面的重建问题,需要对得到的相机位姿和3维点做BA优化,ceres-solver和g2o都能做ba
ceres-solver是有依赖项eigen的,而且Ceres can also use Eigen as a sparse linear algebra library.
但是EIGENSPARSE 在camke的时候是默认关闭的,所以当我在程序中调用
ceres_config_options.sparse_linear_algebra_library_type = ceres::EIGEN_SPARSE;
编译无错,能编译成功,但是调用的时候,会报错
E0606 ::29.387037 solver.cc:] Terminating: Can't use SPARSE_SCHUR with EIGEN_SPARSE because Eigen's sparse linear algebra was not enabled when Ceres was built.
Bundle Adjustment failed.
所以解决方案只能把ceres-solver重新装一遍
1.卸载
进入ceres-solver的编译文件夹,执行卸载命令
cd ceres-solver/build
sudo make uninstall
执行命令之后就可以完全卸载成功了。
2.安装ceres-solver
安装之前请确保你已经安装了ceres-solver的依赖项,因为我装过,所以不用再装依赖项了,你可以安装以下命令安装,
可以参考官方文档:http://www.ceres-solver.org/installation.html
# CMake
sudo apt-get install cmake
# google-glog + gflags
sudo apt-get install libgoogle-glog-dev
# BLAS & LAPACK
sudo apt-get install libatlas-base-dev
# Eigen3
sudo apt-get install libeigen3-dev
# SuiteSparse and CXSparse (optional)
# - If you want to build Ceres as a *static* library (the default)
# you can use the SuiteSparse package in the main Ubuntu package
# repository:
sudo apt-get install libsuitesparse-dev
# - However, if you want to build Ceres as a *shared* library, you must
# add the following PPA:
sudo add-apt-repository ppa:bzindovic/suitesparse-bugfix-
sudo apt-get update
sudo apt-get install libsuitesparse-dev
3.编译安装
以上步骤都完成后就可以编译安装ceres-solver了,cmake的时候要把 EIGENSPARSE 设置为 ON,进入到编译目录,执行命令
cd ceres-solver/build
cmake -D EIGENSPARSE=ON ..
make
sudo make install
这样就可以编译成功了
参考:http://www.ceres-solver.org/installation.html
安装支持eigen线性迭代的ceres_solver的更多相关文章
- 在树莓派Raspbian下安装支持Hard Float的.NET环境
[题外话] 最近入了个树莓派玩,系统装的官方推荐的Hard Float的Raspbian,由于衍生自Debian,所以Mono什么的非常好装.但是官方源中的Mono在Hard Float的Raspbi ...
- ubuntu将python3设为默认后再安装支持python3.x的包
简介: ubuntu默认python2.7版本,如果想要装python3.x版本,请记住python2.7版本一定不能卸载!!!但是即使我 python3.x版本安装成功,当运行python脚本时,系 ...
- (译)综合指南:通过Ubuntu 16.04上从Source构建来安装支持GPU的Caffe2
(译)综合指南:通过Ubuntu 16.04上从Source构建来安装支持GPU的Caffe2 译者注: 原文来自:https://tech.amikelive.com/node-706/compre ...
- 在 Ubuntu 16.04 中安装支持 CPU 和 GPU 的 Google TensorFlow 神经网络软件
TensorFlow 是用于机器学习任务的开源软件.它的创建者 Google 希望提供一个强大的工具以帮助开发者探索和建立基于机器学习的应用,所以他们在去年作为开源项目发布了它.TensorFlow ...
- 基于Web的Kafka管理器工具之Kafka-manager的编译部署详细安装 (支持kafka0.8、0.9和0.10以后版本)(图文详解)(默认端口或任意自定义端口)
不多说,直接上干货! 至于为什么,要写这篇博客以及安装Kafka-manager? 问题详情 无奈于,在kafka里没有一个较好自带的web ui.启动后无法观看,并且不友好.所以,需安装一个第三方的 ...
- nginx编译安装支持lua脚本
一.准备编译环境 1.操作系统:CentOS7.6 2.安装编译所需安装包 yum install gcc pcre pcre-devel zlib zlib-devel openssl openss ...
- 安装支持elasticsearch使用sql查询插件
一.ElasticSearch-SQL介绍 ElasticSearch-SQL(后续简称es-sql)是ElasticSearch的一个插件,提供了es 的类sql查询的相关接口.支持绝大多数的sql ...
- Ubuntu安装支持PCL、LAS的CloudCompare
git clone --recursive https://github.com/cloudcompare/trunk.git cd trunk mkdir build cd build cmake ...
- spice在桌面虚拟化中的应用系列之二(Linux平台spice客户端的编译安装,支持USB映射)
1.系统环境 1.1 测试环境 centos6.4最小化安装(centos6.x桌面版也适用) 使用yum源为163源加EPEL源 1.2 spice客户端介绍 spice作为远程连接工具,可以支持远 ...
随机推荐
- 标准JSON格式定义与解析注意点
标准JSON格式定义与解析注意点 在JS.IOS.Android中都内置了JSON的序列化.反序列化SDK.JEE中也可以使用第三方的JSON解析库,如GSON.虽然在JSON格式被定义出来的时候并没 ...
- RxJava中的doOnSubscribe默认运行线程分析
假设你对RxJava1.x还不是了解,能够參考以下文章. 1. RxJava使用介绍 [视频教程] 2. RxJava操作符 • Creating Observables(Observable的创 ...
- logback 实例
POM : <!-- log --> <dependency> <groupId>org.slf4j</groupId> <artifactId& ...
- CookieUtils工具类
package com.taotao.common.util; import java.io.UnsupportedEncodingException; import java.net.URLDeco ...
- linux 设置分辨率(转)
linux 设置分辨率 如果你需要在linux上设置显示屏的分辨率,分两种情况:分辨率模式存在与分辨率模式不存在,具体如下. 1,分辨率模式已存在 1)如何查询是否存在: 图形界面:在System S ...
- tomcat端口被占用的两个解决方法
tomcat 的 8080 端口经常会被占用,解决办法两个: 1.关闭占用8080端口的进程:8080端口被占用的话执行startup.bat会报错,可在cmd下执行netstat -ano命令查看8 ...
- C 预处理
http://baike.baidu.com/link?url=0mwKZRcxHuNHa_TiwXgpQPS2S-YbOGCUJVSgZ9sb-qe-G-x4oIDZpWuZqiVNBsMYA4HT ...
- mysql学习笔记(三)
-- 主键冲突(duplicate key) ,'xujian','anhui'); ,'xiewei','anhui'); ,'luyang','anhui');-- 主键冲突了 -- 可以选择性的 ...
- 一种新型聚类算法(Clustering by fast search and find of density peaksd)
最近在学习论文的时候发现了在science上发表的关于新型的基于密度的聚类算法 Kmean算法有很多不足的地方,比如k值的确定,初始结点选择,而且还不能检测费球面类别的数据分布,对于第二个问题,提出了 ...
- thinkphp 多对多关联模型(转)
先建立一个模型 1 2 3 4 5 6 7 8 9 10 11 12 <?php class UserModel extends RelationModel{ protected $ ...