首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >结构(openCV):“重构”未在此范围内声明

结构(openCV):“重构”未在此范围内声明
EN

Stack Overflow用户
提问于 2017-11-02 13:13:16
回答 1查看 737关注 0票数 1

我是opencv库的初学者。我在Ubuntu17.04上安装了它,安装过程中的一切都很完美,完全没有错误。我已经安装了opencv-母版,构建了它,然后我下载了opencv_cont排版-母版,一切都很完美。

我正在尝试使用SFM (用于运动的结构)构建scene_reconstruction。我已经安装了所有依赖项:

代码语言:javascript
复制
sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev

然后我安装了Ceres Solver:

代码语言:javascript
复制
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build && cd build
cmake ..
make -j4
make test
sudo make install

一切都很好,一点错误也没有。我试着按照这里的正式文档( Reconstruct.cpp. ) (场景重建)编写example_sfm_scene_reconstruction.cpp

我编写了CMakeLists.txt文件:

代码语言:javascript
复制
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

project( Reconstruct )

include_directories( /usr/local/include/eigen3 )

find_package( OpenCV REQUIRED )
find_package( Eigen3 REQUIRED )
add_executable( Reconstruct Reconstruct.cpp )
target_link_libraries( Reconstruct ${OpenCV_LIBS})

我已经创建了构建目录并使用mkdir build && cd build打开了它。然后是cmake ..

代码语言:javascript
复制
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr/local (found version "3.3.1") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/simocolna/Scrivania/SFM/build

但是,当我尝试执行make时,我有以下错误:

代码语言:javascript
复制
error: ‘reconstruct’ was not declared in this scope
 econstruct(images_paths, Rs_est, ts_est, K,
points3d_estimated,is_projective);

我试着跟踪这个论坛第476期,但是任何事情都对我有帮助。

EN

回答 1

Stack Overflow用户

发布于 2018-06-16 23:14:54

添加

代码语言:javascript
复制
#define CERES_FOUND 1

在你的代码之前

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47076263

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档