Commit 9bc26a41e47571fe65f9e790ff5c5deb92fecde5

Authored by Charles Otto
1 parent d7a63a01

Handle column -> row major in matFormat correctly

We do need to do a transpose, but the inital matrix should have columns and
rows reversed, so that the matrix side remains correct.
Showing 1 changed file with 3 additions and 1 deletions
openbr/plugins/format.cpp
@@ -418,7 +418,9 @@ class matFormat : public Format @@ -418,7 +418,9 @@ class matFormat : public Format
418 } 418 }
419 419
420 if ((rows > 0) && (columns > 0) && (matrixType != 0) && !matrixData.isEmpty()) { 420 if ((rows > 0) && (columns > 0) && (matrixType != 0) && !matrixData.isEmpty()) {
421 - t.append(Mat(rows, columns, matrixType, matrixData.data())); 421 + Mat transposed;
  422 + transpose(Mat(columns, rows, matrixType, matrixData.data()), transposed);
  423 + t.append(transposed);
422 } 424 }
423 } 425 }
424 } 426 }