point_representation.h
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2011, Willow Garage, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/
#pragma once
#include <algorithm>
#include <pcl/point_types.h>
#include <pcl/pcl_macros.h>
#include <pcl/for_each_type.h>
namespace pcl
{
/** \brief @b PointRepresentation provides a set of methods for converting a point structs/object into an
* n-dimensional vector.
* \note This is an abstract class. Subclasses must set nr_dimensions_ to the appropriate value in the constructor
* and provide an implementation of the pure virtual copyToFloatArray method.
* \author Michael Dixon
*/
template <typename PointT>
class PointRepresentation
{
protected:
/** \brief The number of dimensions in this point's vector (i.e. the "k" in "k-D") */
int nr_dimensions_ = 0;
/** \brief A vector containing the rescale factor to apply to each dimension. */
std::vector<float> alpha_;
/** \brief Indicates whether this point representation is trivial. It is trivial if and only if the following
* conditions hold:
* - the relevant data consists only of float values
* - the vectorize operation directly copies the first nr_dimensions_ elements of PointT to the out array
* - sizeof(PointT) is a multiple of sizeof(float)
* In short, a trivial point representation converts the input point to a float array that is the same as if
* the point was reinterpret_casted to a float array of length nr_dimensions_ . This value says that this
* representation can be trivial; it is only trivial if setRescaleValues() has not been set.
*/
bool trivial_ = false;
public:
using Ptr = shared_ptr<PointRepresentation<PointT> >;
using ConstPtr = shared_ptr<const PointRepresentation<PointT> >;
/** \brief Empty destructor */
virtual ~PointRepresentation () = default;
//TODO: check if copy and move constructors / assignment operators are needed
/** \brief Copy point data from input point to a float array. This method must be overridden in all subclasses.
* \param[in] p The input point
* \param[out] out A pointer to a float array.
*/
virtual void copyToFloatArray (const PointT &p, float *out) const = 0;
/** \brief Returns whether this point representation is trivial. It is trivial if and only if the following
* conditions hold:
* - the relevant data consists only of float values
* - the vectorize operation directly copies the first nr_dimensions_ elements of PointT to the out array
* - sizeof(PointT) is a multiple of sizeof(float)
* In short, a trivial point representation converts the input point to a float array that is the same as if
* the point was reinterpret_casted to a float array of length nr_dimensions_ . */
inline bool isTrivial() const { return trivial_ && alpha_.empty (); }
/** \brief Verify that the input point is valid.
* \param p The point to validate
*/
virtual bool
isValid (const PointT &p) const
{
bool is_valid = true;
if (trivial_)
{
const float* temp = reinterpret_cast<const float*>(&p);
for (int i = 0; i < nr_dimensions_; ++i)
{
if (!std::isfinite (temp[i]))
{
is_valid = false;
break;
}
}
}
else
{
float *temp = new float[nr_dimensions_];
copyToFloatArray (p, temp);
for (int i = 0; i < nr_dimensions_; ++i)
{
if (!std::isfinite (temp[i]))
{
is_valid = false;
break;
}
}
delete [] temp;
}
return (is_valid);
}
/** \brief Convert input point into a vector representation, rescaling by \a alpha.
* \param[in] p the input point
* \param[out] out The output vector. Can be of any type that implements the [] operator.
*/
template <typename OutputType> void
vectorize (const PointT &p, OutputType &out) const
{
float *temp = new float[nr_dimensions_];
copyToFloatArray (p, temp);
if (alpha_.empty ())
{
for (int i = 0; i < nr_dimensions_; ++i)
out[i] = temp[i];
}
else
{
for (int i = 0; i < nr_dimensions_; ++i)
out[i] = temp[i] * alpha_[i];
}
delete [] temp;
}
/** \brief Set the rescale values to use when vectorizing points
* \param[in] rescale_array The array/vector of rescale values. Can be of any type that implements the [] operator.
*/
void
setRescaleValues (const float *rescale_array)
{
alpha_.resize (nr_dimensions_);
std::copy_n(rescale_array, nr_dimensions_, alpha_.begin());
}
/** \brief Return the number of dimensions in the point's vector representation. */
inline int getNumberOfDimensions () const { return (nr_dimensions_); }
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/** \brief @b DefaultPointRepresentation extends PointRepresentation to define default behavior for common point types.
*/
template <typename PointDefault>
class DefaultPointRepresentation : public PointRepresentation <PointDefault>
{
using PointRepresentation <PointDefault>::nr_dimensions_;
using PointRepresentation <PointDefault>::trivial_;
public:
// Boost shared pointers
using Ptr = shared_ptr<DefaultPointRepresentation<PointDefault> >;
using ConstPtr = shared_ptr<const DefaultPointRepresentation<PointDefault> >;
DefaultPointRepresentation ()
{
// If point type is unknown, assume it's a struct/array of floats, and compute the number of dimensions
nr_dimensions_ = sizeof (PointDefault) / sizeof (float);
// Limit the default representation to the first 3 elements
if (nr_dimensions_ > 3) nr_dimensions_ = 3;
trivial_ = true;
}
~DefaultPointRepresentation () {}
inline Ptr
makeShared () const
{
return (Ptr (new DefaultPointRepresentation<PointDefault> (*this)));
}
void
copyToFloatArray (const PointDefault &p, float * out) const override
{
// If point type is unknown, treat it as a struct/array of floats
const float* ptr = reinterpret_cast<const float*> (&p);
std::copy_n(ptr, nr_dimensions_, out);
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/** \brief @b DefaulFeatureRepresentation extends PointRepresentation and is intended to be used when defining the
* default behavior for feature descriptor types (i.e., copy each element of each field into a float array).
*/
template <typename PointDefault>
class DefaultFeatureRepresentation : public PointRepresentation <PointDefault>
{
protected:
using PointRepresentation <PointDefault>::nr_dimensions_;
private:
struct IncrementFunctor
{
IncrementFunctor (int &n) : n_ (n)
{
n_ = 0;
}
template<typename Key> inline void operator () ()
{
n_ += pcl::traits::datatype<PointDefault, Key>::size;
}
private:
int &n_;
};
struct NdCopyPointFunctor
{
using Pod = typename traits::POD<PointDefault>::type;
NdCopyPointFunctor (const PointDefault &p1, float * p2)
: p1_ (reinterpret_cast<const Pod&>(p1)), p2_ (p2), f_idx_ (0) { }
template<typename Key> inline void operator() ()
{
using FieldT = typename pcl::traits::datatype<PointDefault, Key>::type;
const int NrDims = pcl::traits::datatype<PointDefault, Key>::size;
Helper<Key, FieldT, NrDims>::copyPoint (p1_, p2_, f_idx_);
}
// Copy helper for scalar fields
template <typename Key, typename FieldT, int NrDims>
struct Helper
{
static void copyPoint (const Pod &p1, float * p2, int &f_idx)
{
const std::uint8_t * data_ptr = reinterpret_cast<const std::uint8_t *> (&p1) +
pcl::traits::offset<PointDefault, Key>::value;
p2[f_idx++] = *reinterpret_cast<const FieldT*> (data_ptr);
}
};
// Copy helper for array fields
template <typename Key, typename FieldT, int NrDims>
struct Helper<Key, FieldT[NrDims], NrDims>
{
static void copyPoint (const Pod &p1, float * p2, int &f_idx)
{
const std::uint8_t * data_ptr = reinterpret_cast<const std::uint8_t *> (&p1) +
pcl::traits::offset<PointDefault, Key>::value;
int nr_dims = NrDims;
const FieldT * array = reinterpret_cast<const FieldT *> (data_ptr);
for (int i = 0; i < nr_dims; ++i)
{
p2[f_idx++] = array[i];
}
}
};
private:
const Pod &p1_;
float * p2_;
int f_idx_;
};
public:
// Boost shared pointers
using Ptr = shared_ptr<DefaultFeatureRepresentation<PointDefault>>;
using ConstPtr = shared_ptr<const DefaultFeatureRepresentation<PointDefault>>;
using FieldList = typename pcl::traits::fieldList<PointDefault>::type;
DefaultFeatureRepresentation ()
{
nr_dimensions_ = 0; // zero-out the nr_dimensions_ before it gets incremented
pcl::for_each_type <FieldList> (IncrementFunctor (nr_dimensions_));
}
inline Ptr
makeShared () const
{
return (Ptr (new DefaultFeatureRepresentation<PointDefault> (*this)));
}
void
copyToFloatArray (const PointDefault &p, float * out) const override
{
pcl::for_each_type <FieldList> (NdCopyPointFunctor (p, out));
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <PointXYZ> : public PointRepresentation <PointXYZ>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 3;
trivial_ = true;
}
void
copyToFloatArray (const PointXYZ &p, float * out) const override
{
out[0] = p.x;
out[1] = p.y;
out[2] = p.z;
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <PointXYZI> : public PointRepresentation <PointXYZI>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 3;
trivial_ = true;
}
void
copyToFloatArray (const PointXYZI &p, float * out) const override
{
out[0] = p.x;
out[1] = p.y;
out[2] = p.z;
// By default, p.intensity is not part of the PointXYZI vectorization
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <PointNormal> : public PointRepresentation <PointNormal>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 3;
trivial_ = true;
}
void
copyToFloatArray (const PointNormal &p, float * out) const override
{
out[0] = p.x;
out[1] = p.y;
out[2] = p.z;
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <PFHSignature125> : public DefaultFeatureRepresentation <PFHSignature125>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <PFHRGBSignature250> : public DefaultFeatureRepresentation <PFHRGBSignature250>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <PPFSignature> : public DefaultFeatureRepresentation <PPFSignature>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 4;
trivial_ = true;
}
void
copyToFloatArray (const PPFSignature &p, float * out) const override
{
out[0] = p.f1;
out[1] = p.f2;
out[2] = p.f3;
out[3] = p.f4;
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <FPFHSignature33> : public DefaultFeatureRepresentation <FPFHSignature33>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <VFHSignature308> : public DefaultFeatureRepresentation <VFHSignature308>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <GASDSignature512> : public DefaultFeatureRepresentation <GASDSignature512>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <GASDSignature984> : public DefaultFeatureRepresentation <GASDSignature984>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <GASDSignature7992> : public DefaultFeatureRepresentation <GASDSignature7992>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation <Narf36> : public PointRepresentation <Narf36>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 36;
trivial_=false;
}
void
copyToFloatArray (const Narf36 &p, float * out) const override
{
for (int i = 0; i < nr_dimensions_; ++i)
out[i] = p.descriptor[i];
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation<NormalBasedSignature12> : public DefaultFeatureRepresentation <NormalBasedSignature12>
{};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation<ShapeContext1980> : public PointRepresentation<ShapeContext1980>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 1980;
}
void
copyToFloatArray (const ShapeContext1980 &p, float * out) const override
{
for (int i = 0; i < nr_dimensions_; ++i)
out[i] = p.descriptor[i];
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation<UniqueShapeContext1960> : public PointRepresentation<UniqueShapeContext1960>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 1960;
}
void
copyToFloatArray (const UniqueShapeContext1960 &p, float * out) const override
{
for (int i = 0; i < nr_dimensions_; ++i)
out[i] = p.descriptor[i];
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation<SHOT352> : public PointRepresentation<SHOT352>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 352;
}
void
copyToFloatArray (const SHOT352 &p, float * out) const override
{
for (int i = 0; i < nr_dimensions_; ++i)
out[i] = p.descriptor[i];
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <>
class DefaultPointRepresentation<SHOT1344> : public PointRepresentation<SHOT1344>
{
public:
DefaultPointRepresentation ()
{
nr_dimensions_ = 1344;
}
void
copyToFloatArray (const SHOT1344 &p, float * out) const override
{
for (int i = 0; i < nr_dimensions_; ++i)
out[i] = p.descriptor[i];
}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/** \brief @b CustomPointRepresentation extends PointRepresentation to allow for sub-part selection on the point.
*/
template <typename PointDefault>
class CustomPointRepresentation : public PointRepresentation <PointDefault>
{
using PointRepresentation <PointDefault>::nr_dimensions_;
public:
// Boost shared pointers
using Ptr = shared_ptr<CustomPointRepresentation<PointDefault> >;
using ConstPtr = shared_ptr<const CustomPointRepresentation<PointDefault> >;
/** \brief Constructor
* \param[in] max_dim the maximum number of dimensions to use
* \param[in] start_dim the starting dimension
*/
CustomPointRepresentation (const int max_dim = 3, const int start_dim = 0)
: max_dim_(max_dim), start_dim_(start_dim)
{
// If point type is unknown, assume it's a struct/array of floats, and compute the number of dimensions
nr_dimensions_ = static_cast<int> (sizeof (PointDefault) / sizeof (float)) - start_dim_;
// Limit the default representation to the first 3 elements
if (nr_dimensions_ > max_dim_)
nr_dimensions_ = max_dim_;
}
inline Ptr
makeShared () const
{
return Ptr (new CustomPointRepresentation<PointDefault> (*this));
}
/** \brief Copy the point data into a float array
* \param[in] p the input point
* \param[out] out the resultant output array
*/
virtual void
copyToFloatArray (const PointDefault &p, float *out) const
{
// If point type is unknown, treat it as a struct/array of floats
const float *ptr = (reinterpret_cast<const float*> (&p)) + start_dim_;
std::copy_n(ptr, nr_dimensions_, out);
}
protected:
/** \brief Use at most this many dimensions (i.e. the "k" in "k-D" is at most max_dim_) -- \note float fields are assumed */
int max_dim_;
/** \brief Use dimensions only starting with this one (i.e. the "k" in "k-D" is = dim - start_dim_) -- \note float fields are assumed */
int start_dim_;
};
}
pcl::DefaultFeatureRepresentation::NdCopyPointFunctor::Helper
Definition: point_representation.h:257
pcl_macros.h
Defines all the PCL and non-PCL macros used.
pcl::DefaultPointRepresentation< PointNormal >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:360
pcl::PFHSignature125
A point structure representing the Point Feature Histogram (PFH).
Definition: point_types.hpp:1196
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
point_types.h
pcl::traits::offset
Definition: point_traits.h:153
pcl::CustomPointRepresentation::CustomPointRepresentation
CustomPointRepresentation(const int max_dim=3, const int start_dim=0)
Constructor.
Definition: point_representation.h:544
pcl::DefaultPointRepresentation< PointXYZ >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:319
pcl::DefaultPointRepresentation::~DefaultPointRepresentation
~DefaultPointRepresentation()
Definition: point_representation.h:197
pcl::DefaultPointRepresentation< PointXYZ >::copyToFloatArray
void copyToFloatArray(const PointXYZ &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:326
pcl::traits::datatype
Definition: point_traits.h:165
pcl::NormalBasedSignature12
A point structure representing the Normal Based Signature for a feature matrix of 4-by-3.
Definition: point_types.hpp:1258
pcl::UniqueShapeContext1960::descriptor
float descriptor[1960]
Definition: point_types.hpp:1284
pcl::DefaultFeatureRepresentation< PFHSignature125 >::FieldList
typename pcl::traits::fieldList< PFHSignature125 >::type FieldList
Definition: point_representation.h:293
pcl::GASDSignature512
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor.
Definition: point_types.hpp:1433
pcl::PointRepresentation::getNumberOfDimensions
int getNumberOfDimensions() const
Return the number of dimensions in the point's vector representation.
Definition: point_representation.h:170
pcl::PointRepresentation::vectorize
void vectorize(const PointT &p, OutputType &out) const
Convert input point into a vector representation, rescaling by alpha.
Definition: point_representation.h:142
pcl::DefaultPointRepresentation
DefaultPointRepresentation extends PointRepresentation to define default behavior for common point ty...
Definition: point_representation.h:177
pcl::PointXYZI
Definition: point_types.hpp:468
pcl::FPFHSignature33
A point structure representing the Fast Point Feature Histogram (FPFH).
Definition: point_types.hpp:1371
pcl::PointRepresentation< Narf * >::ConstPtr
shared_ptr< const PointRepresentation< Narf * > > ConstPtr
Definition: point_representation.h:77
pcl::PointRepresentation::isTrivial
bool isTrivial() const
Returns whether this point representation is trivial.
Definition: point_representation.h:96
pcl::CustomPointRepresentation
CustomPointRepresentation extends PointRepresentation to allow for sub-part selection on the point.
Definition: point_representation.h:531
pcl::PointRepresentation::isValid
virtual bool isValid(const PointT &p) const
Verify that the input point is valid.
Definition: point_representation.h:102
pcl::DefaultPointRepresentation< SHOT1344 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:513
pcl::DefaultFeatureRepresentation::DefaultFeatureRepresentation
DefaultFeatureRepresentation()
Definition: point_representation.h:295
pcl::DefaultPointRepresentation::ConstPtr
shared_ptr< const DefaultPointRepresentation< PointDefault > > ConstPtr
Definition: point_representation.h:185
pcl::DefaultPointRepresentation< PointNormal >::copyToFloatArray
void copyToFloatArray(const PointNormal &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:367
pcl::SHOT1344::descriptor
float descriptor[1344]
Definition: point_types.hpp:1311
pcl::PointXYZRGB
A point structure representing Euclidean xyz coordinates, and the RGB color.
Definition: point_types.hpp:623
pcl::DefaultPointRepresentation< ShapeContext1980 >::copyToFloatArray
void copyToFloatArray(const ShapeContext1980 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:465
pcl::UniqueShapeContext1960
A point structure representing a Unique Shape Context.
Definition: point_types.hpp:1282
pcl::ShapeContext1980::descriptor
float descriptor[1980]
Definition: point_types.hpp:1271
pcl::ShapeContext1980
A point structure representing a Shape Context.
Definition: point_types.hpp:1269
pcl::DefaultPointRepresentation< PPFSignature >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:390
pcl::DefaultFeatureRepresentation
DefaulFeatureRepresentation extends PointRepresentation and is intended to be used when defining the ...
Definition: point_representation.h:219
pcl::GASDSignature7992
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
Definition: point_types.hpp:1457
pcl::DefaultPointRepresentation< SHOT1344 >::copyToFloatArray
void copyToFloatArray(const SHOT1344 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:519
pcl::DefaultFeatureRepresentation::NdCopyPointFunctor::Helper::copyPoint
static void copyPoint(const Pod &p1, float *p2, int &f_idx)
Definition: point_representation.h:259
pcl::CustomPointRepresentation::max_dim_
int max_dim_
Use at most this many dimensions (i.e.
Definition: point_representation.h:574
pcl::DefaultPointRepresentation< Narf36 >::copyToFloatArray
void copyToFloatArray(const Narf36 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:443
pcl::DefaultPointRepresentation< PointXYZI >::copyToFloatArray
void copyToFloatArray(const PointXYZI &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:346
pcl::CustomPointRepresentation::Ptr
shared_ptr< CustomPointRepresentation< PointDefault > > Ptr
Definition: point_representation.h:537
pcl::PointXYZ
A point structure representing Euclidean xyz coordinates.
Definition: point_types.hpp:291
pcl::PointRepresentation
PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...
Definition: point_representation.h:57
pcl::PPFSignature::f1
float f1
Definition: point_types.hpp:1222
pcl::PPFSignature
A point structure for storing the Point Pair Feature (PPF) values.
Definition: point_types.hpp:1220
pcl::DefaultPointRepresentation< SHOT352 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:495
pcl::DefaultPointRepresentation::Ptr
shared_ptr< DefaultPointRepresentation< PointDefault > > Ptr
Definition: point_representation.h:184
pcl::CustomPointRepresentation::makeShared
Ptr makeShared() const
Definition: point_representation.h:555
pcl::DefaultFeatureRepresentation::Ptr
shared_ptr< DefaultFeatureRepresentation< PointDefault > > Ptr
Definition: point_representation.h:291
pcl::DefaultFeatureRepresentation::NdCopyPointFunctor::Helper< Key, FieldT[NrDims], NrDims >::copyPoint
static void copyPoint(const Pod &p1, float *p2, int &f_idx)
Definition: point_representation.h:270
pcl::PFHRGBSignature250
A point structure representing the Point Feature Histogram with colors (PFHRGB).
Definition: point_types.hpp:1208
pcl::PointRepresentation::trivial_
bool trivial_
Indicates whether this point representation is trivial.
Definition: point_representation.h:73
pcl::PointRepresentation::alpha_
std::vector< float > alpha_
A vector containing the rescale factor to apply to each dimension.
Definition: point_representation.h:63
pcl::CustomPointRepresentation::start_dim_
int start_dim_
Use dimensions only starting with this one (i.e.
Definition: point_representation.h:576
pcl::PointNormal
A point structure representing Euclidean xyz coordinates, together with normal coordinates and the su...
Definition: point_types.hpp:875
pcl::DefaultPointRepresentation::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:187
pcl::DefaultPointRepresentation< Narf36 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:436
pcl::DefaultPointRepresentation< SHOT352 >::copyToFloatArray
void copyToFloatArray(const SHOT352 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:501
pcl::Narf36
A point structure representing the Narf descriptor.
Definition: point_types.hpp:1481
pcl::DefaultPointRepresentation< PointXYZI >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:339
pcl::PointRepresentation::~PointRepresentation
virtual ~PointRepresentation()=default
Empty destructor.
pcl::PointRepresentation::nr_dimensions_
int nr_dimensions_
The number of dimensions in this point's vector (i.e.
Definition: point_representation.h:61
pcl::PPFSignature::f2
float f2
Definition: point_types.hpp:1222
pcl::CustomPointRepresentation::copyToFloatArray
virtual void copyToFloatArray(const PointDefault &p, float *out) const
Copy the point data into a float array.
Definition: point_representation.h:565
pcl::uint8_t
std::uint8_t uint8_t
Definition: pcl_macros.h:92
pcl::GASDSignature984
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
Definition: point_types.hpp:1445
pcl::DefaultPointRepresentation< UniqueShapeContext1960 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:477
pcl::PointRepresentation< Narf * >::Ptr
shared_ptr< PointRepresentation< Narf * > > Ptr
Definition: point_representation.h:76
pcl::DefaultPointRepresentation< PPFSignature >::copyToFloatArray
void copyToFloatArray(const PPFSignature &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:397
pcl::DefaultFeatureRepresentation::makeShared
Ptr makeShared() const
Definition: point_representation.h:302
pcl::SHOT352::descriptor
float descriptor[352]
Definition: point_types.hpp:1297
pcl::PointRepresentation::setRescaleValues
void setRescaleValues(const float *rescale_array)
Set the rescale values to use when vectorizing points.
Definition: point_representation.h:163
pcl::SHOT1344
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+col...
Definition: point_types.hpp:1309
pcl::DefaultPointRepresentation< ShapeContext1980 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:459
pcl::SHOT352
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape onl...
Definition: point_types.hpp:1295
pcl::PPFSignature::f4
float f4
Definition: point_types.hpp:1222
pcl::DefaultPointRepresentation::makeShared
Ptr makeShared() const
Definition: point_representation.h:200
pcl::CustomPointRepresentation::ConstPtr
shared_ptr< const CustomPointRepresentation< PointDefault > > ConstPtr
Definition: point_representation.h:538
pcl::PPFSignature::f3
float f3
Definition: point_types.hpp:1222
pcl::Narf36::descriptor
float descriptor[36]
Definition: point_types.hpp:1484
pcl::DefaultPointRepresentation< UniqueShapeContext1960 >::copyToFloatArray
void copyToFloatArray(const UniqueShapeContext1960 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:483
pcl::DefaultPointRepresentation::copyToFloatArray
void copyToFloatArray(const PointDefault &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:206
pcl::PointRepresentation::copyToFloatArray
virtual void copyToFloatArray(const PointT &p, float *out) const =0
Copy point data from input point to a float array.
pcl::shared_ptr
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Definition: pcl_macros.h:90
pcl::traits::fieldList
Definition: point_traits.h:179
pcl::VFHSignature308
A point structure representing the Viewpoint Feature Histogram (VFH).
Definition: point_types.hpp:1383
pcl::DefaultFeatureRepresentation::copyToFloatArray
void copyToFloatArray(const PointDefault &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:308