Merge pull request #21782 from TolyaTalamanov:at/fix-1d-mat-problems

[G-API] Fix problems with 1D cv::Mat as graph output

* Fix issues with 1D cv::Mat

* Fix cv::Mat::create

* Fix standalone build

* Add test on 1d mat

* Fix warning

* Add additional condition

* Add more tests
This commit is contained in:
Anatoliy Talamanov
2022-04-01 00:00:45 +03:00
committed by GitHub
parent 5e434073d4
commit 9390c56831
5 changed files with 104 additions and 1 deletions
+11
View File
@@ -2461,5 +2461,16 @@ TEST(Mat, reverse_iterator_19967)
}
TEST(Mat, Recreate1DMatWithSameMeta)
{
std::vector<int> dims = {100};
auto depth = CV_8U;
cv::Mat m(dims, depth);
// By default m has dims: [1, 100]
m.dims = 1;
EXPECT_NO_THROW(m.create(dims, depth));
}
}} // namespace