Improving minimum volume OBB matching with Jylänki algorithm.#7138
Improving minimum volume OBB matching with Jylänki algorithm.#7138benjaminum merged 15 commits intoisl-org:mainfrom
Conversation
|
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
|
Interesting addition. The tensor-based class If three create_from_points methods are too much, we could also think about having |
|
Makes sense. Let me take a closer look at it. |
|
As suggested I added tensor-based class support. |
|
Unit tests for several geometries fail for [ RUN ] TriangleMesh.GetMinimalOrientedBoundingBox
/root/Open3D/cpp/tests/geometry/TriangleMesh.cpp:350: Failure
Expected equality of these values:
obb.extent_
Which is: { 1, 3, 2 }
Eigen::Vector3d(3, 2, 1)
Which is: { 3, 2, 1 }
[ FAILED ] TriangleMesh.GetMinimalOrientedBoundingBox (1 ms)On first view it seems like maybe some dimensions are mixed up, but since your implementation contains over 1000 lines of code, I cannot easily find anything. Also, there is the question if this should really be used in all those Geometries by default? |
update docstrings
This update enhances the
OrientedBoundingBox::CreateFromPointsMinimalmethod to fit a minimum volume oriented bounding box (OBB) to a given point cloud.Type
Motivation and Context
Fitting a minimum volume OBB to an arbitrary point cloud is a well-known computational geometry problem. An exact solution to this problem was proposed by O'Rourke in the late 80s, with a cubic time complexity. O’Rourke’s paper also describes a simplified version with quadratic complexity, which is -- I believe -- the variant currently implemented in Open3D. In 2015, Jukka Jylänki proposed a faster algorithm for computing a minimum volume OBB. I used his original implementation as well as the article describing his algorithm to improve the current
CreateFromPointsMinimalfunction. The original approximate approach previously used inCreateFromPointsMinimalhas been refactored into a new function namedCreateFromPointsMinimalApprox.Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
Algorithm Upgrade: The
CreateFromPointsMinimalfunction has been improved using Jylänki's algorithm, resulting in more accurate -- but slower -- OBB fitting.Function Refactoring: The original approximate approach previously used in CreateFromPointsMinimal has been refactored into a new function named
CreateFromPointsMinimalApprox. I added a suitable python binding and documented my implementation.Impact: I believe these modifications provide an exact computation of the minimum volume OBB, which can significantly benefit applications that rely on precise spatial bounding computations for large datasets.