1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #25075 from mshabunin:cleanup-imgproc-1

C-API cleanup: apps, imgproc_c and some constants #25075

Merge with https://github.com/opencv/opencv_contrib/pull/3642

* Removed obsolete apps - traincascade and createsamples (please use older OpenCV versions if you need them). These apps relied heavily on C-API
* removed all mentions of imgproc C-API headers (imgproc_c.h, types_c.h) - they were empty, included core C-API headers
* replaced usage of several C constants with C++ ones (error codes, norm modes, RNG modes, PCA modes, ...) - most part of this PR (split into two parts - all modules and calib+3d - for easier backporting)
* removed imgproc C-API headers (as separate commit, so that other changes could be backported to 4.x)

Most of these changes can be backported to 4.x.
This commit is contained in:
Maksim Shabunin
2024-03-05 12:18:31 +03:00
committed by GitHub
parent 1d1faaabef
commit 8cbdd0c833
152 changed files with 820 additions and 18160 deletions
+5 -6
View File
@@ -975,7 +975,7 @@ OCL_PERF_TEST_P(InRangeFixture, InRange,
///////////// Normalize ////////////////////////
CV_ENUM(NormalizeModes, CV_MINMAX, CV_L2, CV_L1, CV_C)
CV_ENUM(NormalizeModes, NORM_MINMAX, NORM_L2, NORM_L1, NORM_INF)
typedef tuple<Size, MatType, NormalizeModes> NormalizeParams;
typedef TestBaseWithParam<NormalizeParams> NormalizeFixture;
@@ -995,7 +995,7 @@ OCL_PERF_TEST_P(NormalizeFixture, Normalize,
OCL_TEST_CYCLE() cv::normalize(src, dst, 10, 110, mode);
SANITY_CHECK(dst, 5e-2);
SANITY_CHECK_NOTHING();
}
OCL_PERF_TEST_P(NormalizeFixture, NormalizeWithMask,
@@ -1013,7 +1013,7 @@ OCL_PERF_TEST_P(NormalizeFixture, NormalizeWithMask,
OCL_TEST_CYCLE() cv::normalize(src, dst, 10, 110, mode, -1, mask);
SANITY_CHECK(dst, 5e-2);
SANITY_CHECK_NOTHING();
}
///////////// ConvertScaleAbs ////////////////////////
@@ -1232,7 +1232,7 @@ OCL_PERF_TEST_P(PSNRFixture, PSNR,
///////////// Reduce ////////////////////////
CV_ENUM(ReduceMinMaxOp, CV_REDUCE_MIN, CV_REDUCE_MAX)
CV_ENUM(ReduceMinMaxOp, REDUCE_MIN, REDUCE_MAX)
typedef tuple<Size, std::pair<MatType, MatType>, int, ReduceMinMaxOp> ReduceMinMaxParams;
typedef TestBaseWithParam<ReduceMinMaxParams> ReduceMinMaxFixture;
@@ -1250,7 +1250,6 @@ OCL_PERF_TEST_P(ReduceMinMaxFixture, Reduce,
dim = get<2>(params), op = get<3>(params);
const Size srcSize = get<0>(params),
dstSize(dim == 0 ? srcSize.width : 1, dim == 0 ? 1 : srcSize.height);
const double eps = CV_MAT_DEPTH(dtype) <= CV_32S ? 1 : 1e-5;
checkDeviceMaxMemoryAllocSize(srcSize, stype);
checkDeviceMaxMemoryAllocSize(srcSize, dtype);
@@ -1260,7 +1259,7 @@ OCL_PERF_TEST_P(ReduceMinMaxFixture, Reduce,
OCL_TEST_CYCLE() cv::reduce(src, dst, dim, op, dtype);
SANITY_CHECK(dst, eps);
SANITY_CHECK_NOTHING();
}
CV_ENUM(ReduceAccOp, REDUCE_SUM, REDUCE_AVG, REDUCE_SUM2)