From 2e176aae471d906285a12d9275cc1ec0a1bc7a01 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 14 May 2014 16:57:36 -0430 Subject: [PATCH] Transposed the output rotation matrix. --- jni/cv_proc.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jni/cv_proc.cpp b/jni/cv_proc.cpp index 9c38d88..6550821 100644 --- a/jni/cv_proc.cpp +++ b/jni/cv_proc.cpp @@ -20,7 +20,7 @@ #include "marker.hpp" -//#define LOG_ENABLED +#define LOG_ENABLED #define MAX_MARKERS 5 #define TRANSLATION_VECTOR_POINTS 3 #define ROTATION_MATRIX_SIZE 9 @@ -79,9 +79,12 @@ JNIEXPORT void JNICALL Java_ve_ucv_ciens_ccg_nxtar_MainActivity_getMarkerCodesAn } for(int k = 0; k < vMarkers.size(); k++){ + log(TAG, "getMarkerCodesAndLocations(): Rotation matrix:"); for(int row = 0; row < 3; row++){ for(int col = 0; col < 3; col++){ - _rt[col + (row * 3) + (9 * k)] = vMarkers[k].rotation.at(row, col); + sprintf(codeMsg, "%f ", vMarkers[k].rotation.at(row, col)); + log(TAG, codeMsg); + _rt[row + (col * 3) + (9 * k)] = vMarkers[k].rotation.at(row, col); } } }