Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

obb error???

Open mcmingchang opened this issue 1 year ago • 3 comments

Checklist

My Question

微信图片_20220712171304

mcmingchang avatar Jul 12 '22 09:07 mcmingchang

1

mcmingchang avatar Jul 12 '22 09:07 mcmingchang

1.zip This is my data

mcmingchang avatar Jul 13 '22 01:07 mcmingchang

This is my solution

def inverse_matrix(m): m_np = np.array(m) m_np_inv = np.linalg.inv(m_np) return m_np_inv

import trimesh mat, whd = trimesh.bounds.oriented_bounds(np.array(inlier_cloud.points)) mat_inv = inverse_matrix(mat) bbox = trimesh.creation.box(whd, mat_inv) new_obb = o3d.utility.Vector3dVector(np.array(bbox.vertices)) new_obb = o3d.geometry.OrientedBoundingBox.create_from_points(new_obb) new_obb.color = (0, 1, 1)

mcmingchang avatar Jul 13 '22 02:07 mcmingchang