nareshmlx/opencv-pr huggingface dataset:
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x

**Code Changes:**
```diff
@@ -6,46 +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};
-
-
```

Review comment:
Values are missed.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x

**Code Changes:**
```diff
@@ -6,46 +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};
-
-
```

Review comment:
It's new method not implemented in 4.x.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x

**Code Changes:**
```diff
@@ -6,46 +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};
-
-
```

Review comment:
Please move it to line 61 to reduce merge conflicts between 4.x and 5.x.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 419

**Code Changes:**
```diff
@@ -424,7 +416,7 @@ class Estimator : public Algorithm{
     virtual int getMaxNumSolutions () const = 0;
     // return maximum number of possible solutions of non-minimal estimation.
     virtual int getMaxNumSolutionsNonMinimal () const = 0;
-    virtual Ptr<Estimator> clone() const = 0;
+    virtual void enforceRankConstraint (bool enforce) = 0;
 };
 
 class HomographyEstimator : public Estimator {
@@ -457,38 +449,18 @@ class PnPEstimator : public Estimator {
             const Ptr<NonMinimalSolver> &non_min_solver_);
```

Review comment:
EssentialEstimator changes are missing.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 524

**Code Changes:**
```diff
@@ -549,6 +520,7 @@ class NeighborhoodGraph : public Algorithm {
     virtual ~NeighborhoodGraph() override = default;
     // Return neighbors of the point with index @point_idx_ in the graph.
     virtual const std::vector<int> &getNeighbors(int point_idx_) const = 0;
+    virtual const std::vector<std::vector<int>> &getGraph () const = 0;
 };
 
 class RadiusSearchNeighborhoodGraph : public NeighborhoodGraph {
@@ -612,60 +584,74 @@ class ProgressiveNapsac : public Sampler {
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
```

Review comment:
GridNeighborhoodGraph2Images class is missing. Is it useful in 4.x?
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 524

**Code Changes:**
```diff
@@ -549,6 +520,7 @@ class NeighborhoodGraph : public Algorithm {
     virtual ~NeighborhoodGraph() override = default;
     // Return neighbors of the point with index @point_idx_ in the graph.
     virtual const std::vector<int> &getNeighbors(int point_idx_) const = 0;
+    virtual const std::vector<std::vector<int>> &getGraph () const = 0;
 };
 
 class RadiusSearchNeighborhoodGraph : public NeighborhoodGraph {
@@ -612,60 +584,74 @@ class ProgressiveNapsac : public Sampler {
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
```

Review comment:
QuasiUniformSampler class is missing.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 1132

**Code Changes:**
```diff
+    bool parallel;
+
+    Matx33d T1, T2;
+    Mat points, K1, K2, calib_points, image_points, norm_points, filtered_points;
+    Ptr<NeighborhoodGraph> graph;
+    std::vector<Ptr<NeighborhoodGraph>> layers;
+public:
+
+    UniversalRANSAC (const Ptr<const UsacConfig> &config_, int points_size_, Ptr<Estimator> &estimator_, const Ptr<Quality> &quality_,
+                     const Ptr<Sampler> &sampler_, const Ptr<Termination> &termination_criteria_,
+                     const Ptr<ModelVerifier> &model_verifier_, const Ptr<Degeneracy> &degeneracy_,
```

Review comment:
It's new, not present in 4.x.
**File:** modules/3d/src/usac/dls_solver.cpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 69

**Code Changes:**
```diff
-        {}
+
     // return minimal sample size required for non-minimal estimation.
     int getMinimumRequiredSampleSize() const override { return 3; }
     // return maximum number of possible solutions.
     int getMaxNumberOfSolutions () const override { return 27; }
-    Ptr<NonMinimalSolver> clone () const override {
-        return makePtr<DLSPnPImpl>(*points_mat, *calib_norm_points_mat, *K_mat);
-    }
 #if defined(HAVE_LAPACK) || defined(HAVE_EIGEN)
     int estimate(const std::vector<int> &sample, int sample_number,
```

Review comment:
Not modified in 4.x
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 99

**Code Changes:**
```diff
+    static Ptr<HomographyMinimalSolver4pts> create(const Mat &points, bool use_ge);
+};
+class PnPSVDSolver : public MinimalSolver {
 public:
-    static Ptr<HomographyMinimalSolver4ptsGEM> create(const Mat &points_);
+    static Ptr<PnPSVDSolver> create (const Mat &points);
 };
 
 //-------------------------- FUNDAMENTAL MATRIX -----------------------
 class FundamentalMinimalSolver7pts : public MinimalSolver {
 public:
```

Review comment:
there is PnPSVDSolver in 4.x, it's just on another line: https://github.com/opencv/opencv/blob/4.x/modules/calib3d/src/usac.hpp#L97
**File:** modules/3d/src/usac/dls_solver.cpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 69

**Code Changes:**
```diff
-        {}
+
     // return minimal sample size required for non-minimal estimation.
     int getMinimumRequiredSampleSize() const override { return 3; }
     // return maximum number of possible solutions.
     int getMaxNumberOfSolutions () const override { return 27; }
-    Ptr<NonMinimalSolver> clone () const override {
-        return makePtr<DLSPnPImpl>(*points_mat, *calib_norm_points_mat, *K_mat);
-    }
 #if defined(HAVE_LAPACK) || defined(HAVE_EIGEN)
     int estimate(const std::vector<int> &sample, int sample_number,
```

Review comment:
are you sure? In 4.x. there's no clone() method either: https://github.com/opencv/opencv/blob/4.x/modules/calib3d/src/usac/dls_solver.cpp#L69
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 1132

**Code Changes:**
```diff
+    bool parallel;
+
+    Matx33d T1, T2;
+    Mat points, K1, K2, calib_points, image_points, norm_points, filtered_points;
+    Ptr<NeighborhoodGraph> graph;
+    std::vector<Ptr<NeighborhoodGraph>> layers;
+public:
+
+    UniversalRANSAC (const Ptr<const UsacConfig> &config_, int points_size_, Ptr<Estimator> &estimator_, const Ptr<Quality> &quality_,
+                     const Ptr<Sampler> &sampler_, const Ptr<Termination> &termination_criteria_,
+                     const Ptr<ModelVerifier> &model_verifier_, const Ptr<Degeneracy> &degeneracy_,
```

Review comment:
Yes, but the problem is that in 5.x those parameters are in usac.hpp, and they are used in other files, so I had to add more parameters in the end: https://github.com/opencv/opencv/blob/5.x/modules/3d/src/usac.hpp#L926
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 524

**Code Changes:**
```diff
@@ -549,6 +520,7 @@ class NeighborhoodGraph : public Algorithm {
     virtual ~NeighborhoodGraph() override = default;
     // Return neighbors of the point with index @point_idx_ in the graph.
     virtual const std::vector<int> &getNeighbors(int point_idx_) const = 0;
+    virtual const std::vector<std::vector<int>> &getGraph () const = 0;
 };
 
 class RadiusSearchNeighborhoodGraph : public NeighborhoodGraph {
@@ -612,60 +584,74 @@ class ProgressiveNapsac : public Sampler {
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
```

Review comment:
It is not used, I forgot to remove it in 4.x in usac.hpp
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x

**Code Changes:**
```diff
@@ -6,46 +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};
-
-
```

Review comment:
Yes, I had to added it to be consistent with 5.x
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 99

**Code Changes:**
```diff
+    static Ptr<HomographyMinimalSolver4pts> create(const Mat &points, bool use_ge);
+};
+class PnPSVDSolver : public MinimalSolver {
 public:
-    static Ptr<HomographyMinimalSolver4ptsGEM> create(const Mat &points_);
+    static Ptr<PnPSVDSolver> create (const Mat &points);
 };
 
 //-------------------------- FUNDAMENTAL MATRIX -----------------------
 class FundamentalMinimalSolver7pts : public MinimalSolver {
 public:
```

Review comment:
Please use the same file structure and not swap classes to reduce merge conflicts.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 524

**Code Changes:**
```diff
@@ -549,6 +520,7 @@ class NeighborhoodGraph : public Algorithm {
     virtual ~NeighborhoodGraph() override = default;
     // Return neighbors of the point with index @point_idx_ in the graph.
     virtual const std::vector<int> &getNeighbors(int point_idx_) const = 0;
+    virtual const std::vector<std::vector<int>> &getGraph () const = 0;
 };
 
 class RadiusSearchNeighborhoodGraph : public NeighborhoodGraph {
@@ -612,60 +584,74 @@ class ProgressiveNapsac : public Sampler {
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
```

Review comment:
Please create PR to 4.x then and mention it in the description.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 99

**Code Changes:**
```diff
+    static Ptr<HomographyMinimalSolver4pts> create(const Mat &points, bool use_ge);
+};
+class PnPSVDSolver : public MinimalSolver {
 public:
-    static Ptr<HomographyMinimalSolver4ptsGEM> create(const Mat &points_);
+    static Ptr<PnPSVDSolver> create (const Mat &points);
 };
 
 //-------------------------- FUNDAMENTAL MATRIX -----------------------
 class FundamentalMinimalSolver7pts : public MinimalSolver {
 public:
```

Review comment:
fixed this by moving all new stuff created in 5.x to the end of the file.
**File:** modules/3d/src/usac.hpp
**Change Type:** modified
**Context:** PR #24005: Merge usac to 5.x
**Review Line:** 524

**Code Changes:**
```diff
@@ -549,6 +520,7 @@ class NeighborhoodGraph : public Algorithm {
     virtual ~NeighborhoodGraph() override = default;
     // Return neighbors of the point with index @point_idx_ in the graph.
     virtual const std::vector<int> &getNeighbors(int point_idx_) const = 0;
+    virtual const std::vector<std::vector<int>> &getGraph () const = 0;
 };
 
 class RadiusSearchNeighborhoodGraph : public NeighborhoodGraph {
@@ -612,60 +584,74 @@ class ProgressiveNapsac : public Sampler {
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
```

Review comment:
No, I created pull-request that removes unused features, see #24047
**File:** modules/python/src2/typing_stubs_generation/api_refinement.py
**Change Type:** modified
**Context:** PR #24066: Python typing refinement for dnn_registerLayer/dnn_unregisterLayer functions

**Code Changes:**
```diff
@@ -7,15 +7,18 @@
 from .nodes import (NamespaceNode, FunctionNode, OptionalTypeNode, TypeNode,
                     ClassProperty, PrimitiveTypeNode, ASTNodeTypeNode,
                     AggregatedTypeNode, CallableTypeNode, AnyTypeNode,
-                    TupleTypeNode, UnionTypeNode)
+                    TupleTypeNode, UnionTypeNode, ProtocolClassNode,
+                    DictTypeNode, ClassTypeNode)
 from .ast_utils import (find_function_node, SymbolName,
                         for_each_function_overload)
+from .types_conversion import create_type_node
```

Review comment:
Expected type is list of lists. Should different typing be used in this way? https://github.com/opencv/opencv/blob/5c090b9eec0cfe624fb9c3d11e18d9d1b4ff0ead/samples/dnn/edge_detection.py#L35
**File:** modules/python/src2/typing_stubs_generation/api_refinement.py
**Change Type:** modified
**Context:** PR #24066: Python typing refinement for dnn_registerLayer/dnn_unregisterLayer functions

**Code Changes:**
```diff
@@ -7,15 +7,18 @@
 from .nodes import (NamespaceNode, FunctionNode, OptionalTypeNode, TypeNode,
                     ClassProperty, PrimitiveTypeNode, ASTNodeTypeNode,
                     AggregatedTypeNode, CallableTypeNode, AnyTypeNode,
-                    TupleTypeNode, UnionTypeNode)
+                    TupleTypeNode, UnionTypeNode, ProtocolClassNode,
+                    DictTypeNode, ClassTypeNode)
 from .ast_utils import (find_function_node, SymbolName,
                         for_each_function_overload)
+from .types_conversion import create_type_node
```

Review comment:
inputs also list of lists
**File:** modules/3d/test/test_pointcloud.cpp
**Change Type:** modified
**Context:** PR #23805: GSoC: Modified PLY reader to support color attribute read/write
**Review Line:** 122

**Code Changes:**
```diff
-    cv::loadPointCloud(new_path, points_gold, normals_gold);
+    cv::loadPointCloud(new_path, points_gold, normals_gold, rgb_gold);
 
     EXPECT_EQ(normals_gold, normals);
     EXPECT_EQ(points_gold, points);
+    EXPECT_EQ(rgb_gold, rgb);
     std::remove(new_path.c_str());
 }
 
```

Review comment:
The written file does not contain color information. So the test is useless in current version. Please modify exising ply or add yet another one with color information (different colors).
**File:** modules/3d/src/pointcloud/io_ply.cpp
**Change Type:** modified
**Context:** PR #23805: GSoC: Modified PLY reader to support color attribute read/write

**Code Changes:**
```diff
@@ -11,16 +11,17 @@
 
 namespace cv {
 
-void PlyDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<std::vector<int32_t>> &indices)
+void PlyDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<Point3_<uchar>> &rgb, std::vector<std::vector<int32_t>> &indices)
 {
     points.clear();
     normals.clear();
+    rgb.clear();
```

Review comment:
Coordinates and normals are expected to be floats. Color information is expected to be uchar. Please fix the condition.
**File:** modules/3d/src/pointcloud/io_obj.cpp
**Change Type:** modified
**Context:** PR #23805: GSoC: Modified PLY reader to support color attribute read/write

**Code Changes:**
```diff
@@ -12,10 +12,11 @@ namespace cv {
 
 std::unordered_set<std::string> ObjDecoder::m_unsupportedKeys;
 
-void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<std::vector<int32_t>> &indices)
+void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<Point3_<uchar>> &rgb, std::vector<std::vector<int32_t>> &indices)
 {
     points.clear();
     normals.clear();
+    rgb.clear();
```

Review comment:
It's very easy to add color information to OBJ format too. I propose to do it in this PR. See https://en.wikipedia.org/wiki/Wavefront_.obj_file
**File:** modules/3d/src/pointcloud/io_obj.cpp
**Change Type:** modified
**Context:** PR #23805: GSoC: Modified PLY reader to support color attribute read/write

**Code Changes:**
```diff
@@ -12,10 +12,11 @@ namespace cv {
 
 std::unordered_set<std::string> ObjDecoder::m_unsupportedKeys;
 
-void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<std::vector<int32_t>> &indices)
+void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<Point3_<uchar>> &rgb, std::vector<std::vector<int32_t>> &indices)
 {
     points.clear();
     normals.clear();
+    rgb.clear();
```

Review comment:
Hi asmorkalov, sorry for the late reply. I'm a bit confused because for .obj files, there doesn't seem to be a clear command for color information. The OBJ files are usually defined by polygon faces (which themselves are defined by vertexes, or points) and normals, curves, texture maps, and surfaces. So I'm wondering if it is still necessary to add color read/write for .obj files.
**File:** modules/3d/src/pointcloud/io_obj.cpp
**Change Type:** modified
**Context:** PR #23805: GSoC: Modified PLY reader to support color attribute read/write

**Code Changes:**
```diff
@@ -12,10 +12,11 @@ namespace cv {
 
 std::unordered_set<std::string> ObjDecoder::m_unsupportedKeys;
 
-void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<std::vector<int32_t>> &indices)
+void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<Point3_<uchar>> &rgb, std::vector<std::vector<int32_t>> &indices)
 {
     points.clear();
     normals.clear();
+    rgb.clear();
```

Review comment:
Wkipedia is not 100% source of truth for the case, but it defines the following: > A [vertex](https://en.wikipedia.org/wiki/Vertex_(geometry)) is specified via a line starting with the letter v. That is followed by (x,y,z[,w]) coordinates. W is optional and defaults to 1.0. A right-hand coordinate system is used to specify the coordinate locations. Some applications support vertex colors, by putting red, green and blue values after x y and z (this precludes specifying w). The color values range from 0 to 1.[[2]](https://en.wikipedia.org/wiki/Wavefront_.obj_file#cite_note-2) I think it's not a problem to treat the last 3 values as colors, if pixel value contains 6 or 7 elements. I propose it to have more-or-less similar support level for PLY and OBJ, if it's possible.
**File:** modules/3d/src/pointcloud/io_obj.cpp
**Change Type:** modified
**Context:** PR #23805: GSoC: Modified PLY reader to support color attribute read/write

**Code Changes:**
```diff
@@ -12,10 +12,11 @@ namespace cv {
 
 std::unordered_set<std::string> ObjDecoder::m_unsupportedKeys;
 
-void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<std::vector<int32_t>> &indices)
+void ObjDecoder::readData(std::vector<Point3f> &points, std::vector<Point3f> &normals, std::vector<Point3_<uchar>> &rgb, std::vector<std::vector<int32_t>> &indices)
 {
     points.clear();
     normals.clear();
+    rgb.clear();
```

Review comment:
Obj coordinates are x, y, z, [w]. `ss.rdbuf()->in_avail()` may report the last optional w. Also we could have x, y, z, w, r, g, b. W should be handled correctly.
**File:** modules/core/src/channels.cpp
**Change Type:** modified
**Context:** PR #24032: Fix undefined behavior with wrong function pointers called.

**Code Changes:**
```diff
@@ -46,44 +46,44 @@ mixChannels_( const T** src, const int* sdelta,
 }
 
 
-static void mixChannels8u( const uchar** src, const int* sdelta,
-                           uchar** dst, const int* ddelta,
+static void mixChannels8u( const void** src, const int* sdelta,
+                           void** dst, const int* ddelta,
                            int len, int npairs )
 {
```

Review comment:
It is better to use `void**` as buffer type is not specified in the interface (implementation-defined).
**File:** modules/imgproc/src/drawing.cpp
**Change Type:** modified
**Context:** PR #23931: Fixed possible out-of-bound access in circles drawing
**Review Line:** 1582

**Code Changes:**
```diff
@@ -1579,7 +1579,7 @@ Circle( Mat& img, Point center, int radius, const void* color, int fill )
                     ICV_HLINE( tptr, x11, x12, color, pix_size );
             }
 
-            if( (unsigned)y12 < (unsigned)size.height )
+            if( y12 >= 0 && y12 < size.height )
             {
                 uchar *tptr = ptr + y12 * step;
 
@@ -1602,7 +1602,7 @@ Circle( Mat& img, Point center, int radius, const void* color, int fill )
                     x22 = MIN( x22, size.width - 1 );
```

Review comment:
Though standard C++ promotion happens, y12 and size.height have different types so the compiler might complain. Casting to (int64_t) will it should be fine with our CI.
**File:** modules/imgproc/src/drawing.cpp
**Change Type:** modified
**Context:** PR #23931: Fixed possible out-of-bound access in circles drawing
**Review Line:** 1582

**Code Changes:**
```diff
@@ -1579,7 +1579,7 @@ Circle( Mat& img, Point center, int radius, const void* color, int fill )
                     ICV_HLINE( tptr, x11, x12, color, pix_size );
             }
 
-            if( (unsigned)y12 < (unsigned)size.height )
+            if( y12 >= 0 && y12 < size.height )
             {
                 uchar *tptr = ptr + y12 * step;
 
@@ -1602,7 +1602,7 @@ Circle( Mat& img, Point center, int radius, const void* color, int fill )
                     x22 = MIN( x22, size.width - 1 );
```

Review comment:
it compares "int64_t < int" Both has sign and the comparison is always possible. I do not see any issues with the existing solution.
**File:** modules/imgproc/test/test_drawing.cpp
**Change Type:** modified
**Context:** PR #23931: Fixed possible out-of-bound access in circles drawing

**Code Changes:**
```diff
@@ -913,4 +913,12 @@ INSTANTIATE_TEST_CASE_P(
     )
 );
 
+TEST(Drawing, circle_overflow)
+{
+    applyTestTag(CV_TEST_TAG_VERYLONG);
+    cv::Mat1b matrix = cv::Mat1b::zeros(600, 600);
+    cv::Scalar kBlue = cv::Scalar(0, 0, 255);
+    cv::circle(matrix, cv::Point(275, -2147483318), 2147483647, kBlue, 1, 8, 0);
```

Review comment:
Why `DISABLED_`?
**File:** modules/imgproc/test/test_drawing.cpp
**Change Type:** modified
**Context:** PR #23931: Fixed possible out-of-bound access in circles drawing

**Code Changes:**
```diff
@@ -913,4 +913,12 @@ INSTANTIATE_TEST_CASE_P(
     )
 );
 
+TEST(Drawing, circle_overflow)
+{
+    applyTestTag(CV_TEST_TAG_VERYLONG);
+    cv::Mat1b matrix = cv::Mat1b::zeros(600, 600);
+    cv::Scalar kBlue = cv::Scalar(0, 0, 255);
+    cv::circle(matrix, cv::Point(275, -2147483318), 2147483647, kBlue, 1, 8, 0);
```

Review comment:
It takes significant time. I decided to disable it by default. Should I return int back?
**File:** modules/imgproc/test/test_drawing.cpp
**Change Type:** modified
**Context:** PR #23931: Fixed possible out-of-bound access in circles drawing

**Code Changes:**
```diff
@@ -913,4 +913,12 @@ INSTANTIATE_TEST_CASE_P(
     )
 );
 
+TEST(Drawing, circle_overflow)
+{
+    applyTestTag(CV_TEST_TAG_VERYLONG);
+    cv::Mat1b matrix = cv::Mat1b::zeros(600, 600);
+    cv::Scalar kBlue = cv::Scalar(0, 0, 255);
+    cv::circle(matrix, cv::Point(275, -2147483318), 2147483647, kBlue, 1, 8, 0);
```

Review comment:
`applyTestTag(CV_TEST_TAG_VERYLONG);` or at least add comment.