propagated fix for Matx(Matx::diag_type) constructor from branch 2.3 to trunk
authorVadim Pisarevsky <no@email>
Mon, 27 Jun 2011 20:01:05 +0000 (20:01 +0000)
committerVadim Pisarevsky <no@email>
Mon, 27 Jun 2011 20:01:05 +0000 (20:01 +0000)
modules/core/include/opencv2/core/operations.hpp

index e98dd0e..60b4926 100644 (file)
@@ -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;
 }