Solar
Public Member Functions | Friends | List of all members
SolAR::datastructure::DescriptorBuffer Class Reference

A buffer to store a set of descriptors. More...

#include <DescriptorBuffer.h>

Public Member Functions

 DescriptorBuffer (const DescriptorView8U &desc)
 
 DescriptorBuffer (const DescriptorView32F &desc)
 
 DescriptorBuffer (const DescriptorView &desc)
 
 DescriptorBuffer (DescriptorType descriptor_type, uint32_t nb_descriptors)
 DescriptorBuffer. More...
 
 DescriptorBuffer (unsigned char *descriptorData, DescriptorType descriptor_type, uint32_t nb_descriptors)
 DescriptorBuffer. More...
 
 DescriptorBuffer (unsigned char *descriptorData, DescriptorType descriptor_type, DescriptorDataType data_type, uint32_t nb_elements, uint32_t nb_descriptors)
 DescriptorBuffer. More...
 
 DescriptorBuffer (DescriptorType descriptor_type, DescriptorDataType data_type, uint32_t nb_elements, uint32_t nb_descriptors)
 DescriptorBuffer. More...
 
 DescriptorBuffer ()
 DescriptorBuffer default constructor.
 
uint32_t getNbDescriptors (void) const
 return the number of descriptors stored in the structure
 
enum DescriptorType getDescriptorType () const
 return the type of descriptor
 
uint32_t getNbElements (void) const
 return the number of elements per descriptor
 
enum DescriptorDataType getDescriptorDataType () const
 return the internal storage type of descriptor
 
uint32_t getDescriptorByteSize (void) const
 return the descriptor size in bytes
 
void append (const DescriptorView &descriptor)
 
void append (const DescriptorView8U &descriptor)
 
void append (const DescriptorView32F &descriptor)
 
DescriptorBuffer convertTo (DescriptorDataType type) const
 
DescriptorBuffer operator+ (const DescriptorBuffer &desc) const
 
DescriptorBuffer operator* (float fac) const
 
DescriptorBuffer operator/ (float div) const
 
DescriptorView getDescriptor (uint32_t index) const
 
template<DescriptorDataType datatype, typename T = typename inferType<datatype>::InnerType>
DescriptorViewTemplate< T > getDescriptor (uint32_t index)
 
void * data ()
 
const void * data () const
 
template<typename Archive >
void serialize (Archive &ar, ATTRIBUTE(maybe_unused) const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

A buffer to store a set of descriptors.

This class provides an descriptor buffer structure

Constructor & Destructor Documentation

◆ DescriptorBuffer() [1/4]

SolAR::datastructure::DescriptorBuffer::DescriptorBuffer ( DescriptorType  descriptor_type,
uint32_t  nb_descriptors 
)
explicit

DescriptorBuffer.

Parameters
descriptor_typeenum to describe the descriptors vector
nb_descriptorsthe number of descriptors stored in the buffer
Note
the data type and the number of elements are deduced from the descriptor type, except for SBPATTERN. For SBPATTERN descriptors, use another constructor to provide the number of elements ! The data are copied to get full ownership of the memory allocation.

◆ DescriptorBuffer() [2/4]

SolAR::datastructure::DescriptorBuffer::DescriptorBuffer ( unsigned char *  descriptorData,
DescriptorType  descriptor_type,
uint32_t  nb_descriptors 
)
explicit

DescriptorBuffer.

Parameters
descriptorDatapointer to an existing array structure
descriptor_typeenum to describe the descriptors vector
nb_descriptorsthe number of descriptors stored in the buffer The data are copied to get full ownership of the memory allocation.

◆ DescriptorBuffer() [3/4]

SolAR::datastructure::DescriptorBuffer::DescriptorBuffer ( unsigned char *  descriptorData,
DescriptorType  descriptor_type,
DescriptorDataType  data_type,
uint32_t  nb_elements,
uint32_t  nb_descriptors 
)
explicit

DescriptorBuffer.

Parameters
descriptorDatapointer to an existing array structure
descriptor_typeenum to describe the descriptors vector
data_typenumber of bits per descriptor element
nb_elementsnumber of elements per descriptor
nb_descriptorsthe number of descriptors stored in the buffer The data are copied to get full ownership of the memory allocation.

◆ DescriptorBuffer() [4/4]

SolAR::datastructure::DescriptorBuffer::DescriptorBuffer ( DescriptorType  descriptor_type,
DescriptorDataType  data_type,
uint32_t  nb_elements,
uint32_t  nb_descriptors 
)
explicit

DescriptorBuffer.

Parameters
descriptor_typeenum to describe the descriptors vector
data_typenumber of bits per descriptor element
nb_elementsnumber of elements per descriptor
nb_descriptorsthe number of descriptors stored in the buffer The data are copied to get full ownership of the memory allocation.

The documentation for this class was generated from the following files: