aboutsummaryrefslogtreecommitdiff
path: root/redist/minimal_opencvtest.c
diff options
context:
space:
mode:
authorJustin Berger <jdavidberger@gmail.com>2018-06-27 04:22:22 +0000
committerJustin Berger <jdavidberger@gmail.com>2018-06-27 04:22:22 +0000
commitcf36bd58b8c9d1c23ccfe1a52beafe376ba02e6b (patch)
treebae72f9ebe6937dbbabb7beec3115028a15743b0 /redist/minimal_opencvtest.c
parent902bbde43fb6e000140da0da56c05f2d4af1df5f (diff)
parente68b69a9a14aeb70988c52666e60502fe6f049ab (diff)
downloadlibsurvive-cf36bd58b8c9d1c23ccfe1a52beafe376ba02e6b.tar.gz
libsurvive-cf36bd58b8c9d1c23ccfe1a52beafe376ba02e6b.tar.bz2
Merge remote-tracking branch 'origin/master' into fix_wired_tracker
Diffstat (limited to 'redist/minimal_opencvtest.c')
-rw-r--r--redist/minimal_opencvtest.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/redist/minimal_opencvtest.c b/redist/minimal_opencvtest.c
new file mode 100644
index 0000000..6320a27
--- /dev/null
+++ b/redist/minimal_opencvtest.c
@@ -0,0 +1,39 @@
+#include "minimal_opencv.h"
+#include <assert.h>
+#include <math.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+void print_mat(const CvMat *M) {}
+
+void test_gemm() {
+ double _2x3[2*3] = {1, 2, 3, 4, 5, 6};
+ CvMat m2x3 = cvMat(2, 3, CV_64F, _2x3);
+
+ double _3x2[2*3] = {1, 2, 3, 4, 5, 6};
+ CvMat m3x2 = cvMat(3, 2, CV_64F, _3x2);
+
+ double _2x2[2*2] = {1, 2, 3, 4};
+ CvMat m2x2 = cvMat(2, 2, CV_64F, _2x2);
+
+ double _3x3[3*3] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
+ CvMat m3x3 = cvMat(3, 3, CV_64F, _3x3);
+
+ cvGEMM(&m2x3, &m3x2, 1, 0, 0, &m2x2, 0);
+ cvGEMM(&m3x2, &m2x3, 1, 0, 0, &m3x3, 0);
+
+ cvGEMM(&m2x3, &m2x3, 1, 0, 0, &m3x3, GEMM_1_T);
+ cvGEMM(&m2x3, &m2x3, 1, 0, 0, &m2x2, GEMM_2_T);
+
+ cvGEMM(&m2x3, &m3x2, 1, 0, 0, &m3x3, GEMM_1_T | GEMM_2_T);
+ // cvGEMM(&m3x2, &m2x3, 1, 0, 0, &m2x2, GEMM_1_T | GEMM_2_T);
+
+}
+
+int main()
+{
+ test_gemm();
+
+ return 0;
+}
+