From 2776b42a7b96cdddf9677e3d5f9d99f1153d2c07 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Mon, 27 Jun 2011 20:01:05 +0000 Subject: [PATCH] propagated fix for Matx(Matx::diag_type) constructor from branch 2.3 to trunk --- 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 e98dd0e..60b4926 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; } -- 2.7.4