nareshmlx/opencv-pr huggingface dataset:
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
I understand here that half of the axis can be iterated. In the end we are swapping the content of two pieces of memory for in-place operations, hence we need a container to keep one of those for swapping, right? So my question here is what is the container for a piece of memory? Another piece of memory? I do agree that we can improve it in future pr. Let me tag it.
**File:** modules/dnn/src/layers/slice_layer.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -84,6 +84,34 @@ Range normalizeRange(const Range& input_range, int n)
     return range;
 }
 
+// TODO: support cv::Range with steps and negative steps to get rid of this transformation
+void tranformForNegSteps(const MatShape& inpShape, std::vector<std::vector<Range> >& sliceRanges, std::vector<std::vector<int> >& sliceSteps)
+{
+    // in case of negative steps,
+    // x of shape [5, 10], x[5:0:-1, 10:1:-3] <=> np.flip(x[1:5:1, 2:10:3], aixs=(0, 1))
+    // new_end_i = start_i + 1 > dim_i ? dim_i : start_i + 1
```

Review comment:
Done with putting those in a function. > The code is diverging already: here you didn't negate the condition. I don't quite understand here. As `i` keeps incrementing itself, why the code can go diverging?
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
std::swap_ranges of bytes is fine, I think, why do we need extra memory?
**File:** modules/dnn/src/layers/slice_layer.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -84,6 +84,34 @@ Range normalizeRange(const Range& input_range, int n)
     return range;
 }
 
+// TODO: support cv::Range with steps and negative steps to get rid of this transformation
+void tranformForNegSteps(const MatShape& inpShape, std::vector<std::vector<Range> >& sliceRanges, std::vector<std::vector<int> >& sliceSteps)
+{
+    // in case of negative steps,
+    // x of shape [5, 10], x[5:0:-1, 10:1:-3] <=> np.flip(x[1:5:1, 2:10:3], aixs=(0, 1))
+    // new_end_i = start_i + 1 > dim_i ? dim_i : start_i + 1
```

Review comment:
Copypasted code was not in sync already.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
CV_Assert_N is deprecated due to unclear error messages. No functions have such restriction. `.getMat()` is able to handle any compatible types.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
dst step is not handled and not checked.
**File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 2269

**Code Changes:**
```diff
+}
+
+INSTANTIATE_TEST_CASE_P(Arithm, FlipND, testing::Combine(
+    testing::Values(std::vector<int>{5, 10}, std::vector<int>{2, 3, 4}),
+    testing::Values(perf::MatType(CV_8UC1), CV_32FC1)
+));
 
 TEST(Core_minMaxIdx, regression_9207_2)
 {
```

Review comment:
ROI handing of src/dst/src+dst should be added.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Which values of `axis` do we want to support? Check looks very weak (invalid usage is just ignored in "some way").
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Do you mean I should check whether dst steps are the same with src steps?
**File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 2269

**Code Changes:**
```diff
+}
+
+INSTANTIATE_TEST_CASE_P(Arithm, FlipND, testing::Combine(
+    testing::Values(std::vector<int>{5, 10}, std::vector<int>{2, 3, 4}),
+    testing::Values(perf::MatType(CV_8UC1), CV_32FC1)
+));
 
 TEST(Core_minMaxIdx, regression_9207_2)
 {
```

Review comment:
I don't quite understand what ROI handling is here. Examples?
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Basically, I want to support -ndim < axis < ndim. Looks like ```cpp int axis = (_axis + ndim) % ndim; ``` violates the rule since it allows axis = axis + ndim. Do you mean this? **Update:** Adjusted in the latest commit.
**File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 2269

**Code Changes:**
```diff
+}
+
+INSTANTIATE_TEST_CASE_P(Arithm, FlipND, testing::Combine(
+    testing::Values(std::vector<int>{5, 10}, std::vector<int>{2, 3, 4}),
+    testing::Values(perf::MatType(CV_8UC1), CV_32FC1)
+));
 
 TEST(Core_minMaxIdx, regression_9207_2)
 {
```

Review comment:
Take a look on `OCL_TEST_P(Transpose, Mat)` test design (input data generation).
**File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 2269

**Code Changes:**
```diff
+}
+
+INSTANTIATE_TEST_CASE_P(Arithm, FlipND, testing::Combine(
+    testing::Values(std::vector<int>{5, 10}, std::vector<int>{2, 3, 4}),
+    testing::Values(perf::MatType(CV_8UC1), CV_32FC1)
+));
 
 TEST(Core_minMaxIdx, regression_9207_2)
 {
```

Review comment:
So if I understand correctly, case of non continuous input mat should be tested. Correct me if I am wrong.
**File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 2269

**Code Changes:**
```diff
+}
+
+INSTANTIATE_TEST_CASE_P(Arithm, FlipND, testing::Combine(
+    testing::Values(std::vector<int>{5, 10}, std::vector<int>{2, 3, 4}),
+    testing::Values(perf::MatType(CV_8UC1), CV_32FC1)
+));
 
 TEST(Core_minMaxIdx, regression_9207_2)
 {
```

Review comment:
Right. ROI means `region of interest` - it is a sub-matrix from larger matrix. However, for ND case this may be not really useful. In 2D case we have `flip()`. Anyway, we still need to provide checks for that (contiguous data assumption) in the source code of implementation.
**File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 2269

**Code Changes:**
```diff
+}
+
+INSTANTIATE_TEST_CASE_P(Arithm, FlipND, testing::Combine(
+    testing::Values(std::vector<int>{5, 10}, std::vector<int>{2, 3, 4}),
+    testing::Values(perf::MatType(CV_8UC1), CV_32FC1)
+));
 
 TEST(Core_minMaxIdx, regression_9207_2)
 {
```

Review comment:
> Anyway, we still need to provide checks for that (contiguous data assumption) in the source code of implementation. I don't think the implementation assumes that data is contiguous.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Perhaps there is no such method. We could do simple check overlap between `.data` / `.dataend` here (it is not fully accurate, e.g. for 1d cases)
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
I think we should just check if `.data`s are equal (if it's the start of the allocation, might be `.datastart` instead). It's not ideal for roi-to-roi in the same matrix without overlaps, but I'm not sure there is a platform-independent solution to check if memory regions overlap(without UB).
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Ideally speaking, we should check ROI overlaps but who would do that intentionally? Such operations do not make sense. Or if we are talking about unintentionally mis-operation, it is what it is as long as it does not trigger crashing.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Generally I agree, but in this case it doesn't cost us anything to change ptr() to datastart.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
I refactor the implementation with std::swap_ranges. Could you review it?
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
I re-implemented with dst in-place flip and also ensuring both src and dst are continuous. In this case, I suppose we can skip checking whether steps are equal, can't we?
**File:** modules/core/test/test_arithm.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 2269

**Code Changes:**
```diff
+}
+
+INSTANTIATE_TEST_CASE_P(Arithm, FlipND, testing::Combine(
+    testing::Values(std::vector<int>{5, 10}, std::vector<int>{2, 3, 4}),
+    testing::Values(perf::MatType(CV_8UC1), CV_32FC1)
+));
 
 TEST(Core_minMaxIdx, regression_9207_2)
 {
```

Review comment:
Do we still need checks for ROI handling since in the latest impl src and dst are assumed to be continuous?
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Isn't +1 redundant? In case of shape [A, 3, B]: (3+1)/2=2, but we need only 1 swap.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 852

**Code Changes:**
```diff
+    // in-place flip
+    _src.copyTo(_dst);
+
+    // return the src if it has only one element on the flip axis
+    const auto shape = src.size.p;
+    if (shape[axis] == 1)
+        return ;
+
+    // call impl
+    Mat dst = _dst.getMat();
+    flipNDImpl(dst.ptr(), dst.size.p, dst.step.p, axis);
```

Review comment:
We don't need this special case, I think.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
I believe we can lift that restriction.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
You are right. +1 is removed in the latest commit.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 852

**Code Changes:**
```diff
+    // in-place flip
+    _src.copyTo(_dst);
+
+    // return the src if it has only one element on the flip axis
+    const auto shape = src.size.p;
+    if (shape[axis] == 1)
+        return ;
+
+    // call impl
+    Mat dst = _dst.getMat();
+    flipNDImpl(dst.ptr(), dst.size.p, dst.step.p, axis);
```

Review comment:
It serves like an early stop to improve efficiency, doesn't it?
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
I think so. I also lifted the restriction for dst since it will be covered by calling `src.copyTo(dst)` and be continuous in the end.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND
**Review Line:** 852

**Code Changes:**
```diff
+    // in-place flip
+    _src.copyTo(_dst);
+
+    // return the src if it has only one element on the flip axis
+    const auto shape = src.size.p;
+    if (shape[axis] == 1)
+        return ;
+
+    // call impl
+    Mat dst = _dst.getMat();
+    flipNDImpl(dst.ptr(), dst.size.p, dst.step.p, axis);
```

Review comment:
> I think copying is much slower than calling a function function itself is heavier than simple copying. --- There is no problem with that part. Refer to `convertTo()` implementation.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
Python's slice index range is `[-dim; dim)` ``` >>> a = [1,2,3] >>> a[0] 1 >>> a[-3] 1 >>> a[3] Traceback (most recent call last): File "<stdin>", line 1, in <module> IndexError: list index out of range ``` Check is not correct if we want to align with that.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
> `src.copyTo(dst);` If we do that, then `.create()` call is not needed at all and it should be replaced by `.copyTo()` call.
**File:** modules/core/src/matrix_transform.cpp
**Change Type:** modified
**Context:** PR #22898: dnn: support ONNX Slice with negative steps by adding and using cv::flipND

**Code Changes:**
```diff
@@ -6,6 +6,8 @@
 #include "opencl_kernels_core.hpp"
 #include "opencv2/core/detail/dispatch_helper.impl.hpp"
 
+#include <algorithm> // std::swap_ranges
+
 namespace cv {
 
 ////////////////////////////////////// transpose /////////////////////////////////////////
@@ -812,6 +814,49 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode )
```

Review comment:
OK, replaced with `_src.copyTo(_dst)`.
**File:** modules/calib3d/include/opencv2/calib3d.hpp
**Change Type:** modified
**Context:** PR #23078: Update USAC

**Code Changes:**
```diff
@@ -548,12 +548,13 @@ enum RobotWorldHandEyeCalibrationMethod
     CALIB_ROBOT_WORLD_HAND_EYE_LI   = 1  //!< Simultaneous robot-world and hand-eye calibration using dual-quaternions and kronecker product @cite Li2010SimultaneousRA
 };
 
-enum SamplingMethod { SAMPLING_UNIFORM, SAMPLING_PROGRESSIVE_NAPSAC, SAMPLING_NAPSAC,
-        SAMPLING_PROSAC };
-enum LocalOptimMethod {LOCAL_OPTIM_NULL, LOCAL_OPTIM_INNER_LO, LOCAL_OPTIM_INNER_AND_ITER_LO,
-        LOCAL_OPTIM_GC, LOCAL_OPTIM_SIGMA};
-enum ScoreMethod {SCORE_METHOD_RANSAC, SCORE_METHOD_MSAC, SCORE_METHOD_MAGSAC, SCORE_METHOD_LMEDS};
-enum NeighborSearchMethod { NEIGH_FLANN_KNN, NEIGH_GRID, NEIGH_FLANN_RADIUS };
```

Review comment:
Please use capital letters for naming as for other enums, Also, please define values for enum items. It's required for Python bindings.
**File:** modules/calib3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #23078: Update USAC

**Code Changes:**
```diff
@@ -6,10 +6,11 @@
 #define OPENCV_USAC_USAC_HPP
 
 namespace cv { namespace usac {
-enum EstimationMethod { Homography, Fundamental, Fundamental8, Essential, Affine, P3P, P6P};
-enum VerificationMethod { NullVerifier, SprtVerifier };
-enum PolishingMethod { NonePolisher, LSQPolisher };
-enum ErrorMetric {DIST_TO_LINE, SAMPSON_ERR, SGD_ERR, SYMM_REPR_ERR, FORW_REPR_ERR, RERPOJ};
+enum EstimationMethod { HOMOGRAPHY=0, FUNDAMENTAL=1, FUNDAMENTAL8=2, ESSENTIAL=3, AFFINE=4, P3P=5, P6P=6};
+enum VerificationMethod { NULL_VERIFIER=0, SPRT_VERIFIER=1, ASPRT=2 };
```

Review comment:
The same for constants naming.