nareshmlx/opencv-pr huggingface dataset:
**File:** modules/features2d/src/sift.simd.hpp
**Change Type:** modified
**Context:** PR #20204: Improve SIFT for arm64/Apple silicon

**Code Changes:**
```diff
@@ -450,31 +450,184 @@ class findScaleSpaceExtremaT
             const sift_wt* currptr = img.ptr<sift_wt>(r);
             const sift_wt* prevptr = prev.ptr<sift_wt>(r);
             const sift_wt* nextptr = next.ptr<sift_wt>(r);
+            int c = SIFT_IMG_BORDER;
 
-            for( int c = SIFT_IMG_BORDER; c < cols-SIFT_IMG_BORDER; c++)
+#if CV_SIMD && !(DoG_TYPE_SHORT)
+            const int vecsize = v_float32::nlanes;
+            for( ; c <= cols-SIFT_IMG_BORDER - vecsize; c += vecsize)
```

Review comment:
We previously had it using SIMD but the gains were not really showing as worth it so we constrained it.
**File:** modules/features2d/src/sift.simd.hpp
**Change Type:** modified
**Context:** PR #20204: Improve SIFT for arm64/Apple silicon

**Code Changes:**
```diff
@@ -450,31 +450,184 @@ class findScaleSpaceExtremaT
             const sift_wt* currptr = img.ptr<sift_wt>(r);
             const sift_wt* prevptr = prev.ptr<sift_wt>(r);
             const sift_wt* nextptr = next.ptr<sift_wt>(r);
+            int c = SIFT_IMG_BORDER;
 
-            for( int c = SIFT_IMG_BORDER; c < cols-SIFT_IMG_BORDER; c++)
+#if CV_SIMD && !(DoG_TYPE_SHORT)
+            const int vecsize = v_float32::nlanes;
+            for( ; c <= cols-SIFT_IMG_BORDER - vecsize; c += vecsize)
```

Review comment:
> `v_signmask(cond) == 0` `!v_check_any(cond)` (it is like `container.size() == 0` vs `container.empty()` pattern)
**File:** modules/features2d/src/sift.simd.hpp
**Change Type:** modified
**Context:** PR #20204: Improve SIFT for arm64/Apple silicon

**Code Changes:**
```diff
@@ -450,31 +450,184 @@ class findScaleSpaceExtremaT
             const sift_wt* currptr = img.ptr<sift_wt>(r);
             const sift_wt* prevptr = prev.ptr<sift_wt>(r);
             const sift_wt* nextptr = next.ptr<sift_wt>(r);
+            int c = SIFT_IMG_BORDER;
 
-            for( int c = SIFT_IMG_BORDER; c < cols-SIFT_IMG_BORDER; c++)
+#if CV_SIMD && !(DoG_TYPE_SHORT)
+            const int vecsize = v_float32::nlanes;
+            for( ; c <= cols-SIFT_IMG_BORDER - vecsize; c += vecsize)
```

Review comment:
Prefer to use single `v_signmask()` call
**File:** modules/features2d/src/sift.simd.hpp
**Change Type:** modified
**Context:** PR #20204: Improve SIFT for arm64/Apple silicon

**Code Changes:**
```diff
@@ -450,31 +450,184 @@ class findScaleSpaceExtremaT
             const sift_wt* currptr = img.ptr<sift_wt>(r);
             const sift_wt* prevptr = prev.ptr<sift_wt>(r);
             const sift_wt* nextptr = next.ptr<sift_wt>(r);
+            int c = SIFT_IMG_BORDER;
 
-            for( int c = SIFT_IMG_BORDER; c < cols-SIFT_IMG_BORDER; c++)
+#if CV_SIMD && !(DoG_TYPE_SHORT)
+            const int vecsize = v_float32::nlanes;
+            for( ; c <= cols-SIFT_IMG_BORDER - vecsize; c += vecsize)
```

Review comment:
Please split this line (at least for better reports from code coverage) ``` for (int k = 0; k<vecsize;k++) { if ((mask & (1<<k)) == 0) continue; ... } ```
**File:** modules/features2d/src/sift.simd.hpp
**Change Type:** modified
**Context:** PR #20204: Improve SIFT for arm64/Apple silicon

**Code Changes:**
```diff
@@ -450,31 +450,184 @@ class findScaleSpaceExtremaT
             const sift_wt* currptr = img.ptr<sift_wt>(r);
             const sift_wt* prevptr = prev.ptr<sift_wt>(r);
             const sift_wt* nextptr = next.ptr<sift_wt>(r);
+            int c = SIFT_IMG_BORDER;
 
-            for( int c = SIFT_IMG_BORDER; c < cols-SIFT_IMG_BORDER; c++)
+#if CV_SIMD && !(DoG_TYPE_SHORT)
+            const int vecsize = v_float32::nlanes;
+            for( ; c <= cols-SIFT_IMG_BORDER - vecsize; c += vecsize)
```

Review comment:
pixel_candidate_simd ?
**File:** modules/features2d/src/sift.simd.hpp
**Change Type:** modified
**Context:** PR #20204: Improve SIFT for arm64/Apple silicon

**Code Changes:**
```diff
@@ -450,31 +450,184 @@ class findScaleSpaceExtremaT
             const sift_wt* currptr = img.ptr<sift_wt>(r);
             const sift_wt* prevptr = prev.ptr<sift_wt>(r);
             const sift_wt* nextptr = next.ptr<sift_wt>(r);
+            int c = SIFT_IMG_BORDER;
 
-            for( int c = SIFT_IMG_BORDER; c < cols-SIFT_IMG_BORDER; c++)
+#if CV_SIMD && !(DoG_TYPE_SHORT)
+            const int vecsize = v_float32::nlanes;
+            for( ; c <= cols-SIFT_IMG_BORDER - vecsize; c += vecsize)
```

Review comment:
Resolved in latest.
**File:** modules/imgproc/src/intersection.cpp
**Change Type:** modified
**Context:** PR #19842: Update rotatedRectangleIntersection function to calculate near to origin
**Review Line:** 52

**Code Changes:**
```diff
 {
 
-int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion )
+static int _rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, std::vector<Point2f> &intersection )
 {
     CV_INSTRUMENT_REGION();
 
     // L2 metric
     const float samePointEps = std::max(1e-16f, 1e-6f * (float)std::max(rect1.size.area(), rect2.size.area()));
 
-    if (rect1.size.empty() || rect2.size.empty())
```

Review comment:
There are several return statements from this code. Some of them are **NOT** handled properly (e.g., line 97/107). Robust way is to to create wrapper which would call the original code: - make existed implementation as internal: ``` static int rotatedRectangleIntersection_( const RotatedRect& rect1, const RotatedRect& rect2, CV_OUT std::vector <Point2f>& intersection) { ... almost the same existed code ... } ``` - add wrapper below which shifts input and adjusts results: ``` int rotatedRectangleIntersection(const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion) { CV_TRACE_FUNCTION(); ... shift input ... std::vector <Point2f> intersection; intersection.reserve(24); int result = rotatedRectangleIntersection_(shiftedRect1, shiftedRect2, intersection); ... adjust 'intersection' points ... Mat(intersection).copyTo(intersectingRegion); // ??? handle .empty() case return result; } ```
**File:** modules/imgproc/src/intersection.cpp
**Change Type:** modified
**Context:** PR #19842: Update rotatedRectangleIntersection function to calculate near to origin

**Code Changes:**
```diff
@@ -47,24 +47,16 @@
 namespace cv
 {
 
-int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion )
+static int _rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, std::vector<Point2f> &intersection )
 {
     CV_INSTRUMENT_REGION();
 
     // L2 metric
```

Review comment:
`auto` is C++11 feature. 3.4 branch requires C++98 code. Use `int` here.
**File:** modules/imgproc/src/intersection.cpp
**Change Type:** modified
**Context:** PR #19842: Update rotatedRectangleIntersection function to calculate near to origin

**Code Changes:**
```diff
@@ -47,24 +47,16 @@
 namespace cv
 {
 
-int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion )
+static int _rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, std::vector<Point2f> &intersection )
 {
     CV_INSTRUMENT_REGION();
 
     // L2 metric
```

Review comment:
`range for` is C++11 feature too. ``` for (size_t i = 0; i < intersection.size(); ++i) { intersection[i] += averageCenter; } ```
**File:** modules/imgproc/src/intersection.cpp
**Change Type:** modified
**Context:** PR #19842: Update rotatedRectangleIntersection function to calculate near to origin
**Review Line:** 332

**Code Changes:**
```diff
+        {
+            intersection[i] += averageCenter;
+        }
+
+        Mat(intersection).copyTo(intersectingRegion);
+    }
+    else
+    {
+        intersectingRegion.release();
+    }
 
```

Review comment:
Need to clean the output buffer if nothing is returned. ``` else { intersectingRegion.release(); } ```
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
`CV_EXPORTS`
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
remove unnecessary changes from the patch.
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
Something is wrong with indentation
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
Avoid using underscore prefixes in public headers. We don't need them in the public API. BTW, C++ allows to use any name for parameters in .cpp file (but it should correlate with name in .hpp to keep code readable).
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
> parameterDeleting what is that? Please re-read documentation.
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
> `std::vector<Point3f> &` const reference: `const std::vector<Point3f>&`
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
> Point3f const reference should be used with all non-scalar input parameters.
**File:** modules/3d/src/octree.cpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,546 @@
+// 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
+
+#include "precomp.hpp"
+#include "octree.hpp"
+
+#define OCTREE_CHILD_NUM 8
+
```

Review comment:
> cstddef used?
**File:** modules/3d/src/octree.cpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,546 @@
+// 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
+
+#include "precomp.hpp"
+#include "octree.hpp"
+
+#define OCTREE_CHILD_NUM 8
+
```

Review comment:
Remove indentation from namespaces.
**File:** modules/3d/src/octree.hpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,99 @@
+// 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.
+//
+// Copyright (C) 2021, Huawei Technologies Co., Ltd. All rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Author: Zihao Mu <zihaomu6@gmail.com>
+//         Liangqian Kong <chargerKong@126.com>
```

Review comment:
Avoid indentation in namespaces.
**File:** modules/3d/test/test_octree.cpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,113 @@
+// 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.
+
+#include "test_precomp.hpp"
+
+namespace opencv_test { namespace {
+
+using namespace cv;
```

Review comment:
unnecessary indentation
**File:** modules/3d/test/test_octree.cpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,113 @@
+// 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.
+
+#include "test_precomp.hpp"
+
+namespace opencv_test { namespace {
+
+using namespace cv;
```

Review comment:
missing indentation
**File:** modules/3d/test/test_octree.cpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,113 @@
+// 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.
+
+#include "test_precomp.hpp"
+
+namespace opencv_test { namespace {
+
+using namespace cv;
```

Review comment:
BTW, floating-point random numbers are not bit-exact between platforms.
**File:** modules/3d/test/test_octree.cpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,113 @@
+// 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.
+
+#include "test_precomp.hpp"
+
+namespace opencv_test { namespace {
+
+using namespace cv;
```

Review comment:
OpenCV testing infrastructure should "fix" `theRNG()` state.
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
`CV_EXPORTS` is not the same as `CV_EXPORTS_W` --- This change is required. Also this would allow to remove hacks from the tests.
**File:** modules/3d/src/octree.hpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,99 @@
+// 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.
+//
+// Copyright (C) 2021, Huawei Technologies Co., Ltd. All rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Author: Zihao Mu <zihaomu6@gmail.com>
+//         Liangqian Kong <chargerKong@126.com>
```

Review comment:
> OPENCV_OCTREE_OCTREE_H `OPENCV_3D_SRC_OCTREE_HPP` (`OPENCV_<module_name>_<file_path_name>_HPP`)
**File:** modules/3d/src/octree.hpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,99 @@
+// 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.
+//
+// Copyright (C) 2021, Huawei Technologies Co., Ltd. All rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Author: Zihao Mu <zihaomu6@gmail.com>
+//         Liangqian Kong <chargerKong@126.com>
```

Review comment:
used? If so, then replace with `std::numeric_limits<float>::epsilon()` directly.
**File:** modules/3d/src/octree.hpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,99 @@
+// 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.
+//
+// Copyright (C) 2021, Huawei Technologies Co., Ltd. All rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Author: Zihao Mu <zihaomu6@gmail.com>
+//         Liangqian Kong <chargerKong@126.com>
```

Review comment:
Put global constant into `OctreeNode` class (probably as enum value).
**File:** modules/3d/src/octree.cpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress
**Review Line:** 7

**Code Changes:**
```diff
+// 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
+
+#include "precomp.hpp"
+#include "octree.hpp"
+
+#define OCTREE_CHILD_NUM 8
+
+namespace cv{
+
+// Locate the OctreeNode corresponding to the input point from the given OctreeNode.
```

Review comment:
> octree.hpp Do we need dedicated `src/octree.hpp` file? (it makes sense to put all details in this .cpp file)
**File:** modules/3d/src/octree.hpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,99 @@
+// 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.
+//
+// Copyright (C) 2021, Huawei Technologies Co., Ltd. All rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Author: Zihao Mu <zihaomu6@gmail.com>
+//         Liangqian Kong <chargerKong@126.com>
```

Review comment:
Convert all these functions to the methods of `OctreeNode` class
**File:** modules/3d/src/octree.hpp
**Change Type:** added
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -0,0 +1,99 @@
+// 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.
+//
+// Copyright (C) 2021, Huawei Technologies Co., Ltd. All rights reserved.
+// Third party copyrights are property of their respective owners.
+//
+// Author: Zihao Mu <zihaomu6@gmail.com>
+//         Liangqian Kong <chargerKong@126.com>
```

Review comment:
BTW, doxygen doesn't use files from `src/` subdirectories of OpenCV.
**File:** modules/3d/include/opencv2/3d.hpp
**Change Type:** modified
**Context:** PR #19684: Add Octree to 3D module in next branch - in progress

**Code Changes:**
```diff
@@ -2374,6 +2374,151 @@ void undistortPoints(InputArray src, OutputArray dst,
                      InputArray R = noArray(), InputArray P = noArray(),
                      TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01));
 
+
+/** @brief Octree for 3D vision.
+ *
+ * In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents
+ * the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from
+ * the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase
```

Review comment:
const method: ``` bool isPointInBound(const Point3f& point) const; ``` Mark other "read-only" methods as const too.