PDescription Class Reference

Detailed Description

The PDescription class represents a set of features that have been computed on an identity (it is a biometric template when it is used for Face Recognition).

PDescription represents a collection of PDescriptors about a unique Identity stored as a PGuid. The identity-id should be unique to a particular subject (e.g. John, Coke Logo e.t.c.). The name need not be unique and is used merely as a convenience factor.

A PDescription has an object-type, e.g. Face. It also has a unique object-id. You can add as many descriptors as you want to a PDescription.


Definition at line 59 of file PDescription.h.

#include <PDescription.h>

Constructor & Destructor Documentation

◆ PDescription() [1/3]

PDescription::PDescription ( )

Constructs an empty container of descriptors.

◆ PDescription() [2/3]

PDescription::PDescription ( const PString name,
const PObjectType objectType,
const PGuid identityId,
const PProperties properties = PProperties() 

Construct from a friendly name, objectType and unique-identity id.

◆ PDescription() [3/3]

PDescription::PDescription ( const PDescription other)

Constructs a shared copy of other.

◆ ~PDescription()

virtual PDescription::~PDescription ( )

Destroys this object.

Member Function Documentation

◆ AddDescription()

PResult PDescription::AddDescription ( const PDescription description)

Adds the descriptors of another description to this one.

Returns PResult::C_OK if success, another result otherwise.

◆ AddDescriptor()

void PDescription::AddDescriptor ( const PDescriptor descriptor)

Sets a descriptor vector.

◆ GetDescriptors() [1/3]

PList PDescription::GetDescriptors ( const PGuid describeEngineId) const

Gets all the descriptors generated by a particular describer type.

◆ GetDescriptors() [2/3]

PList PDescription::GetDescriptors ( const PObjectType objectType) const

Gets all the descriptors of a particular object-type.

◆ GetDescriptors() [3/3]

const PList& PDescription::GetDescriptors ( ) const

Gets all the descriptors within this description.

◆ GetFirstDescriptor()

PResult PDescription::GetFirstDescriptor ( PDescriptor descriptor) const

Get the first descriptor handled by this description.

Returns PResult::C_OK if success, another result otherwise.

◆ GetIdentityId()

const PGuid& PDescription::GetIdentityId ( ) const

Gets the identity id.

◆ GetName()

PString PDescription::GetName ( ) const

Gets the friendly name for the description.

◆ GetNumberOfDescriptors()

int PDescription::GetNumberOfDescriptors ( ) const

Returns the number of descriptors attached with this description.

◆ GetObjectType()

PObjectType PDescription::GetObjectType ( ) const

Gets the type of object the description is of.

◆ GetProperties()

PProperties PDescription::GetProperties ( )

Gets the properties container attached to this description.

◆ GetPropertiesForReading()

const PProperties& PDescription::GetPropertiesForReading ( ) const

Gets the properties container attached to this description.

◆ GetThumbnail()

PImage PDescription::GetThumbnail ( ) const

Gets the thumbnail attached with the description.

Returns an empty image (see PImage::IsEmpty()), if there is no thumbnail attached with this description.

◆ GetThumbnails()

PList PDescription::GetThumbnails ( ) const


Returns the list of thumbnails (as PImage) associated with this description. The list can be empty. This method will collect all thumbnails contained in underlying PDescriptor objects.

◆ GetVersion()

PVersion PDescription::GetVersion ( ) const

Gets the version number attached to this description.

Returns a null ( version number (see PVersion::IsNull()), if there is no version attached to this description.

◆ IsEmpty()

bool PDescription::IsEmpty ( ) const

Returns true if this description has no descriptors (empty container), false otherwise.

◆ operator=()

PDescription& PDescription::operator= ( const PDescription other)

Performs a shared copy of other to this object.

◆ operator==()

bool PDescription::operator== ( const PDescription other) const

Returns true if this object is the same instance than other, false otherwise.

◆ RecomputeDescriptors()

papillon::int32 PDescription::RecomputeDescriptors ( const PGuid describeId,
const PDetector detector,
const PDescriber describer 

Recomputes the descriptors (PDescriptor) computed with the specified describeId (PDescriber) using the specified PDetector and PDescriber.

Descriptors must contain images (stored under the name "Thumbnail" in the PProperties container attached with each descriptor). Returns the number of upgraded descriptors.

◆ RemoveDescriptor()

PResult PDescription::RemoveDescriptor ( const PGuid descriptorId)

Removes a specified descriptor from the description.

Returns PResult::C_OK if success, another result otherwise.

◆ Reset()

void PDescription::Reset ( )

Resets this container: clears the container and properties, sets name to empty, sets id to null and sets type to unknown, as if the object had been default constructed.

◆ SetIdentityId()

void PDescription::SetIdentityId ( const PGuid objectId)

Sets the identity id.

◆ SetName()

void PDescription::SetName ( const PString name)

Sets a friendly name for the description.

◆ SetObjectType()

void PDescription::SetObjectType ( const PObjectType objectType)

Sets the object type.

◆ SetThumbnail()

void PDescription::SetThumbnail ( const PImage thumbnail)

Sets the thumbnail attached with to description.

◆ SetVersion()

void PDescription::SetVersion ( const PVersion version)

Sets the version number attached to this description.

Friends And Related Function Documentation

◆ PDescriptionImpl

friend class PDescriptionImpl

Definition at line 227 of file PDescription.h.