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

Fix fluid resize operating with zero output size

This commit is contained in:
Smirnov Alexey
2020-05-06 16:43:06 +03:00
parent c722625f28
commit 3e3d4ad797
3 changed files with 26 additions and 6 deletions
+4 -4
View File
@@ -392,10 +392,10 @@ namespace core {
}
else
{
GAPI_Assert(fx != 0. && fy != 0.);
return in.withSize
(Size(static_cast<int>(round(in.size.width * fx)),
static_cast<int>(round(in.size.height * fy))));
int outSz_w = static_cast<int>(round(in.size.width * fx));
int outSz_h = static_cast<int>(round(in.size.height * fy));
GAPI_Assert(outSz_w > 0 && outSz_h > 0);
return in.withSize(Size(outSz_w, outSz_h));
}
}
};