mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Reinitialize divider matrix in DivRCPerfTest and DivPerfTest Cases.
This patch reinitializes divider matrix without zero values in DivRCPerfTest and DivPerfTest test cases.
This commit is contained in:
parent
315f85d4f4
commit
9c19a0cdba
@ -438,7 +438,7 @@ PERF_TEST_P_(DivPerfTest, TestPerformance)
|
|||||||
|
|
||||||
//This condition need to workaround the #21044 issue in the OpenCV.
|
//This condition need to workaround the #21044 issue in the OpenCV.
|
||||||
//It reinitializes divider matrix without zero values for CV_16S DST type.
|
//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));
|
cv::randu(in_mat2, cv::Scalar::all(1), cv::Scalar::all(255));
|
||||||
|
|
||||||
// OpenCV code ///////////////////////////////////////////////////////////
|
// OpenCV code ///////////////////////////////////////////////////////////
|
||||||
@ -530,8 +530,7 @@ PERF_TEST_P_(DivRCPerfTest, TestPerformance)
|
|||||||
initMatsRandU(type, sz, dtype, false);
|
initMatsRandU(type, sz, dtype, false);
|
||||||
//This condition need to workaround the #21044 issue in the OpenCV.
|
//This condition need to workaround the #21044 issue in the OpenCV.
|
||||||
//It reinitializes divider matrix without zero values for CV_16S DST type.
|
//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 ///////////////////////////////////////////////////////////
|
// OpenCV code ///////////////////////////////////////////////////////////
|
||||||
cv::divide(sc, in_mat1, out_mat_ocv, scale, dtype);
|
cv::divide(sc, in_mat1, out_mat_ocv, scale, dtype);
|
||||||
|
Loading…
Reference in New Issue
Block a user