chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:33:03 +08:00
commit 5b57521aa1
8226 changed files with 3425766 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
//
// MatrixTest.cpp
// MNNTests
//
// Created by MNN on 2019/01/10.
// Copyright © 2018, Alibaba Group Holding Limited
//
#include <MNN/Matrix.h>
#include "MNNTestSuite.h"
using namespace MNN::CV;
class MatrixScaleTest : public MNNTestCase {
public:
virtual ~MatrixScaleTest() = default;
virtual bool run(int precision) {
Matrix m;
m.setRectToRect(Rect{20, 21, 40, 41}, Rect{0, 0, 100, 100}, Matrix::kCenter_ScaleToFit);
Point p;
m.invert(&m);
m.mapXY(50, 50, &p);
MNNTEST_ASSERT(p.fX == 30);
MNNTEST_ASSERT(p.fY == 31);
return true;
}
};
MNNTestSuiteRegister(MatrixScaleTest, "cv/matrix/scale");