You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
2.0 KiB

  1. --- a/modules/gapi/include/opencv2/gapi/core.hpp
  2. +++ b/modules/gapi/include/opencv2/gapi/core.hpp
  3. @@ -392,8 +392,8 @@ namespace core {
  4. {
  5. GAPI_Assert(fx != 0. && fy != 0.);
  6. return in.withSize
  7. - (Size(static_cast<int>(std::round(in.size.width * fx)),
  8. - static_cast<int>(std::round(in.size.height * fy))));
  9. + (Size(static_cast<int>(round(in.size.width * fx)),
  10. + static_cast<int>(round(in.size.height * fy))));
  11. }
  12. }
  13. };
  14. --- a/modules/gapi/include/opencv2/gapi/own/saturate.hpp
  15. +++ b/modules/gapi/include/opencv2/gapi/own/saturate.hpp
  16. @@ -81,8 +81,8 @@ static inline DST saturate(SRC x, R round)
  17. // explicit suffix 'd' for double type
  18. inline double ceild(double x) { return std::ceil(x); }
  19. inline double floord(double x) { return std::floor(x); }
  20. -inline double roundd(double x) { return std::round(x); }
  21. -inline double rintd(double x) { return std::rint(x); }
  22. +inline double roundd(double x) { return round(x); }
  23. +inline double rintd(double x) { return rint(x); }
  24. } //namespace own
  25. } //namespace gapi
  26. --- a/modules/gapi/src/backends/fluid/gfluidcore.cpp
  27. +++ b/modules/gapi/src/backends/fluid/gfluidcore.cpp
  28. @@ -389,7 +389,7 @@ static void run_arithm_s1(uchar out[], const float in[], int width, const float
  29. cv::util::suppress_unused_warning(v_op);
  30. for (; w < width; w++)
  31. {
  32. - out[w] = saturate<uchar>(s_op(in[w], scalar[0]), std::roundf);
  33. + out[w] = saturate<uchar>(s_op(in[w], scalar[0]), roundf);
  34. }
  35. }
  36. @@ -1954,7 +1954,7 @@ GAPI_FLUID_KERNEL(GFluidCartToPolar, cv::gapi::core::GCartToPolar, false)
  37. {
  38. float x = in1[l];
  39. float y = in2[l];
  40. - float magnitude = std::hypot(y, x);
  41. + float magnitude = hypot(y, x);
  42. float angle_rad = std::atan2(y, x);
  43. float angle = angleInDegrees?
  44. angle_rad * static_cast<float>(180 / CV_PI):