44 #include <pcl/features/feature.h>
47 #include <pcl/PointIndices.h>
55 template <
typename Po
intT>
82 setIndices (
const IndicesPtr& indices)
override;
105 setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
override;
119 setAngleStep (
const float step);
123 getAngleStep ()
const;
131 setNormalizePointMassFlag (
bool need_to_normalize);
135 getNormalizePointMassFlag ()
const;
143 setPointMass (
const float point_mass);
147 getPointMass ()
const;
176 getOBB (
PointT& min_point,
PointT& max_point,
PointT& position, Eigen::Matrix3f& rotational_matrix)
const;
185 getEigenValues (
float& major,
float& middle,
float& minor)
const;
194 getEigenVectors (Eigen::Vector3f& major, Eigen::Vector3f& middle, Eigen::Vector3f& minor)
const;
201 getMomentOfInertia (std::vector <float>& moment_of_inertia)
const;
208 getEccentricity (std::vector <float>& eccentricity)
const;
216 getMassCenter (Eigen::Vector3f& mass_center)
const;
227 rotateVector (
const Eigen::Vector3f& vector,
const Eigen::Vector3f& axis,
const float angle, Eigen::Vector3f& rotated_vector)
const;
263 computeEigenVectors (
const Eigen::Matrix <float, 3, 3>& covariance_matrix, Eigen::Vector3f& major_axis,
264 Eigen::Vector3f& middle_axis, Eigen::Vector3f& minor_axis,
float& major_value,
float& middle_value,
274 calculateMomentOfInertia (
const Eigen::Vector3f& current_axis,
const Eigen::Vector3f& mean_value)
const;
283 getProjectedCloud (
const Eigen::Vector3f& normal_vector,
const Eigen::Vector3f& point,
typename pcl::PointCloud <PointT>::Ptr projected_cloud)
const;
290 computeEccentricity (
const Eigen::Matrix <float, 3, 3>& covariance_matrix,
const Eigen::Vector3f& normal_vector);
308 Eigen::Vector3f mean_value_;
311 Eigen::Vector3f major_axis_;
314 Eigen::Vector3f middle_axis_;
317 Eigen::Vector3f minor_axis_;
329 std::vector <float> moment_of_inertia_;
332 std::vector <float> eccentricity_;
347 Eigen::Vector3f obb_position_;
350 Eigen::Matrix3f obb_rotational_matrix_;
357 #define PCL_INSTANTIATE_MomentOfInertiaEstimation(T) template class pcl::MomentOfInertiaEstimation<T>;
359 #ifdef PCL_NO_PRECOMPILE
360 #include <pcl/features/impl/moment_of_inertia_estimation.hpp>
Implements the method for extracting features based on moment of inertia.
typename PointCloud::ConstPtr PointCloudConstPtr
PointIndices::ConstPtr PointIndicesConstPtr
shared_ptr< PointCloud< PointT > > Ptr
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
unsigned int computeCovarianceMatrix(const pcl::PointCloud< PointT > &cloud, const Eigen::Matrix< Scalar, 4, 1 > ¢roid, Eigen::Matrix< Scalar, 3, 3 > &covariance_matrix)
Compute the 3x3 covariance matrix of a given set of points.
Defines functions, macros and traits for allocating and using memory.
shared_ptr< const Indices > IndicesConstPtr
shared_ptr< Indices > IndicesPtr
Defines all the PCL and non-PCL macros used.
A point structure representing Euclidean xyz coordinates, and the RGB color.