opencv2 / core / eigen.hpp Eigen:不命名类型

时间:2017-05-16 06:24:12

标签: c++ opencv eigen3

我想将Eigen的矩阵转换为opencv的mat。所以,我使用了opencv函数' eigen2cv'包含在< opencv2 / core / eigen.hpp'中。但是,这个文件似乎不包括“Eigen / Core”,因此我遇到了很多错误。它告诉我' Eigen'剂量不是一种类型。还有更多细节:

/opt/ros/kinetic/include/opencv-3.2.0-dev/opencv2/core/eigen.hpp:63:22: error: ‘Eigen’ does not name a type
void eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxC
                  ^
/opt/ros/kinetic/include/opencv-3.2.0-dev/opencv2/core/eigen.hpp:63:35: error: expected unqualified-id before ‘<’ token
void eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxC
                               ^
/opt/ros/kinetic/include/opencv-3.2.0-dev/opencv2/core/eigen.hpp:63:35: error: expected ‘)’ before ‘<’ token
/opt/ros/kinetic/include/opencv-3.2.0-dev/opencv2/core/eigen.hpp:63:35: error: expected initializer before ‘<’ token
/opt/ros/kinetic/include/opencv-3.2.0-dev/opencv2/core/eigen.hpp:81:22: error: ‘Eigen’ does not name a type
void eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxC
                  ^
/opt/ros/kinetic/include/opencv-3.2.0-dev/opencv2/core/eigen.hpp:81:35: error: expected unqualified-id before ‘<’ token
void eigen2cv( const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxC
                               ^
/opt/ros/kinetic/include/opencv-3.2.0-dev/opencv2/core/eigen.hpp:81:35: error: expected ‘)’ before ‘<’ token

我已经使用OpenCV-3.2.0安装了Eigen3,Opencv-2.4.13和ROS-Kinetic。我的CmakeLists看起来像这样:

find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED) 

include_directories(
include
${OpenCV_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
)

提前谢谢!

0 个答案:

没有答案