Merge pull request #26030 from CNClareChen:4.x

Workaround for division by zero, issue #25795
pull/26091/head
Alexander Smorkalov 3 months ago committed by GitHub
commit 2829a6de85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp

@ -438,7 +438,7 @@ PERF_TEST_P_(DivPerfTest, TestPerformance)
//This condition need to workaround the #21044 issue in the OpenCV.
//It reinitializes divider matrix without zero values for CV_16S DST type.
if (dtype == CV_16S && dtype != type)
if (dtype != type)
cv::randu(in_mat2, cv::Scalar::all(1), cv::Scalar::all(255));
// OpenCV code ///////////////////////////////////////////////////////////
@ -530,8 +530,7 @@ PERF_TEST_P_(DivRCPerfTest, TestPerformance)
initMatsRandU(type, sz, dtype, false);
//This condition need to workaround the #21044 issue in the OpenCV.
//It reinitializes divider matrix without zero values for CV_16S DST type.
if (dtype == CV_16S || (type == CV_16S && dtype == -1))
cv::randu(in_mat1, cv::Scalar::all(1), cv::Scalar::all(255));
cv::randu(in_mat1, cv::Scalar::all(1), cv::Scalar::all(255));
// OpenCV code ///////////////////////////////////////////////////////////
cv::divide(sc, in_mat1, out_mat_ocv, scale, dtype);

Loading…
Cancel
Save