Repository navigation
Description
Checklist
- I have searched for similar issues. The closest are Minimal oriented bounding box is not minimal #6866 and Minimum Bounding Box appears to be not minimum #5417 (the old algorithm not being minimal), which Improving minimum volume OBB matching with Jylänki algorithm. #7138 addressed; I found nothing about the new algorithm returning empty boxes.
- For Python issues, I have tested with the latest development wheel. Not tested with a wheel;
cpp/open3d/t/geometry/kernel/MinimumOBB.cpponmainis identical tov0.20.0. - I have checked the release documentation and the latest documentation (for
mainbranch).
Describe the issue
Since 0.20, PointCloud.get_minimal_oriented_bounding_box() (and OrientedBoundingBox.create_from_points_minimal()) uses the Jylänki algorithm from #7138. For some point clouds it returns a box with zero extent, zero center and identity rotation, without raising or logging anything. 0.19 returned a valid box for the same input.
It happens for clearly three-dimensional input (repro 2 below: convex hull volume ≈ 2.3e7, smallest hull width ≈ 184). In both repros, some hull vertices are nearly collinear.
The empty box comes from this early return in the antipodal-vertex search:
https://github.com/isl-org/Open3D/blob/v0.20.0/cpp/open3d/t/geometry/kernel/MinimumOBB.cpp#L459-L461
MathGeoLib, which this code is ported from, takes the same exit and comments that it "should be possible only if the input is degenerate planar". Repro 2 shows that this assumption doesn't hold. The other degenerate exits in ComputeMinimumOBBJylanki call utility::LogError, but this one returns silently, so callers only notice later.
Raising an error there instead would not be enough: the legacy API (get_minimal_oriented_bounding_box, create_from_points_minimal) used to return a valid box for these inputs and now can't. That's a regression either way. The legacy API also offers no way to choose the previous algorithm, which is only available through the tensor API (o3d.t.geometry.OrientedBoundingBox.create_from_points(..., method=o3d.t.geometry.MINIMAL_APPROX)). A method argument on the legacy functions would give legacy users a way back. Separately, the legacy create_from_points_minimal docstring still describes the previous algorithm ("optimized (but not necessarily smallest) volume").
A related issue: the Jylänki result goes through a default-constructed t::geometry::OrientedBoundingBox, which is Float32:
https://github.com/isl-org/Open3D/blob/v0.20.0/cpp/open3d/t/geometry/kernel/MinimumOBB.cpp#L40-L50
So the result is rounded to float32 even for float64 input. Through the legacy API, R, extent and center are all exactly float32-representable, and R.T @ R deviates from the identity by up to ~7e-8 (0.19: ~1e-16). Code that validates the rotation matrix with np.allclose(R.T @ R, np.eye(3)) rejects it.
Steps to reproduce the bug
Repro 1, 4 points. The minimal box is nearly flat, but 0.19 returns it:
import numpy as np
import open3d as o3d
points = [
[403.33333446, -382.64956665, 279.99999327],
[-446.66665649, 446.66666561, 20.00000632],
[-413.33334351, 413.33333355, 219.9999987],
[-443.33334351, 443.33333291, 40.00000255],
]
pcd = o3d.geometry.PointCloud(o3d.utility.Vector3dVector(np.asarray(points)))
print(pcd.get_minimal_oriented_bounding_box().extent)Repro 2, 5 points, clearly 3D. The exact values matter; rounding them to 3 decimals makes it pass:
import numpy as np
import open3d as o3d
points = [
[403.33333445521794, -382.6495666503907, 279.99999326869033],
[-446.6666564941406, 446.666665613316, 20.000006320104276],
[-413.3333435058594, 413.3333335497688, 219.99999870138714],
[-443.3333435058594, 443.33333290866716, 40.0000025479972],
[-436.66666651876517, -416.3565979003906, 80.00000088740754],
]
pcd = o3d.geometry.PointCloud(o3d.utility.Vector3dVector(np.asarray(points)))
print(pcd.get_minimal_oriented_bounding_box().extent)
print(pcd.get_oriented_bounding_box().extent)
hull, _ = pcd.compute_convex_hull()
print(hull.get_volume())Both also reproduce through the tensor API with method=o3d.t.geometry.MINIMAL_JYLANKI. With MINIMAL_APPROX, they return the same boxes as 0.19.
Error message
No error. Output with 0.20.0:
### repro 1
[0. 0. 0.]
### repro 2
[0. 0. 0.]
[1195.47660138 710.70388943 185.93869592]
22936848.007833153
Expected behavior
A valid enclosing box, at least as small as the one 0.19 returned. Output with 0.19.0:
### repro 1
[1.19956599e+03 1.97248127e+02 1.24302226e-05]
### repro 2
[864.13897178 865.10578843 184.09083509]
[1195.47660138 710.70388943 185.93869592]
22936848.007833153
The result should also keep the input's precision (float64 in, float64 out).
Open3D, Python and System information
- Operating system: Windows 11 (10.0.26200)
- Python version: 3.12.10
- Open3D version: 0.20.0 (pip), compared against 0.19.0
- NumPy version: 2.4.6
- System architecture: x86_64
- Is this a remote workstation?: no
- How did you install Open3D?: pip
- Compiler version (if built from source): n/a
Additional information
Found while upgrading a downstream project to 0.20, where a minimal oriented bounding box is fitted on planar patches detected in a point cloud.
Activity
ErenAta16 commentedon Dec 1, 2026
I tried both point sets as posted with the Windows CPU wheels, including the current development build (
0.20.0+2ce4f7e). With Python 3.12.10, NumPy 2.4.6 and float64 input, the development build still returns a zero-volume box for both sets. Neither box contains even one of its input points.I also tried all 120 orderings of the five points in repro 2, changing only their order. On 0.19.0 every ordering gave a box containing all five points (volume 137,621,085.01 in the posted order). On both 0.20.0 and the development wheel, all 120 orderings gave zero volume. So the posted order isn't needed to reproduce this case.
For the containment check I used the legacy
get_minimal_oriented_bounding_box()and testedabs((points - box.center) @ box.R) <= box.extent / 2 + tolon all three axes, withtol = 1e-9 * np.ptp(points, axis=0).max(). Repro 1 also passes that check for all four points on 0.19.0 (volume 2.94114).