diff -r cbea2528bf72 opencv/modules/core/include/opencv2/core/core.hpp --- a/opencv/modules/core/include/opencv2/core/core.hpp Tue Jan 03 16:16:47 2012 +0100 +++ b/opencv/modules/core/include/opencv2/core/core.hpp Thu Jan 05 18:15:03 2012 +0100 @@ -491,7 +491,7 @@ Matx<_Tp, m, 1> col(int i) const; //! extract the matrix diagonal - Matx<_Tp, MIN(m,n), 1> diag() const; + diag_type diag() const; //! transpose the matrix Matx<_Tp, n, m> t() const; diff -r cbea2528bf72 opencv/modules/core/include/opencv2/core/operations.hpp --- a/opencv/modules/core/include/opencv2/core/operations.hpp Tue Jan 03 16:16:47 2012 +0100 +++ b/opencv/modules/core/include/opencv2/core/operations.hpp Thu Jan 05 18:15:03 2012 +0100 @@ -355,7 +355,7 @@ template inline -Matx<_Tp,m,n> Matx<_Tp,m,n>::diag(const Matx<_Tp,MIN(m,n),1>& d) +Matx<_Tp,m,n> Matx<_Tp,m,n>::diag(const typename Matx<_Tp,m,n>::diag_type& d) { Matx<_Tp,m,n> M; for(int i = 0; i < MIN(m,n); i++) @@ -431,7 +431,7 @@ template inline -Matx<_Tp, MIN(m,n), 1> Matx<_Tp, m, n>::diag() const +typename Matx<_Tp, m, n>::diag_type Matx<_Tp, m, n>::diag() const { diag_type d; for( int i = 0; i < MIN(m, n); i++ )