-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improving minimum volume OBB matching with Jylänki algorithm. #7138
base: main
Are you sure you want to change the base?
Improving minimum volume OBB matching with Jylänki algorithm. #7138
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? |
This update enhances the
OrientedBoundingBox::CreateFromPointsMinimal
method 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
CreateFromPointsMinimal
function. The original approximate approach previously used inCreateFromPointsMinimal
has been refactored into a new function namedCreateFromPointsMinimalApprox
.Checklist:
python util/check_style.py --apply
to apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
Algorithm Upgrade: The
CreateFromPointsMinimal
function 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.