Skip to content

Conversation

@quentin-leboutet
Copy link
Contributor

Add Oriented Bounding Ellipsoid (OBE) support to Open3D

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

This PR adds support for Oriented Bounding Ellipsoids (OBE) to Open3D, complementing the existing bounding volume primitives (AABB and OBB). Oriented bounding ellipsoids provide a tighter fit for certain geometries compared to boxes, which can be beneficial for:

  • More accurate spatial representations of point clouds and meshes
  • Improved collision detection and computational geometry applications
  • Better geometric analysis and understanding of 3D shapes

The implementation uses Khachiyan's algorithm to compute the minimum volume enclosing ellipsoid, providing an efficient approximation of the optimal bounding ellipsoid.

Screenshot 2025-11-23 at 00 20 05 Screenshot 2025-11-23 at 00 21 54 Screenshot 2025-11-23 at 00 20 40

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

Core Implementation

New Classes:

Key Features:

  1. Minimum volume ellipsoid computation using Khachiyan's algorithm
  2. Geometry integration:
    • Added GetOrientedBoundingEllipsoid() method to all 3D geometry base classes (Geometry3D.h:74-75)
    • Support for PointCloud, TriangleMesh, LineSet, VoxelGrid, and Octree
  3. Ellipsoid mesh generation:
  4. Transformation operations:
  5. Visualization support:
  6. Python bindings:
    • Complete Python API through pybind11 (boundingvolume.cpp)
    • create_from_points() static method with robust option
    • Properties: center, R (rotation), radii, color

Try it:

import open3d as o3d
mesh = o3d.io.read_triangle_mesh("<your_mesh>.obj")
mesh.compute_triangle_normals()
ellipsoid = o3d.geometry.OrientedBoundingEllipsoid.create_from_points(o3d.utility.Vector3dVector(mesh.vertices))
print(f"Volume ellipsoid: {ellipsoid.volume()}")
ellipsoid.color = (0, 0.44313725490196076, 0.7725490196078432)
ellipsoid_lines = o3d.geometry.LineSet.create_from_oriented_bounding_ellipsoid(ellipsoid)
o3d.visualization.draw([mesh, ellipsoid_lines])

@update-docs
Copy link

update-docs bot commented Nov 23, 2025

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@ssheorey ssheorey requested a review from Copilot December 25, 2025 14:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Oriented Bounding Ellipsoid (OBE) support to Open3D, implementing minimum volume enclosing ellipsoids using Khachiyan's algorithm. The feature provides a tighter geometric approximation than axis-aligned or oriented bounding boxes for certain shapes.

Key changes:

  • Implements Khachiyan's algorithm for computing minimum volume enclosing ellipsoids
  • Adds OrientedBoundingEllipsoid class to both legacy and tensor-based APIs
  • Integrates ellipsoid support across all 3D geometry types with visualization capabilities

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
cpp/open3d/t/geometry/kernel/MinimumOBE.cpp Core Khachiyan algorithm implementation for computing minimum volume ellipsoids
cpp/open3d/geometry/BoundingVolume.h/cpp Legacy API OrientedBoundingEllipsoid class with transformation operations
cpp/open3d/t/geometry/BoundingVolume.h/cpp Tensor-based OrientedBoundingEllipsoid implementation
cpp/open3d/geometry/TriangleMeshFactory.cpp CreateEllipsoid factory method for generating ellipsoid meshes
cpp/open3d/geometry/LineSetFactory.cpp Factory method for creating wireframe representation of ellipsoids
cpp/pybind/geometry/boundingvolume.cpp Python bindings for OrientedBoundingEllipsoid
cpp/open3d/visualization/* Visualization support for rendering ellipsoids
cpp/tests/t/geometry/TriangleMesh.cpp Unit test for CreateEllipsoid functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants