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:
committed by
GitHub
parent
5e434073d4
commit
9390c56831
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user