41 #include <xmmintrin.h>
44 #include <immintrin.h>
47 #include <pcl/point_cloud.h>
48 #include <pcl/PointIndices.h>
49 namespace pcl {
struct PCLPointCloud2; }
69 getAngle3D (
const Eigen::Vector4f &v1,
const Eigen::Vector4f &v2,
const bool in_degree =
false);
79 getAngle3D (
const Eigen::Vector3f &v1,
const Eigen::Vector3f &v2,
const bool in_degree =
false);
92 acos_SSE (
const __m128 &x);
109 getAcuteAngle3DSSE (
const __m128 &x1,
const __m128 &y1,
const __m128 &z1,
const __m128 &x2,
const __m128 &y2,
const __m128 &z2);
123 acos_AVX (
const __m256 &x);
140 getAcuteAngle3DAVX (
const __m256 &x1,
const __m256 &y1,
const __m256 &z1,
const __m256 &x2,
const __m256 &y2,
const __m256 &z2);
150 getMeanStd (
const std::vector<float> &values,
double &mean,
double &stddev);
159 template <
typename Po
intT>
inline void
161 Eigen::Vector4f &max_pt,
Indices &indices);
169 template<
typename Po
intT>
inline void
179 template<
typename Po
intT>
inline void
181 const Eigen::Vector4f &pivot_pt, Eigen::Vector4f &max_pt);
189 template <
typename Po
intT>
inline void
198 template <
typename Po
intT>
inline void
200 Eigen::Vector4f &min_pt, Eigen::Vector4f &max_pt);
209 template <
typename Po
intT>
inline void
211 Eigen::Vector4f &min_pt, Eigen::Vector4f &max_pt);
220 template <
typename Po
intT>
inline void
222 Eigen::Vector4f &min_pt, Eigen::Vector4f &max_pt);
231 template <
typename Po
intT>
inline double
241 template <
typename Po
intT>
inline void
242 getMinMax (
const PointT &histogram,
int len,
float &min_p,
float &max_p);
249 template<
typename Po
intT>
inline float
262 float &min_p,
float &max_p);
271 getMeanStdDev (
const std::vector<float> &values,
double &mean,
double &stddev);
284 template<
typename IteratorT,
typename Functor>
inline auto
286 #
if __cpp_lib_is_invocable
287 std::invoke_result_t<
Functor, decltype(*begin)>
289 std::result_of_t<
Functor(decltype(*begin))>
293 const std::size_t mid = size/2;
296 std::nth_element (begin, begin + (mid-1), end);
297 return (f(begin[mid-1]) + f(*(std::min_element (begin + mid, end)))) / 2.0;
301 std::nth_element (begin, begin + mid, end);
302 return f(begin[mid]);
308 template<
typename IteratorT>
inline auto
309 computeMedian (IteratorT begin, IteratorT end) noexcept ->
typename std::iterator_traits<IteratorT>::value_type
311 return computeMedian (begin, end, [](
const auto& x){
return x;});
315 #include <pcl/common/impl/common.hpp>
PointCloud represents the base class in PCL for storing collections of 3D points.
void getMaxDistance(const pcl::PointCloud< PointT > &cloud, const Eigen::Vector4f &pivot_pt, Eigen::Vector4f &max_pt)
Get the point at maximum distance from a given point and a given pointcloud.
float calculatePolygonArea(const pcl::PointCloud< PointT > &polygon)
Calculate the area of a polygon given a point cloud that defines the polygon.
auto computeMedian(IteratorT begin, IteratorT end, Functor f) noexcept -> std::result_of_t< Functor(decltype(*begin))>
Compute the median of a list of values (fast).
void getMinMax3D(const pcl::PointCloud< PointT > &cloud, PointT &min_pt, PointT &max_pt)
Get the minimum and maximum values on each of the 3 (x-y-z) dimensions in a given pointcloud.
void getMeanStd(const std::vector< float > &values, double &mean, double &stddev)
Compute both the mean and the standard deviation of an array of values.
double getAngle3D(const Eigen::Vector4f &v1, const Eigen::Vector4f &v2, const bool in_degree=false)
Compute the smallest angle between two 3D vectors in radians (default) or degree.
void getPointsInBox(const pcl::PointCloud< PointT > &cloud, Eigen::Vector4f &min_pt, Eigen::Vector4f &max_pt, Indices &indices)
Get a set of points residing in a box given its bounds.
void getMinMax(const PointT &histogram, int len, float &min_p, float &max_p)
Get the minimum and maximum values on a point histogram.
double getCircumcircleRadius(const PointT &pa, const PointT &pb, const PointT &pc)
Compute the radius of a circumscribed circle for a triangle formed of three points pa,...
PCL_EXPORTS void getMeanStdDev(const std::vector< float > &values, double &mean, double &stddev)
Compute both the mean and the standard deviation of an array of values.
float distance(const PointT &p1, const PointT &p2)
IndicesAllocator<> Indices
Type used for indices in PCL.
Base functor all the models that need non linear optimization must define their own one and implement...
A point structure representing Euclidean xyz coordinates, and the RGB color.