1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Simple matrix multiplication for Mat in iOS/Android

This commit is contained in:
Giles Payne
2021-10-05 20:16:06 +09:00
parent 24fcb7f813
commit 19a880bb91
8 changed files with 90 additions and 2 deletions
+10
View File
@@ -686,6 +686,16 @@ public class MatTest extends OpenCVTestCase {
assertMatEqual(truth, dst, EPS);
}
public void testMatMulMat() {
Mat m1 = new Mat(2, 2, CvType.CV_32F, new Scalar(2));
Mat m2 = new Mat(2, 2, CvType.CV_32F, new Scalar(3));
dst = m1.matMul(m2);
truth = new Mat(2, 2, CvType.CV_32F, new Scalar(12));
assertMatEqual(truth, dst, EPS);
}
public void testOnesIntIntInt() {
dst = Mat.ones(matSize, matSize, CvType.CV_32F);