renamed WITH(HAVE)_EIGEN2 to WITH(HAVE)_EIGEN, fixed compilation error if eigen3 is used (#805)
This commit is contained in:
@@ -307,7 +307,7 @@ endif()
|
|||||||
|
|
||||||
set(WITH_TBB OFF CACHE BOOL "Include Intel TBB support")
|
set(WITH_TBB OFF CACHE BOOL "Include Intel TBB support")
|
||||||
set(WITH_IPP OFF CACHE BOOL "Include Intel IPP support")
|
set(WITH_IPP OFF CACHE BOOL "Include Intel IPP support")
|
||||||
set(WITH_EIGEN2 ON CACHE BOOL "Include Eigen2/Eigen3 support")
|
set(WITH_EIGEN ON CACHE BOOL "Include Eigen2/Eigen3 support")
|
||||||
set(WITH_CUDA OFF CACHE BOOL "Include NVidia Cuda Runtime support")
|
set(WITH_CUDA OFF CACHE BOOL "Include NVidia Cuda Runtime support")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -786,16 +786,16 @@ if(WITH_OPENNI)
|
|||||||
include(OpenCVFindOpenNI.cmake)
|
include(OpenCVFindOpenNI.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
############################## Eigen2 ##############################
|
############################## Eigen ##############################
|
||||||
|
|
||||||
if(WITH_EIGEN2)
|
if(WITH_EIGEN)
|
||||||
find_path(EIGEN2_INCLUDE_PATH "Eigen/Core"
|
find_path(EIGEN_INCLUDE_PATH "Eigen/Core"
|
||||||
PATHS "/usr/local/include/eigen2" "/opt/include/eigen2" "/usr/include/eigen2"
|
PATHS "/usr/local/include/eigen2" "/opt/include/eigen2" "/usr/include/eigen2"
|
||||||
"/usr/local/include/eigen3" "/opt/include/eigen3" "/usr/include/eigen3"
|
"/usr/local/include/eigen3" "/opt/include/eigen3" "/usr/include/eigen3"
|
||||||
DOC "The path to Eigen2/Eigen3 headers")
|
DOC "The path to Eigen2/Eigen3 headers")
|
||||||
if(EIGEN2_INCLUDE_PATH)
|
if(EIGEN_INCLUDE_PATH)
|
||||||
include_directories(${EIGEN2_INCLUDE_PATH})
|
include_directories(${EIGEN_INCLUDE_PATH})
|
||||||
set(HAVE_EIGEN2 1)
|
set(HAVE_EIGEN 1)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -1481,10 +1481,10 @@ else()
|
|||||||
message(STATUS " Use Cuda: NO")
|
message(STATUS " Use Cuda: NO")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAVE_EIGEN2)
|
if(HAVE_EIGEN)
|
||||||
message(STATUS " Use Eigen2: YES")
|
message(STATUS " Use Eigen: YES")
|
||||||
else()
|
else()
|
||||||
message(STATUS " Use Eigen2: NO")
|
message(STATUS " Use Eigen: NO")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "")
|
message(STATUS "")
|
||||||
|
@@ -163,8 +163,8 @@
|
|||||||
/* Threading Framework --- temporary decision for ARM instead of Intel TBB */
|
/* Threading Framework --- temporary decision for ARM instead of Intel TBB */
|
||||||
#cmakedefine HAVE_THREADING_FRAMEWORK
|
#cmakedefine HAVE_THREADING_FRAMEWORK
|
||||||
|
|
||||||
/* Eigen2 Matrix & Linear Algebra Library */
|
/* Eigen Matrix & Linear Algebra Library */
|
||||||
#cmakedefine HAVE_EIGEN2
|
#cmakedefine HAVE_EIGEN
|
||||||
|
|
||||||
/* NVidia Cuda Runtime API*/
|
/* NVidia Cuda Runtime API*/
|
||||||
#cmakedefine HAVE_CUDA
|
#cmakedefine HAVE_CUDA
|
||||||
|
@@ -147,7 +147,7 @@ CV_INLINE IppiSize ippiSize(int width, int height)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_EIGEN2
|
#ifdef HAVE_EIGEN
|
||||||
#include <Eigen/Core>
|
#include <Eigen/Core>
|
||||||
#include "opencv2/core/eigen.hpp"
|
#include "opencv2/core/eigen.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
|
||||||
#ifdef HAVE_EIGEN2
|
#if defined(HAVE_EIGEN) && EIGEN_WORLD_VERSION == 2
|
||||||
#include <Eigen/Array>
|
#include <Eigen/Array>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -351,9 +351,18 @@ template<>
|
|||||||
void BruteForceMatcher<L2<float> >::knnMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, int knn,
|
void BruteForceMatcher<L2<float> >::knnMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, int knn,
|
||||||
const vector<Mat>& masks, bool compactResult )
|
const vector<Mat>& masks, bool compactResult )
|
||||||
{
|
{
|
||||||
#ifndef HAVE_EIGEN2
|
#ifndef HAVE_EIGEN
|
||||||
commonKnnMatchImpl( *this, queryDescriptors, matches, knn, masks, compactResult );
|
commonKnnMatchImpl( *this, queryDescriptors, matches, knn, masks, compactResult );
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#if EIGEN_WORLD_VERSION == 2
|
||||||
|
printf("EIGEN VERSION = 2 ");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if EIGEN_WORLD_VERSION == 3
|
||||||
|
printf("EIGEN VERSION = 3 ");
|
||||||
|
#endif
|
||||||
|
|
||||||
CV_Assert( queryDescriptors.type() == CV_32FC1 || queryDescriptors.empty() );
|
CV_Assert( queryDescriptors.type() == CV_32FC1 || queryDescriptors.empty() );
|
||||||
CV_Assert( masks.empty() || masks.size() == trainDescCollection.size() );
|
CV_Assert( masks.empty() || masks.size() == trainDescCollection.size() );
|
||||||
|
|
||||||
@@ -439,7 +448,7 @@ template<>
|
|||||||
void BruteForceMatcher<L2<float> >::radiusMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, float maxDistance,
|
void BruteForceMatcher<L2<float> >::radiusMatchImpl( const Mat& queryDescriptors, vector<vector<DMatch> >& matches, float maxDistance,
|
||||||
const vector<Mat>& masks, bool compactResult )
|
const vector<Mat>& masks, bool compactResult )
|
||||||
{
|
{
|
||||||
#ifndef HAVE_EIGEN2
|
#ifndef HAVE_EIGEN
|
||||||
commonRadiusMatchImpl( *this, queryDescriptors, matches, maxDistance, masks, compactResult );
|
commonRadiusMatchImpl( *this, queryDescriptors, matches, maxDistance, masks, compactResult );
|
||||||
#else
|
#else
|
||||||
CV_Assert( queryDescriptors.type() == CV_32FC1 || queryDescriptors.empty() );
|
CV_Assert( queryDescriptors.type() == CV_32FC1 || queryDescriptors.empty() );
|
||||||
|
Reference in New Issue
Block a user