结构从运动(openCV):“重建”未在此范围内声明
Structure from Motion (openCV): ‘reconstruct’ was not declared in this scope
我是opencv库的初学者。我已经在 Ubuntu 17.04 上安装了它,安装过程中的一切都很完美,完全没有错误。我已经安装了Opencv-master,构建了它,然后我下载了opencv_contrib-master,一切都很完美。
我正在尝试使用 SFM(运动结构)构建scene_reconstruction。我已经安装了所有依赖项:
sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
然后我安装了谷神星求解器:
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build && cd build
cmake ..
make -j4
make test
sudo make install
一切都还好,完全没有错误。我试图按照这里的官方文档(场景重建)编写example_sfm_scene_reconstruction.cpp,将其命名为重建.cpp。
我写了CMakeLists.txt文件:
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 ..
:
-- 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
时,出现此错误:
error: ‘reconstruct’ was not declared in this scope
econstruct(images_paths, Rs_est, ts_est, K,
points3d_estimated,is_projective);
我试图关注这个论坛问题 476,但任何事情都帮助了我。
add
#define CERES_FOUND 1
在代码之前
相关文章:
- 错误:未在此范围内声明'reverse'
- 错误:"imread"未在此范围内声明
- 我在范围内未声明的错误类有问题
- 未在此范围内声明错误 'xy'
- Socklen_t未在此范围内声明
- 错误:'[' 之前预期的非限定 id 和错误:'users'未在此范围内声明
- "Main"已在当前范围内声明
- c++ 变量在宏的扩展中没有在这个范围内声明
- C++ 在编译过程中 strtok 函数 Eclipse 说没有在范围内声明?
- 'num1'未在此范围内声明
- 在此范围内未声明错误"Clreol"
- 如何找到在本地范围内声明的变量的地址?
- 简化在 Pybind11 中为 C++ 模板类生成包装类:模板声明不能出现在块范围内
- NT状态未在此范围内声明
- 变量未在此范围内声明 数组线性搜索
- 包含文件中的 Typdef "未在此范围内声明"
- 'ClassName'和'ClassInstance'未在此范围内声明
- "ChaCha"尚未在此范围内使用Crypto++声明?
- C++ 中的类之间的数据重新循环 - 错误:'<class name>'未在此范围内声明
- 如何在类声明范围内使用“using space::function”