nareshmlx/opencv-pr huggingface dataset:
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...
**Review Line:** 413

**Code Changes:**
```diff
 
+        virtual void getTypes(const std::vector<MatType>& inputs,
+                              const int requiredOutputs,
+                              const int requiredInternals,
+                              std::vector<MatType>&outputs,
+                              std::vector<MatType>&internals) const;
+
         virtual int64 getFLOPS(const std::vector<MatShape> &inputs,
                                const std::vector<MatShape> &outputs) const {CV_UNUSED(inputs); CV_UNUSED(outputs); return 0;}
 
@@ -675,56 +690,67 @@ CV__DNN_INLINE_NS_BEGIN
```

Review comment:
I think it is out of scope of this pull request. I added the new type inference pipeline similar to existing shape inference pipeline because this way produces less architecture changes. I think it will be better to make another pull request with public API modifications.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...
**Review Line:** 2167

**Code Changes:**
```diff
@@ -2167,7 +2164,7 @@ TEST_P(Test_ONNX_nets, Alexnet)
     expectNoFallbacksFromIE(net);
 }
 
-TEST_P(Test_ONNX_nets, RAFT)
+TEST_P(Test_ONNX_nets, DISABLED_RAFT)
 {
     applyTestTag(CV_TEST_TAG_LONG, CV_TEST_TAG_DEBUG_VERYLONG, CV_TEST_TAG_MEMORY_2GB);
 
```

Review comment:
Please create ticket about the issue and add reference to it in comments.
**File:** modules/dnn/src/layer.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...

**Code Changes:**
```diff
@@ -181,20 +181,32 @@ void Layer::forward_fallback(InputArrayOfArrays inputs_arr, OutputArrayOfArrays
 
         inputs.resize(orig_inputs.size());
         for (size_t i = 0; i < orig_inputs.size(); i++)
-            orig_inputs[i].convertTo(inputs[i], CV_32F);
+            if (orig_inputs[i].depth() == CV_16F)
+                orig_inputs[i].convertTo(inputs[i], CV_32F);
+            else
+                inputs[i] = orig_inputs[i];
 
```

Review comment:
Most probably may be reverted.
**File:** modules/dnn/src/layer_internals.hpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...

**Code Changes:**
```diff
@@ -146,14 +146,19 @@ struct DataLayer : public Layer
         CV_OCL_RUN(IS_DNN_OPENCL_TARGET(preferableTarget),
                 forward_ocl(inputs_arr, outputs_arr, internals_arr))
 
-        bool isFP16 = outputs_arr.depth() == CV_16F;
-
         std::vector<Mat> outputs, internals;
         outputs_arr.getMatVector(outputs);
         internals_arr.getMatVector(internals);
 
```

Review comment:
Please use {} for if too.
**File:** modules/dnn/src/legacy_backend.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...

**Code Changes:**
```diff
@@ -90,14 +90,21 @@ Ptr<BackendWrapper> wrapMat(int backendId, int targetId, cv::Mat& m)
         CV_Assert(haveCUDA());
 
 #ifdef HAVE_CUDA
-        switch (targetId)
+        CV_CheckType(m.depth(), m.depth() == CV_32F || m.depth() == CV_32S || m.depth() == CV_64S, "Unsupported type for CUDA");
+        CV_Assert(IS_DNN_CUDA_TARGET(targetId));
+        switch (m.depth())
         {
-        case DNN_TARGET_CUDA:
```

Review comment:
Please CV_Error with message.
**File:** modules/dnn/src/net_impl.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...

**Code Changes:**
```diff
@@ -186,11 +186,6 @@ void Net::Impl::setUpNet(const std::vector<LayerPin>& blobsToKeep_)
 
         clear();
 
-        if (hasDynamicShapes)
-        {
-            updateLayersShapes();
-        }
-
         this->blobsToKeep = blobsToKeep_;
```

Review comment:
Please use {}
**File:** modules/dnn/src/net_impl.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...

**Code Changes:**
```diff
@@ -186,11 +186,6 @@ void Net::Impl::setUpNet(const std::vector<LayerPin>& blobsToKeep_)
 
         clear();
 
-        if (hasDynamicShapes)
-        {
-            updateLayersShapes();
-        }
-
         this->blobsToKeep = blobsToKeep_;
```

Review comment:
Please use `CV_ELEM_SIZE` instead of switch.
**File:** modules/dnn/src/layers/max_unpooling_layer.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...
**Review Line:** 80

**Code Changes:**
```diff
+        std::vector<MatType>& internals) const CV_OVERRIDE
+    {
+        CV_CheckGE(inputs.size(), (size_t)2, "");
+        CV_CheckType(inputs[0], inputs[0] == CV_32F || inputs[0] == CV_16F, "");
+        CV_CheckType(inputs[1], inputs[1] == CV_64S || inputs[1] == CV_32S, "");
+        outputs.assign(1, inputs[0]);
+    }
+
+
     void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE
     {
```

Review comment:
forward_fallback converts data from float16 to float32 and runs the layer. Now max_umpooling_layer supports CV_16F, so it doesn't need forward_fallback
**File:** modules/dnn/src/net_impl.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...
**Review Line:** 193

**Code Changes:**
```diff
@@ -186,11 +186,6 @@ void Net::Impl::setUpNet(const std::vector<LayerPin>& blobsToKeep_)
 
         clear();
 
-        if (hasDynamicShapes)
-        {
-            updateLayersShapes();
-        }
-
         this->blobsToKeep = blobsToKeep_;
 
         allocateLayers(blobsToKeep_);
@@ -475,7 +470,7 @@ void Net::Impl::allocateLayer(int lid, const LayersShapesMap& layersShapes)
         allocateLayer(*i, layersShapes);
 
```

Review comment:
As I understand, this function runs shape inference for the second time for the models with dynamic shapes. I've found out that this is redundant because this line runs before the main shape inference.
**File:** modules/dnn/test/npy_blob.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...

**Code Changes:**
```diff
@@ -80,11 +80,20 @@ Mat blobFromNPY(const std::string& path)
     ifs.read(&header[0], header.size());
 
     // Extract data type.
-    CV_Assert(getType(header) == "<f4");
+    int matType;
+    if (getType(header) == "<f4")
+        matType = CV_32F;
+    else if (getType(header) == "<i4")
+        matType = CV_32S;
```

Review comment:
What 7893 means?
**File:** modules/dnn/src/net_impl_backend.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...

**Code Changes:**
```diff
@@ -62,14 +62,21 @@ Ptr<BackendWrapper> Net::Impl::wrap(Mat& host)
         {
             CV_Assert(haveCUDA());
 #ifdef HAVE_CUDA
-            switch (preferableTarget)
+            CV_CheckType(host.depth(), host.depth() == CV_32F || host.depth() == CV_32S || host.depth() == CV_64S, "Unsupported type for CUDA");
+            CV_Assert(IS_DNN_CUDA_TARGET(preferableTarget));
+            switch (host.depth())
             {
-            case DNN_TARGET_CUDA:
```

Review comment:
What 79874 means?
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #24411: Added int32, int64 support and type inference to dnn - Related PRs: - Contrib: https://github.com/opencv/opencv_contrib/pull/3648 - Extra: ...
**Review Line:** 2167

**Code Changes:**
```diff
@@ -2167,7 +2164,7 @@ TEST_P(Test_ONNX_nets, Alexnet)
     expectNoFallbacksFromIE(net);
 }
 
-TEST_P(Test_ONNX_nets, RAFT)
+TEST_P(Test_ONNX_nets, DISABLED_RAFT)
 {
     applyTestTag(CV_TEST_TAG_LONG, CV_TEST_TAG_DEBUG_VERYLONG, CV_TEST_TAG_MEMORY_2GB);
 
```

Review comment:
https://github.com/opencv/opencv/issues/25102
**File:** 3rdparty/zlib/CMakeLists.txt
**Change Type:** modified
**Context:** PR #25123: zlib upgrade to version 1.3.1
**Review Line:** 24

**Code Changes:**
```diff
@@ -23,9 +23,6 @@ endif()
 #
 if(NOT MSVC)
   check_include_file(unistd.h Z_HAVE_UNISTD_H)
-  if(Z_HAVE_UNISTD_H)
-    add_definitions(-DZ_HAVE_UNISTD_H)
-  endif()
 endif()
```

Review comment:
Why is it removed? We do not need to run useless configuration check which would fail anyway.
**File:** 3rdparty/zlib/CMakeLists.txt
**Change Type:** modified
**Context:** PR #25123: zlib upgrade to version 1.3.1
**Review Line:** 24

**Code Changes:**
```diff
@@ -23,9 +23,6 @@ endif()
 #
 if(NOT MSVC)
   check_include_file(unistd.h Z_HAVE_UNISTD_H)
-  if(Z_HAVE_UNISTD_H)
-    add_definitions(-DZ_HAVE_UNISTD_H)
-  endif()
 endif()
```

Review comment:
you're right, sorry about that, adding it back
**File:** modules/core/src/system.cpp
**Change Type:** modified
**Context:** PR #25149: Partially back-port #25075 to 4.x

**Code Changes:**
```diff
@@ -1377,38 +1377,38 @@ CV_IMPL const char* cvErrorStr( int status )
 
     switch (status)
     {
-    case CV_StsOk :                  return "No Error";
-    case CV_StsBackTrace :           return "Backtrace";
-    case CV_StsError :               return "Unspecified error";
-    case CV_StsInternal :            return "Internal error";
-    case CV_StsNoMem :               return "Insufficient memory";
-    case CV_StsBadArg :              return "Bad argument";
```

Review comment:
I also updated these cases in my PR: https://github.com/opencv/opencv/pull/25075/files#diff-ead16b9c3d66f6835c73aa26ff51ee52bad0870be61b96bb945e2187d4989636R1356-R1363 Though they are not used anywhere it seems.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -326,9 +326,9 @@ static inline int clip(int x, int a, int b)
 *                       General warping (affine, perspective, remap)                     *
 \****************************************************************************************/
 
-template<typename T>
+template<typename T, bool isRelative>
 static void remapNearest( const Mat& _src, Mat& _dst, const Mat& _xy,
-                          int borderType, const Scalar& _borderValue )
+                          int borderType, const Scalar& _borderValue, const Point& _offset )
 {
```

Review comment:
no need to create local variable.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -326,9 +326,9 @@ static inline int clip(int x, int a, int b)
 *                       General warping (affine, perspective, remap)                     *
 \****************************************************************************************/
 
-template<typename T>
+template<typename T, bool isRelative>
 static void remapNearest( const Mat& _src, Mat& _dst, const Mat& _xy,
-                          int borderType, const Scalar& _borderValue )
+                          int borderType, const Scalar& _borderValue, const Point& _offset )
 {
```

Review comment:
no need in local variable
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -326,9 +326,9 @@ static inline int clip(int x, int a, int b)
 *                       General warping (affine, perspective, remap)                     *
 \****************************************************************************************/
 
-template<typename T>
+template<typename T, bool isRelative>
 static void remapNearest( const Mat& _src, Mat& _dst, const Mat& _xy,
-                          int borderType, const Scalar& _borderValue )
+                          int borderType, const Scalar& _borderValue, const Point& _offset )
 {
```

Review comment:
I propose to move `hasRelativeFlag` to `buildOptions` and convert it to macro in context of OpenCL. The flag value become compile time constant and conditions are optimized by compiler like it's done for template. Current solution generates run-time condition everywhere the flag is used as kernel parameter,
**File:** modules/imgproc/test/test_imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)
**Review Line:** 1336

**Code Changes:**
```diff
+
+    cv::Mat mapRelativeX32F(size, CV_32FC1);
+    mapRelativeX32F.setTo(cv::Scalar::all(-0.33));
+
+    cv::Mat mapRelativeY32F(size, CV_32FC1);
+    mapRelativeY32F.setTo(cv::Scalar::all(-0.33));
+
+    cv::Mat mapAbsoluteX32F = mapRelativeX32F.clone();
+    mapAbsoluteX32F.forEach<float>([&](float& pixel, const int* position) {
+        pixel += static_cast<float>(position[1]);
+        });
```

Review comment:
I propose to use different values for x and y to highlight x<->y swaps in code and other related offset issues.
**File:** modules/imgproc/test/test_imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -1311,6 +1311,73 @@ TEST(Imgproc_resize_area, regression_quarter_round)
     check_resize_area<uchar>(expected, actual, 0.5);
 }
 
+typedef tuple<int, int, int, int, bool> RemapRelativeParam;
+typedef testing::TestWithParam<RemapRelativeParam> Imgproc_RemapRelative;
+
+TEST_P(Imgproc_RemapRelative, validity)
+{
+    int srcType = CV_MAKE_TYPE(get<0>(GetParam()), get<1>(GetParam()));
```

Review comment:
Let's use w!=h. It highlights x<->y swaps and related issues. Also 12 is not good size in term of vectorized loops. Tails are not exercised here. I would propose cv::Size(127, 61) or something like this.
**File:** modules/imgproc/test/test_imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -1311,6 +1311,73 @@ TEST(Imgproc_resize_area, regression_quarter_round)
     check_resize_area<uchar>(expected, actual, 0.5);
 }
 
+typedef tuple<int, int, int, int, bool> RemapRelativeParam;
+typedef testing::TestWithParam<RemapRelativeParam> Imgproc_RemapRelative;
+
+TEST_P(Imgproc_RemapRelative, validity)
+{
+    int srcType = CV_MAKE_TYPE(get<0>(GetParam()), get<1>(GetParam()));
```

Review comment:
Bicubic, Lanczos and othe advanced interpolation cases are touched in implementation, but not covered in test.
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -326,9 +326,9 @@ static inline int clip(int x, int a, int b)
 *                       General warping (affine, perspective, remap)                     *
 \****************************************************************************************/
 
-template<typename T>
+template<typename T, bool isRelative>
 static void remapNearest( const Mat& _src, Mat& _dst, const Mat& _xy,
-                          int borderType, const Scalar& _borderValue )
+                          int borderType, const Scalar& _borderValue, const Point& _offset )
 {
```

Review comment:
What about performance ? don't you think that keeping a reference will prevent the compiler from optimizing access to offset.x|y in the inner loops ?
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -326,9 +326,9 @@ static inline int clip(int x, int a, int b)
 *                       General warping (affine, perspective, remap)                     *
 \****************************************************************************************/
 
-template<typename T>
+template<typename T, bool isRelative>
 static void remapNearest( const Mat& _src, Mat& _dst, const Mat& _xy,
-                          int borderType, const Scalar& _borderValue )
+                          int borderType, const Scalar& _borderValue, const Point& _offset )
 {
```

Review comment:
good question. we need performance test for it ;)
**File:** modules/imgproc/src/imgwarp.cpp
**Change Type:** modified
**Context:** PR #24621: first proposal of cv::remap with relative displacement field (#24603)

**Code Changes:**
```diff
@@ -326,9 +326,9 @@ static inline int clip(int x, int a, int b)
 *                       General warping (affine, perspective, remap)                     *
 \****************************************************************************************/
 
-template<typename T>
+template<typename T, bool isRelative>
 static void remapNearest( const Mat& _src, Mat& _dst, const Mat& _xy,
-                          int borderType, const Scalar& _borderValue )
+                          int borderType, const Scalar& _borderValue, const Point& _offset )
 {
```

Review comment:
I ran performance test in the PR and do not see visible effect of additional constant inside implementation. I propose to remove it.
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -2676,112 +2676,156 @@ CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
  * children[7]: origin == (1, 1, 1), size == 1, furthest from child 0
  */
 
-class CV_EXPORTS Octree {
-
+class CV_EXPORTS_W Octree
+{
 public:
-
```

Review comment:
why change API w/o any good reason?
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -2676,112 +2676,156 @@ CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
  * children[7]: origin == (1, 1, 1), size == 1, furthest from child 0
  */
 
-class CV_EXPORTS Octree {
-
+class CV_EXPORTS_W Octree
+{
 public:
-
```

Review comment:
maybe both resolution and maxDepth could be specified or one of them; why remove maxDepth?
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -2676,112 +2676,156 @@ CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
  * children[7]: origin == (1, 1, 1), size == 1, furthest from child 0
  */
 
-class CV_EXPORTS Octree {
-
+class CV_EXPORTS_W Octree
+{
 public:
-
```

Review comment:
Because I think maxDepth should be non-negative, and part of the subsequent code compares maxDepth to unsigned integers, I adopted this approach to avoid potential problems. In addition, I forgot to change the corresponding explanation, which is my negligence.
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -2676,112 +2676,156 @@ CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
  * children[7]: origin == (1, 1, 1), size == 1, furthest from child 0
  */
 
-class CV_EXPORTS Octree {
-
+class CV_EXPORTS_W Octree
+{
 public:
-
```

Review comment:
Perhaps it's reasonable to retain both options. The resolution denotes the size of the leaf node. I opted for resolution as it aligns well with point cloud compression, where preserving information at this precision is sufficient. For the current octree functions, such as KNN search, it might be better to retain both methods. Simultaneously, the two can be calculated from one to the other. What's your opinion?
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -2676,112 +2676,156 @@ CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
  * children[7]: origin == (1, 1, 1), size == 1, furthest from child 0
  */
 
-class CV_EXPORTS Octree {
-
+class CV_EXPORTS_W Octree
+{
 public:
-
```

Review comment:
It's better to have `int` here since, among other reasons, it has better compatibility with our wrapper generators for Python and Java.
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -2676,112 +2676,156 @@ CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
  * children[7]: origin == (1, 1, 1), size == 1, furthest from child 0
  */
 
-class CV_EXPORTS Octree {
-
+class CV_EXPORTS_W Octree
+{
 public:
-
```

Review comment:
Since octree is used not only for point cloud compression, I'd propose you to keep both constructors (resolution and maxDepth)
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -2676,112 +2676,156 @@ CV_EXPORTS_W bool solvePnP( InputArray objectPoints, InputArray imagePoints,
  * children[7]: origin == (1, 1, 1), size == 1, furthest from child 0
  */
 
-class CV_EXPORTS Octree {
-
+class CV_EXPORTS_W Octree
+{
 public:
-
```

Review comment:
Should this method calculate an average color for the point in the same leaf? If not, it should be said explicitly in the docs to the function
**File:** modules/3d/src/octree.cpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -4,32 +4,27 @@
 
 #include "precomp.hpp"
 #include "octree.hpp"
-
-#define OCTREE_CHILD_NUM 8
+#include "opencv2/3d.hpp"
 
 namespace cv{
 
```

Review comment:
Looks like this function always returns true, don't need to return anything at all
**File:** modules/3d/test/test_octree.cpp
**Change Type:** modified
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC

**Code Changes:**
```diff
@@ -14,100 +14,145 @@ class OctreeTest: public testing::Test
     void SetUp() override
     {
         pointCloudSize = 1000;
-        maxDepth = 18;
-
+        resolution = 0.0001;
         int scale;
         Point3i pmin, pmax;
-        scale = 1<<20;
```

Review comment:
If this is so, maybe the points should be sorted by distance first?
**File:** modules/3d/src/pcc.h
**Change Type:** added
**Context:** PR #23985: [GSoC] Update octree methods and create frames for PCC
**Review Line:** 1

**Code Changes:**
```diff
@@ -0,0 +1,94 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Author: Yuhang Wang <yuhangwang0012@gmail.com>
+//         Chengwei Ye <broweigg@gmail.com>
```

Review comment:
Looks like this file belongs to next PR about point cloud compression (probably #24197), should it be here?