added Eigen2 support; fixed compile errors on Ubuntu 10.04

This commit is contained in:
Vadim Pisarevsky
2010-06-29 15:49:15 +00:00
parent 7ec4b59fac
commit 60acd91ce1
5 changed files with 34 additions and 7 deletions

View File

@@ -566,7 +566,7 @@ public:
static Matx eye();
static Matx diag(const Vec<_Tp, MIN(m,n)>& d);
static Matx randu(_Tp a, _Tp b);
static Matx randn(_Tp m, _Tp sigma);
static Matx randn(_Tp a, _Tp b);
//! convertion to another data type
template<typename T2> operator Matx<T2, m, n>() const;
@@ -575,7 +575,7 @@ public:
template<int m1, int n1> Matx<_Tp, m1, n1> reshape() const;
//! extract part of the matrix
template<int m1, int n1> Matx<_Tp, m1, n1> minor(int i, int j) const;
template<int m1, int n1> Matx<_Tp, m1, n1> get_minor(int i, int j) const;
//! extract the matrix row
Matx<_Tp, 1, n> row(int i) const;

View File

@@ -134,6 +134,10 @@ CV_INLINE IppiSize ippiSize(int width, int height)
#endif
#endif
#ifdef HAVE_EIGEN2
#include "opencv2/core/eigen.hpp"
#endif
#ifdef __cplusplus
#ifdef HAVE_TBB

View File

@@ -734,7 +734,7 @@ Matx<_Tp, m1, n1> Matx<_Tp, m, n>::reshape() const
template<typename _Tp, int m, int n>
template<int m1, int n1> inline
Matx<_Tp, m1, n1> Matx<_Tp, m, n>::minor(int i, int j) const
Matx<_Tp, m1, n1> Matx<_Tp, m, n>::get_minor(int i, int j) const
{
CV_DbgAssert(0 <= i && i+m1 <= m && 0 <= j && j+n1 <= n);
Matx<_Tp, m1, n1> s;