1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #20731 from komakai:matrix_mult_android_ios

This commit is contained in:
Alexander Alekhin
2021-10-05 15:35:58 +00:00
8 changed files with 90 additions and 2 deletions
+10
View File
@@ -683,6 +683,16 @@ class MatTests: OpenCVTestCase {
try assertMatEqual(truth!, dst, OpenCVTestCase.EPS)
}
func testMatMulMat() throws {
let m1 = Mat(rows: 2, cols: 2, type: CvType.CV_32F, scalar: Scalar(2))
let m2 = Mat(rows: 2, cols: 2, type: CvType.CV_32F, scalar: Scalar(3))
dst = m1.matMul(m2)
truth = Mat(rows: 2, cols: 2, type: CvType.CV_32F, scalar: Scalar(12))
try assertMatEqual(truth!, dst, OpenCVTestCase.EPS)
}
func testOnesIntIntInt() throws {
dst = Mat.ones(rows: OpenCVTestCase.matSize, cols: OpenCVTestCase.matSize, type: CvType.CV_32F)