Face Engine SDK
5.23.1
A face detection, recognition and tracking engine.
|
Descriptor batch interface. More...
#include <IDescriptor.h>
Public Types | |
enum | Error { Ok, InvalidInput, BatchFull, Incompatible, Internal, IoError, OutOfRange } |
Descriptor batch error enumeration. More... | |
Public Member Functions | |
virtual Result< Error > | add (IDescriptor *descriptor) noexcept=0 |
Add a descriptor to the batch. | |
virtual Result< Error > | add (IDescriptorBatch *batch, uint32_t offset=0) noexcept=0 |
Add a given descriptor batch content to the current batch. Descriptors to copy from the source batch are selected based on offset parameter. | |
virtual Result< Error > | add (IDescriptorBatch *batch, uint32_t offset, uint32_t count) noexcept=0 |
Add a descriptor batch content to the batch. Descriptors to copy from the source bath are selected based on count and offset parameters. | |
virtual Result< Error > | removeFast (uint32_t index) noexcept=0 |
Remove a descriptor from batch. | |
virtual Result< Error > | removeSlow (uint32_t index) noexcept=0 |
Remove a descriptor from batch. | |
virtual Result< MultiError < ISerializableObject::Error, Error > > | loadAndAdd (IArchive *archive)=0 |
Load a descriptor/descriptors from archive and add it to the batch. | |
virtual uint32_t | getMaxCount () const noexcept=0 |
Get maximum number of descriptors in this batch. | |
virtual uint32_t | getCount () const noexcept=0 |
Get actual number of descriptors in this batch. | |
virtual uint32_t | getModelVersion () const noexcept=0 |
Get algorithm model version the descriptors in this batch were created with. | |
virtual DescriptorType | getDescriptorType () const noexcept=0 |
Get type of descriptor. | |
virtual uint32_t | getDescriptorLength () const noexcept=0 |
Get length of one descriptor. Specified by version of descriptors in batch. | |
virtual ResultValue< FSDKError, IDescriptorPtr > | getDescriptorSlow (uint32_t index) const noexcept=0 |
Get descriptor from batch by index with copying. | |
virtual ResultValue< FSDKError, IDescriptorPtr > | getDescriptorFast (uint32_t index) noexcept=0 |
Get descriptor from batch by index without copying. |
Descriptor batch interface.
Used for matching large continous sets of descriptors.
A batch is created with a reserved memory for descriptors that can not be later extended. Thus descriptors can be add()'ed until the memory reservation is exceeded.
Memory reservation size can be obtained via getMaxCount() function. The batch me be reset via clear() function. It does not deallocate memory reservation. Instead, it resets internal counter allowing to re-populate the batch via add() again.
Descriptor batch error enumeration.
Used for descriptor batch related errors indication.
Reimplemented from fsdk::ISerializableObject.
virtual Result<Error> fsdk::IDescriptorBatch::add | ( | IDescriptor * | descriptor | ) | [pure virtual] |
Add a descriptor to the batch.
[in] | descriptor | descriptor to add. Descriptor data is copied and to internal reference is held, thus it is safe to release the source descriptor object later. |
virtual Result<Error> fsdk::IDescriptorBatch::add | ( | IDescriptorBatch * | batch, |
uint32_t | offset = 0 |
||
) | [pure virtual] |
Add a given descriptor batch content to the current batch. Descriptors to copy from the source batch are selected based on offset parameter.
[in] | batch | batch to take content from. All descriptors from the input batch are copied to the buffer of the current batch. So it is safe to release the source descriptor batch object later. |
[in] | offset | offset of descriptors to copy. |
virtual Result<Error> fsdk::IDescriptorBatch::add | ( | IDescriptorBatch * | batch, |
uint32_t | offset, | ||
uint32_t | count | ||
) | [pure virtual] |
Add a descriptor batch content to the batch. Descriptors to copy from the source bath are selected based on count and offset parameters.
[in] | batch | batch to take content from. |
[in] | offset | offset of descriptors to copy. |
[in] | count | count of descriptors to copy. |
virtual uint32_t fsdk::IDescriptorBatch::getCount | ( | ) | const [pure virtual] |
Get actual number of descriptors in this batch.
virtual ResultValue<FSDKError, IDescriptorPtr> fsdk::IDescriptorBatch::getDescriptorFast | ( | uint32_t | index | ) | [pure virtual] |
Get descriptor from batch by index without copying.
[in] | index | descriptor index in batch. |
virtual uint32_t fsdk::IDescriptorBatch::getDescriptorLength | ( | ) | const [pure virtual] |
Get length of one descriptor. Specified by version of descriptors in batch.
virtual ResultValue<FSDKError, IDescriptorPtr> fsdk::IDescriptorBatch::getDescriptorSlow | ( | uint32_t | index | ) | const [pure virtual] |
Get descriptor from batch by index with copying.
[in] | index | descriptor index in batch. |
virtual DescriptorType fsdk::IDescriptorBatch::getDescriptorType | ( | ) | const [pure virtual] |
Get type of descriptor.
virtual uint32_t fsdk::IDescriptorBatch::getMaxCount | ( | ) | const [pure virtual] |
Get maximum number of descriptors in this batch.
virtual uint32_t fsdk::IDescriptorBatch::getModelVersion | ( | ) | const [pure virtual] |
Get algorithm model version the descriptors in this batch were created with.
virtual Result<MultiError<ISerializableObject::Error, Error> > fsdk::IDescriptorBatch::loadAndAdd | ( | IArchive * | archive | ) | [pure virtual] |
Load a descriptor/descriptors from archive and add it to the batch.
[in] | archive | archive to read from. |
virtual Result<Error> fsdk::IDescriptorBatch::removeFast | ( | uint32_t | index | ) | [pure virtual] |
virtual Result<Error> fsdk::IDescriptorBatch::removeSlow | ( | uint32_t | index | ) | [pure virtual] |