Merge pull request #17896 from OrestChura:oc/fix_kw_videotests

* - fix numeric overflow due to incorrect type casting
 - remove unnecessary default constructor

* Drop the cast
pull/17970/head
Orest Chura 5 years ago committed by GitHub
parent b698d0a6ee
commit 53bfdc318a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/gapi/test/common/gapi_video_tests_common.hpp

@ -43,7 +43,7 @@ inline void initTrackingPointsArray(std::vector<cv::Point2f>& points, int width,
points.clear(); points.clear();
GAPI_Assert((nPointsX >= 0) && (nPointsY) >= 0); GAPI_Assert((nPointsX >= 0) && (nPointsY) >= 0);
points.reserve(static_cast<size_t>(nPointsX * nPointsY)); points.reserve(nPointsX * nPointsY);
for (int x = stepX / 2; x < width; x += stepX) for (int x = stepX / 2; x < width; x += stepX)
{ {
@ -80,9 +80,7 @@ struct OptFlowLKTestOutput
struct BuildOpticalFlowPyramidTestParams struct BuildOpticalFlowPyramidTestParams
{ {
BuildOpticalFlowPyramidTestParams(): fileName(""), winSize(-1), maxLevel(-1), BuildOpticalFlowPyramidTestParams() = default;
withDerivatives(false), pyrBorder(-1),
derivBorder(-1), tryReuseInputImage(false) { }
BuildOpticalFlowPyramidTestParams(const std::string& name, int winSz, int maxLvl, BuildOpticalFlowPyramidTestParams(const std::string& name, int winSz, int maxLvl,
bool withDeriv, int pBorder, int dBorder, bool withDeriv, int pBorder, int dBorder,

Loading…
Cancel
Save