ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
MinimumOBB.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 #pragma once
8 
11 
12 namespace cloudViewer {
13 namespace t {
14 namespace geometry {
15 namespace kernel {
16 namespace minimum_obb {
17 
30  bool robust);
31 
44  bool robust);
45 
46 } // namespace minimum_obb
47 } // namespace kernel
48 } // namespace geometry
49 } // namespace t
50 } // namespace cloudViewer
cloudViewer
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
PointCloud.h
cloudViewer::t::geometry::AxisAlignedBoundingBox::Volume
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.h:179
cloudViewer::core::eigen_converter::TensorToEigenMatrixXd
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > TensorToEigenMatrixXd(const core::Tensor &tensor)
Converts a 2D tensor to Eigen::MatrixXd of same shape. Regardless of the tensor dtype,...
Definition: EigenConverter.cpp:67
cloudViewer::core::make_pair
CLOUDVIEWER_HOST_DEVICE Pair< First, Second > make_pair(const First &_first, const Second &_second)
Definition: SlabTraits.h:49
x
normal_z x
Definition: my_point_types.h:165
cloudViewer::core::Tensor::GetShape
SizeVector GetShape() const
Definition: Tensor.h:1127
cloudViewer::t::geometry::kernel::minimum_obb::ComputeMinimumOBBApprox
OrientedBoundingBox ComputeMinimumOBBApprox(const core::Tensor &points, bool robust)
Definition: MinimumOBB.cpp:1248
core::Tensor
cloudViewer::t::geometry::OrientedBoundingBox::Rotate
OrientedBoundingBox & Rotate(const core::Tensor &rotation, const utility::optional< core::Tensor > &center=utility::nullopt)
Rotate the oriented box by the given rotation matrix. If the rotation matrix is not orthogonal,...
Definition: BoundingVolume.cpp:449
R_
Eigen::Matrix3d R_
Definition: MinimumOBB.cpp:49
cloudViewer::t::geometry::OrientedBoundingBox::SetRotation
void SetRotation(const core::Tensor &rotation)
Set the rotation matrix of the box. If the data type of the given tensor differs from the data type o...
Definition: BoundingVolume.cpp:391
cloudViewer::core::Tensor::Reshape
Tensor Reshape(const SizeVector &dst_shape) const
Definition: Tensor.cpp:671
cloudViewer::t::geometry::OrientedBoundingBox::SetCenter
void SetCenter(const core::Tensor &center)
Set the center of the box. If the data type of the given tensor differs from the data type of the box...
Definition: BoundingVolume.cpp:369
cloudViewer::t::geometry::kernel::minimum_obb::ComputeMinimumOBBJylanki
OrientedBoundingBox ComputeMinimumOBBJylanki(const core::Tensor &points_, bool robust)
Definition: MinimumOBB.cpp:55
TriangleMesh.h
cloudViewer::t::geometry::OrientedBoundingBox::SetExtent
void SetExtent(const core::Tensor &extent)
Set the extent of the box. If the data type of the given tensor differs from the data type of the box...
Definition: BoundingVolume.cpp:377
cloudViewer::t::geometry::PointCloud
A point cloud contains a list of 3D points.
Definition: PointCloud.h:82
cloudViewer::t::geometry::OrientedBoundingBox
A bounding box oriented along an arbitrary frame of reference.
Definition: BoundingVolume.h:258
cloudViewer::t::geometry::AxisAlignedBoundingBox::GetOrientedBoundingBox
OrientedBoundingBox GetOrientedBoundingBox() const
Convert to an oriented box.
Definition: BoundingVolume.cpp:275
cloudViewer::t::geometry::PointCloud::Rotate
PointCloud & Rotate(const core::Tensor &R, const core::Tensor &center)
Rotates the PointPositions and PointNormals (if exists).
Definition: PointCloud.cpp:206
cloudViewer::t::geometry::OrientedBoundingBox::GetCenter
core::Tensor GetCenter() const
Definition: BoundingVolume.h:335
BoundingVolume.h
e
const double * e
Definition: essential_matrix_poly.h:10
extent_
Eigen::Vector3d extent_
Definition: MinimumOBB.cpp:50
std::swap
void swap(cloudViewer::core::SmallVectorImpl< T > &LHS, cloudViewer::core::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
Definition: SmallVector.h:1370
cloudViewer::core::Device
Definition: Device.h:18
cloudViewer::t::geometry::kernel::image::To
void To(const core::Tensor &src, core::Tensor &dst, double scale, double offset)
Definition: Image.cpp:17
cloudViewer::t::geometry::OrientedBoundingBox::Volume
double Volume() const
Returns the volume of the bounding box.
Definition: BoundingVolume.h:385
TensorCheck.h
knncpp::Vector3i
Eigen::Matrix< Index, 3, 1 > Vector3i
Definition: knncpp.h:30
a
a[190]
Definition: essential_matrix_poly.h:19
cloudViewer::core::Tensor::GetDevice
Device GetDevice() const override
Definition: Tensor.cpp:1435
cloudViewer::core::Tensor::CopyFrom
void CopyFrom(const Tensor &other)
Copy Tensor values to current tensor from the source tensor.
Definition: Tensor.cpp:770
cloudViewer::t::geometry::PointCloud::GetAxisAlignedBoundingBox
AxisAlignedBoundingBox GetAxisAlignedBoundingBox() const
Create an axis-aligned bounding box from attribute "positions".
Definition: PointCloud.cpp:1271
EigenConverter.h
points
int points
Definition: FileIOFactory.cpp:144
cloudViewer::core::Float32
const Dtype Float32
Definition: Dtype.cpp:42
center_
Eigen::Vector3d center_
Definition: MinimumOBB.cpp:51
LogError
#define LogError(...)
Definition: Logging.h:60
cloudViewer::t::geometry::AxisAlignedBoundingBox::CreateFromPoints
static AxisAlignedBoundingBox CreateFromPoints(const core::Tensor &points)
Definition: BoundingVolume.cpp:233
MinimumOBB.h
cloudViewer::t::geometry::OrientedBoundingBox::GetExtent
core::Tensor GetExtent() const
Definition: BoundingVolume.h:339
cloudViewer::core::eigen_converter::EigenMatrixToTensor
core::Tensor EigenMatrixToTensor(const Eigen::MatrixBase< Derived > &matrix)
Converts a eigen matrix of shape (M, N) with alignment A and type T to a tensor.
Definition: EigenConverter.h:29
cloudViewer::utility::nullopt
constexpr nullopt_t nullopt
Definition: Optional.h:136
cloudViewer::t::geometry::PointCloud::GetPointPositions
core::Tensor & GetPointPositions()
Get the value of the "positions" attribute. Convenience function.
Definition: PointCloud.h:124
cloudViewer::geometry::OrientedBoundingBox
::ecvOrientedBBox OrientedBoundingBox
Definition: BoundingVolume.h:22
cloudViewer::core::eigen_converter::TensorToEigenVector3iVector
std::vector< Eigen::Vector3i > TensorToEigenVector3iVector(const core::Tensor &tensor)
Converts a tensor of shape (N, 3) to std::vector<Eigen::Vector3i>. An exception will be thrown if the...
Definition: EigenConverter.cpp:155
AssertTensorShape
#define AssertTensorShape(tensor,...)
Definition: TensorCheck.h:61
cloudViewer::core::eigen_converter::TensorToEigenVector3dVector
std::vector< Eigen::Vector3d > TensorToEigenVector3dVector(const core::Tensor &tensor)
Converts a tensor of shape (N, 3) to std::vector<Eigen::Vector3d>. An exception will be thrown if the...
Definition: EigenConverter.cpp:150
cloudViewer::core::Tensor::To
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:739
cloudViewer::t::geometry::OrientedBoundingBox::GetRotation
core::Tensor GetRotation() const
Definition: BoundingVolume.h:337
cloudViewer::t::geometry::PointCloud::ComputeConvexHull
TriangleMesh ComputeConvexHull(bool joggle_inputs=false) const
Definition: PointCloud.cpp:1201