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

Build for embedded systems

This commit is contained in:
Maksim Shabunin
2017-11-28 12:53:40 +03:00
parent 9665dde678
commit 7349b8f5ce
25 changed files with 184 additions and 135 deletions
+4 -4
View File
@@ -295,11 +295,11 @@ UMat Mat::getUMat(int accessFlags, UMatUsageFlags usageFlags) const
new_u = a->allocate(dims, size.p, type(), data, step.p, accessFlags, usageFlags);
}
bool allocated = false;
try
CV_TRY
{
allocated = UMat::getStdAllocator()->allocate(new_u, accessFlags, usageFlags);
}
catch (const cv::Exception& e)
CV_CATCH(cv::Exception, e)
{
fprintf(stderr, "Exception: %s\n", e.what());
}
@@ -371,12 +371,12 @@ void UMat::create(int d, const int* _sizes, int _type, UMatUsageFlags _usageFlag
a = a0;
a0 = Mat::getDefaultAllocator();
}
try
CV_TRY
{
u = a->allocate(dims, size, _type, 0, step.p, 0, usageFlags);
CV_Assert(u != 0);
}
catch(...)
CV_CATCH_ALL
{
if(a != a0)
u = a0->allocate(dims, size, _type, 0, step.p, 0, usageFlags);