38 #ifndef PCL_FEATURES_SPARSE_QUANTIZED_MULTI_MOD_TEMPLATE
39 #define PCL_FEATURES_SPARSE_QUANTIZED_MULTI_MOD_TEMPLATE
43 #include <pcl/recognition/region_xy.h>
125 const int num_of_features =
static_cast<int> (
features.size ());
126 write (stream, num_of_features);
127 for (
int feature_index = 0; feature_index < num_of_features; ++feature_index)
129 features[feature_index].serialize (stream);
143 read (stream, num_of_features);
145 for (
int feature_index = 0; feature_index < num_of_features; ++feature_index)
147 features[feature_index].deserialize (stream);
SparseQuantizedMultiModTemplate()
Constructor.
size_t modality_index
the index of the corresponding modality.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
QuantizedMultiModFeature()
Constructor.
bool compareForEquality(const QuantizedMultiModFeature &base)
Compares whether two features are the same.
A multi-modality template constructed from a set of quantized multi-modality features.
RegionXY region
The region assigned to the template.
void deserialize(std::istream &stream)
Deserializes the object from the specified stream.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
void deserialize(std::istream &stream)
Deserializes the object from the specified stream.
void write(std::ostream &stream, Type value)
Function for writing data to a stream.
void deserialize(::std::istream &stream)
Deserializes the object from the specified stream.
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
std::vector< QuantizedMultiModFeature > features
The storage for the multi-modality features.
Defines a region in XY-space.
void serialize(std::ostream &stream) const
Serializes the object to the specified stream.
unsigned char quantized_value
the quantized value attached to the feature.
Feature that defines a position and quantized value in a specific modality.