PExampleSet Class Reference

Detailed Description

The PExampleSet class represents a collection of PDetection's of the same identity (unknown or known); thread-safe.

For example, a set of detected faces of the SAME person, although you may not know who that person is yet. The PExampleSet is typically used to generate a PDescription using PDescribe.

This class is thread-safe.

PExampleSet contains an PObjectType and a an identity id stored as a PGuid. The identity id is a unique id and should be used to uniquely identity a particular subject. Note, that an ExampleSet may contain PDetection's with different PObjectType's.


Definition at line 51 of file PExampleSet.h.

#include <PExampleSet.h>

Constructor & Destructor Documentation

◆ PExampleSet() [1/3]

PExampleSet::PExampleSet ( )

Constructs an empty set of examples.

By default the name will be set to the empty string; the object type set to unknown and a new unique guid.

◆ PExampleSet() [2/3]

PExampleSet::PExampleSet ( const PString name,
const PObjectType objectType,
const PGuid identityId 

Construct an example set with a friendly name, objectType and identity id.

◆ PExampleSet() [3/3]

PExampleSet::PExampleSet ( const PExampleSet other)

Constructs a shared copy of other.

◆ ~PExampleSet()

virtual PExampleSet::~PExampleSet ( )

Destroys this object.

Member Function Documentation

◆ Add() [1/2]

void PExampleSet::Add ( const PDetection d)

Adds an example to the object by extracting it from a detection.

◆ Add() [2/2]

void PExampleSet::Add ( const PDetectionList d)

Adds a set of examples to the object by extracting it from a detection list.

◆ Clear()

void PExampleSet::Clear ( )

Removes all the examples stored in this set.

◆ Get()

const PDetection& PExampleSet::Get ( papillon::int32  n) const

Returns the nth detection of this set, or PDetection::Bad() if n is not the valid range.

◆ GetIdentityId()

const PGuid& PExampleSet::GetIdentityId ( ) const

Gets the identity id for the object.

◆ GetName()

const PString& PExampleSet::GetName ( ) const

Gets the friendly name for the example set.

◆ GetObjectType()

const PObjectType& PExampleSet::GetObjectType ( ) const

Gets the type of object that this set contains examples of.

◆ IsEmpty()

bool PExampleSet::IsEmpty ( ) const

Returns true if this set is empty, false otherwise.

◆ operator=()

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

Performs a shared copy of other to this object.

◆ operator==()

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

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

◆ SetIdentityId()

void PExampleSet::SetIdentityId ( const PGuid objectId)

Sets an unique id for the object.

The analysis engines will always assume this ID is unique for a particular object.

◆ SetMaxSize()

void PExampleSet::SetMaxSize ( papillon::int32  maxSize)

Sets the maximum number of examples stored in this container.

If you call Add() on a full container, the oldest PDetection object is removed.

◆ SetName()

void PExampleSet::SetName ( const PString name)

A friendly name for the example set.

Can be anything. It is never used for any analysis.

◆ SetObjectType()

void PExampleSet::SetObjectType ( const PObjectType objectType)

Sets the type of object that this set contains examples of.

◆ Size()

papillon::int32 PExampleSet::Size ( ) const

Returns the number of examples in this set.