MCPcopy Create free account
hub / github.com/alibaba/MNN / run

Method run

test/cv/MatrixTest.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15public:
16 virtual ~MatrixScaleTest() = default;
17 virtual bool run(int precision) {
18 Matrix m;
19 m.setRectToRect(Rect{20, 21, 40, 41}, Rect{0, 0, 100, 100}, Matrix::kCenter_ScaleToFit);
20 Point p;
21 m.invert(&m);
22 m.mapXY(50, 50, &p);
23
24 MNNTEST_ASSERT(p.fX == 30);
25 MNNTEST_ASSERT(p.fY == 31);
26 return true;
27 }
28};
29MNNTestSuiteRegister(MatrixScaleTest, "cv/matrix/scale");

Callers

nothing calls this directly

Calls 2

setRectToRectMethod · 0.80
invertMethod · 0.45

Tested by

no test coverage detected