1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2024-08-27 18:31:36 +03:00
108 changed files with 1241 additions and 646 deletions
+7 -5
View File
@@ -42,7 +42,7 @@
#include "test_precomp.hpp"
#include "opencv2/ts/ocl_test.hpp" // T-API like tests
#include "opencv2/core/core_c.h"
#include <fenv.h>
namespace opencv_test {
namespace {
@@ -1087,7 +1087,6 @@ bool CV_OperationsTest::operations1()
Size sz(10, 20);
if (sz.area() != 200) throw test_excep();
if (sz.width != 10 || sz.height != 20) throw test_excep();
if (cvSize(sz).width != 10 || cvSize(sz).height != 20) throw test_excep();
Rect r1(0, 0, 10, 20);
Size sz1(5, 10);
@@ -1519,7 +1518,7 @@ TEST(Core_sortIdx, regression_8941)
);
cv::Mat result;
cv::sortIdx(src.col(0), result, CV_SORT_EVERY_COLUMN | CV_SORT_ASCENDING);
cv::sortIdx(src.col(0), result, cv::SORT_EVERY_COLUMN | cv::SORT_ASCENDING);
#if 0
std::cout << src.col(0) << std::endl;
std::cout << result << std::endl;
@@ -1598,9 +1597,12 @@ TEST_P(Core_Arith_Regression24163, test_for_ties_to_even)
const Mat src2(matSize, matType, Scalar(beta, beta, beta, beta));
const Mat result = ( src1 + src2 ) / 2;
// Expected that default is FE_TONEAREST(Ties to Even).
const int rounding = fegetround();
fesetround(FE_TONEAREST);
const int mean = (int)lrint( static_cast<double>(alpha + beta) / 2.0 );
const Mat expected(matSize, matType, Scalar(mean,mean,mean,mean));
fesetround(rounding);
const Mat expected(matSize, matType, Scalar::all(mean));
// Compare result and extected.
ASSERT_EQ(expected.size(), result.size());