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

fix rounding

This commit is contained in:
Aleksei Trutnev
2022-01-12 01:11:46 +03:00
parent c3e27bcf87
commit e9c46f38fc
4 changed files with 11 additions and 11 deletions
@@ -504,8 +504,8 @@ namespace imgproc {
}
else
{
int outSz_w = static_cast<int>(round(in.size.width * fx));
int outSz_h = static_cast<int>(round(in.size.height * fy));
int outSz_w = saturate_cast<int>(in.size.width * fx);
int outSz_h = saturate_cast<int>(in.size.height * fy);
GAPI_Assert(outSz_w > 0 && outSz_h > 0);
return in.withSize(Size(outSz_w, outSz_h));
}