1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

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
+6
View File
@@ -411,6 +411,12 @@ void createMat(const cv::GMatDesc &desc, cv::Mat& mat)
{
GAPI_Assert(!desc.planar);
mat.create(desc.dims, desc.depth);
#if !defined(GAPI_STANDALONE)
// NB: WA for 1D mats.
if (desc.dims.size() == 1u) {
mat.dims = 1;
}
#endif
}
}