mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -2456,4 +2456,16 @@ TEST(Core_MinMaxIdx, rows_overflow)
|
||||
}
|
||||
|
||||
|
||||
TEST(Core_Magnitude, regression_19506)
|
||||
{
|
||||
for (int N = 1; N <= 64; ++N)
|
||||
{
|
||||
Mat a(1, N, CV_32FC1, Scalar::all(1e-20));
|
||||
Mat res;
|
||||
magnitude(a, a, res);
|
||||
EXPECT_LE(cvtest::norm(res, NORM_L1), 1e-15) << N;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}} // namespace
|
||||
|
||||
@@ -1466,7 +1466,7 @@ template<typename R> struct TheTest
|
||||
R r1 = vx_load_expand((const cv::float16_t*)data.a.d);
|
||||
R r2(r1);
|
||||
EXPECT_EQ(1.0f, r1.get0());
|
||||
vx_store(data_f32.a.d, r2);
|
||||
v_store(data_f32.a.d, r2);
|
||||
EXPECT_EQ(-2.0f, data_f32.a.d[R::nlanes - 1]);
|
||||
|
||||
out.a.clear();
|
||||
|
||||
@@ -1551,4 +1551,14 @@ TEST(Core_MatExpr, empty_check_15760)
|
||||
EXPECT_THROW(Mat c = Mat().cross(Mat()), cv::Exception);
|
||||
}
|
||||
|
||||
TEST(Core_Arithm, scalar_handling_19599) // https://github.com/opencv/opencv/issues/19599 (OpenCV 4.x+ only)
|
||||
{
|
||||
Mat a(1, 1, CV_32F, Scalar::all(1));
|
||||
Mat b(4, 1, CV_64F, Scalar::all(1)); // MatExpr may convert Scalar to Mat
|
||||
Mat c;
|
||||
EXPECT_NO_THROW(cv::multiply(a, b, c));
|
||||
EXPECT_EQ(1, c.cols);
|
||||
EXPECT_EQ(1, c.rows);
|
||||
}
|
||||
|
||||
}} // namespace
|
||||
|
||||
Reference in New Issue
Block a user