From a2880a547a26c1d09ad0129ce492e47c4bb6282f Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 27 Jun 2011 19:50:54 +0000 Subject: [PATCH] fixed Matx::diag(const Matx::diag_type& d) constructor. --- modules/core/include/opencv2/core/operations.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp index e98dd0ef38..60b4926c48 100644 --- a/modules/core/include/opencv2/core/operations.hpp +++ b/modules/core/include/opencv2/core/operations.hpp @@ -348,7 +348,7 @@ Matx<_Tp,m,n> Matx<_Tp,m,n>::diag(const Matx<_Tp,MIN(m,n),1>& d) { Matx<_Tp,m,n> M; for(int i = 0; i < MIN(m,n); i++) - M(i,i) = d[i]; + M(i,i) = d(i, 0); return M; }