1
0
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:
Alexander Alekhin
2023-01-21 18:19:39 +00:00
74 changed files with 249 additions and 228 deletions
+2 -2
View File
@@ -1077,7 +1077,7 @@ double CV_ColorLabTest::get_success_error_level( int /*test_case_idx*/, int i, i
{
int depth = test_mat[i][j].depth();
// j == 0 is for forward code, j == 1 is for inverse code
return (depth == CV_8U) ? (srgb ? 32 : 8) :
return (depth == CV_8U) ? (srgb ? 37 : 8) :
//(depth == CV_16U) ? 32 : // 16u is disabled
srgb ? ((j == 0) ? 0.4 : 0.0055) : 1e-3;
}
@@ -1256,7 +1256,7 @@ double CV_ColorLuvTest::get_success_error_level( int /*test_case_idx*/, int i, i
{
int depth = test_mat[i][j].depth();
// j == 0 is for forward code, j == 1 is for inverse code
return (depth == CV_8U) ? (srgb ? 36 : 8) :
return (depth == CV_8U) ? (srgb ? 37 : 8) :
//(depth == CV_16U) ? 32 : // 16u is disabled
5e-2;
}
@@ -81,7 +81,7 @@ void CV_ConnectedComponentsTest::run(int /* start_from */)
int ccltype[] = { cv::CCL_DEFAULT, cv::CCL_WU, cv::CCL_GRANA, cv::CCL_BOLELLI, cv::CCL_SAUF, cv::CCL_BBDT, cv::CCL_SPAGHETTI };
string exp_path = string(ts->get_data_path()) + "connectedcomponents/ccomp_exp.png";
Mat exp = imread(exp_path, 0);
Mat exp = imread(exp_path, IMREAD_GRAYSCALE);
Mat orig = imread(string(ts->get_data_path()) + "connectedcomponents/concentric_circles.png", 0);
if (orig.empty())
+1 -1
View File
@@ -180,7 +180,7 @@ cvTsIsPointOnLineSegment(const cv::Point2f &x, const cv::Point2f &a, const cv::P
double d2 = cvTsDist(cvPoint2D32f(x.x, x.y), cvPoint2D32f(b.x, b.y));
double d3 = cvTsDist(cvPoint2D32f(a.x, a.y), cvPoint2D32f(b.x, b.y));
return (abs(d1 + d2 - d3) <= (1E-5));
return (abs(d1 + d2 - d3) <= (1E-4));
}
+1 -1
View File
@@ -53,7 +53,7 @@ protected:
void run(int)
{
string imgpath = string(ts->get_data_path()) + "shared/lena.png";
Mat img = imread(imgpath, 1), gray, smallimg, result;
Mat img = imread(imgpath, IMREAD_COLOR), gray, smallimg, result;
UMat uimg = img.getUMat(ACCESS_READ), ugray, usmallimg, uresult;
cvtColor(img, gray, COLOR_BGR2GRAY);
-1
View File
@@ -102,7 +102,6 @@ void CV_ImgWarpBaseTest::get_test_array_types_and_sizes( int test_case_idx,
int cn = cvtest::randInt(rng) % 3 + 1;
cvtest::ArrayTest::get_test_array_types_and_sizes( test_case_idx, sizes, types );
depth = depth == 0 ? CV_8U : depth == 1 ? CV_16U : CV_32F;
cn += cn == 2;
types[INPUT][0] = types[INPUT_OUTPUT][0] = types[REF_INPUT_OUTPUT][0] = CV_MAKETYPE(depth, cn);
if( test_array[INPUT].size() > 1 )
+1 -5
View File
@@ -151,8 +151,6 @@ void CV_ImageWarpBaseTest::generate_test_data()
depth = rng.uniform(0, CV_64F);
int cn = rng.uniform(1, 4);
while (cn == 2)
cn = rng.uniform(1, 4);
src.create(ssize, CV_MAKE_TYPE(depth, cn));
@@ -237,7 +235,7 @@ float CV_ImageWarpBaseTest::get_success_error_level(int _interpolation, int) con
else if (_interpolation == INTER_LANCZOS4)
return 1.0f;
else if (_interpolation == INTER_NEAREST)
return 1.0f;
return 255.0f; // FIXIT: check is not reliable for Black/White (0/255) images
else if (_interpolation == INTER_AREA)
return 2.0f;
else
@@ -430,8 +428,6 @@ void CV_Resize_Test::generate_test_data()
depth = rng.uniform(0, CV_64F);
int cn = rng.uniform(1, 4);
while (cn == 2)
cn = rng.uniform(1, 4);
src.create(ssize, CV_MAKE_TYPE(depth, cn));
+1 -1
View File
@@ -60,7 +60,7 @@ CV_WatershedTest::~CV_WatershedTest() {}
void CV_WatershedTest::run( int /* start_from */)
{
string exp_path = string(ts->get_data_path()) + "watershed/wshed_exp.png";
Mat exp = imread(exp_path, 0);
Mat exp = imread(exp_path, IMREAD_GRAYSCALE);
Mat orig = imread(string(ts->get_data_path()) + "inpaint/orig.png");
FileStorage fs(string(ts->get_data_path()) + "watershed/comp.xml", FileStorage::READ);