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

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2021-05-18 18:06:26 +00:00
8 changed files with 72 additions and 23 deletions
+16
View File
@@ -2355,4 +2355,20 @@ TEST(Mat, regression_18473)
}
TEST(Mat, ptrVecni_20044)
{
Mat_<int> m(3,4); m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12;
Vec2i idx(1,1);
uchar *u = m.ptr(idx);
EXPECT_EQ(int(6), *(int*)(u));
const uchar *cu = m.ptr(idx);
EXPECT_EQ(int(6), *(int*)(cu));
int *i = m.ptr<int>(idx);
EXPECT_EQ(int(6), *(i));
const int *ci = m.ptr<int>(idx);
EXPECT_EQ(int(6), *(ci));
}
}} // namespace