Fawkes API Fawkes Development Version

fawkes::FacerInterface Class Reference

FacerInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::FacerInterface:

List of all members.

Classes

class  EnableIdentityMessage
 EnableIdentityMessage Fawkes BlackBoard Interface Message. More...
struct  FacerInterface_data_t
 Internal data storage, do NOT modify!
class  GetNameMessage
 GetNameMessage Fawkes BlackBoard Interface Message. More...
class  LearnFaceMessage
 LearnFaceMessage Fawkes BlackBoard Interface Message. More...
class  SetNameMessage
 SetNameMessage Fawkes BlackBoard Interface Message. More...
class  SetOpmodeMessage
 SetOpmodeMessage Fawkes BlackBoard Interface Message. More...

Public Types

enum  if_facer_opmode_t { OPMODE_DISABLED, OPMODE_DETECTION, OPMODE_RECOGNITION, OPMODE_LEARNING }
 

This determines the current status of skill execution.

More...

Public Member Functions

const char * tostring_if_facer_opmode_t (if_facer_opmode_t value) const
 Convert if_facer_opmode_t constant to string.
virtual bool message_valid (const Message *message) const
 Check if message is valid and can be enqueued.
if_facer_opmode_t opmode () const
 Get opmode value.
void set_opmode (const if_facer_opmode_t new_opmode)
 Set opmode value.
size_t maxlenof_opmode () const
 Get maximum length of opmode value.
uint32_t num_identities () const
 Get num_identities value.
void set_num_identities (const uint32_t new_num_identities)
 Set num_identities value.
size_t maxlenof_num_identities () const
 Get maximum length of num_identities value.
uint32_t recognized_identity () const
 Get recognized_identity value.
void set_recognized_identity (const uint32_t new_recognized_identity)
 Set recognized_identity value.
size_t maxlenof_recognized_identity () const
 Get maximum length of recognized_identity value.
char * recognized_name () const
 Get recognized_name value.
void set_recognized_name (const char *new_recognized_name)
 Set recognized_name value.
size_t maxlenof_recognized_name () const
 Get maximum length of recognized_name value.
uint32_t num_detections () const
 Get num_detections value.
void set_num_detections (const uint32_t new_num_detections)
 Set num_detections value.
size_t maxlenof_num_detections () const
 Get maximum length of num_detections value.
uint32_t num_recognitions () const
 Get num_recognitions value.
void set_num_recognitions (const uint32_t new_num_recognitions)
 Set num_recognitions value.
size_t maxlenof_num_recognitions () const
 Get maximum length of num_recognitions value.
uint32_t most_likely_identity () const
 Get most_likely_identity value.
void set_most_likely_identity (const uint32_t new_most_likely_identity)
 Set most_likely_identity value.
size_t maxlenof_most_likely_identity () const
 Get maximum length of most_likely_identity value.
float history_ratio () const
 Get history_ratio value.
void set_history_ratio (const float new_history_ratio)
 Set history_ratio value.
size_t maxlenof_history_ratio () const
 Get maximum length of history_ratio value.
float sec_since_detection () const
 Get sec_since_detection value.
void set_sec_since_detection (const float new_sec_since_detection)
 Set sec_since_detection value.
size_t maxlenof_sec_since_detection () const
 Get maximum length of sec_since_detection value.
int32_t visibility_history () const
 Get visibility_history value.
void set_visibility_history (const int32_t new_visibility_history)
 Set visibility_history value.
size_t maxlenof_visibility_history () const
 Get maximum length of visibility_history value.
bool is_learning_in_progress () const
 Get learning_in_progress value.
void set_learning_in_progress (const bool new_learning_in_progress)
 Set learning_in_progress value.
size_t maxlenof_learning_in_progress () const
 Get maximum length of learning_in_progress value.
float recording_progress () const
 Get recording_progress value.
void set_recording_progress (const float new_recording_progress)
 Set recording_progress value.
size_t maxlenof_recording_progress () const
 Get maximum length of recording_progress value.
float bearing () const
 Get bearing value.
void set_bearing (const float new_bearing)
 Set bearing value.
size_t maxlenof_bearing () const
 Get maximum length of bearing value.
float slope () const
 Get slope value.
void set_slope (const float new_slope)
 Set slope value.
size_t maxlenof_slope () const
 Get maximum length of slope value.
uint32_t requested_index () const
 Get requested_index value.
void set_requested_index (const uint32_t new_requested_index)
 Set requested_index value.
size_t maxlenof_requested_index () const
 Get maximum length of requested_index value.
char * requested_name () const
 Get requested_name value.
void set_requested_name (const char *new_requested_name)
 Set requested_name value.
size_t maxlenof_requested_name () const
 Get maximum length of requested_name value.
virtual Messagecreate_message (const char *type) const
 Create message based on type name.
virtual void copy_values (const Interface *other)
 Copy values from other interface.
virtual const char * enum_tostring (const char *enumtype, int val) const
 Convert arbitrary enum value to string.

Detailed Description

FacerInterface Fawkes BlackBoard Interface.

The interface provides access to the face recognition plugin (facer). It provides basic status information about facer and allows for setting a specific mode and access the resolut. calling skills via messages. It can also be used to manually restart the Lua interpreter if something is wedged.

Definition at line 33 of file FacerInterface.h.


Member Enumeration Documentation

This determines the current status of skill execution.

Enumerator:
OPMODE_DISABLED 

Facer will not process any images.

OPMODE_DETECTION 

Facer will detect faces, but not try to recognize them.

OPMODE_RECOGNITION 

Facer will detect faces, and then try to recognize the most dominant face.

OPMODE_LEARNING 

Facer will gather images and learn an identity.

Definition at line 44 of file FacerInterface.h.


Member Function Documentation

float fawkes::FacerInterface::bearing ( ) const

Get bearing value.

The relative bearing to the recognized face in radians.

Returns:
bearing value

Definition at line 534 of file FacerInterface.cpp.

void fawkes::FacerInterface::copy_values ( const Interface other) [virtual]

Copy values from other interface.

Parameters:
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 692 of file FacerInterface.cpp.

References fawkes::Interface::type().

Message * fawkes::FacerInterface::create_message ( const char *  type) const [virtual]

Create message based on type name.

This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.

Parameters:
typemessage type
Returns:
message of the given type, empty
Exceptions:
UnknownTypeExceptionthrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 669 of file FacerInterface.cpp.

const char * fawkes::FacerInterface::enum_tostring ( const char *  enumtype,
int  val 
) const [virtual]

Convert arbitrary enum value to string.

Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.

Parameters:
enumtypeenum type as string
valvalue to convert
Returns:
string representation of value
Exceptions:
UnknownTypeExceptionthrown if enumtype is not specified for interface.

Implements fawkes::Interface.

Definition at line 703 of file FacerInterface.cpp.

float fawkes::FacerInterface::history_ratio ( ) const

Get history_ratio value.

The ratio of the most likely identity showing up in the history and the length of the history.

Returns:
history_ratio value

Definition at line 354 of file FacerInterface.cpp.

bool fawkes::FacerInterface::is_learning_in_progress ( ) const

Get learning_in_progress value.

Indicates whether a new identity is currently learnt. If learning is in progress only "old" faces can be recognized.

Returns:
learning_in_progress value

Definition at line 463 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_bearing ( ) const

Get maximum length of bearing value.

Returns:
length of bearing value, can be length of the array or number of maximum number of characters for a string

Definition at line 544 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_history_ratio ( ) const

Get maximum length of history_ratio value.

Returns:
length of history_ratio value, can be length of the array or number of maximum number of characters for a string

Definition at line 364 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_learning_in_progress ( ) const

Get maximum length of learning_in_progress value.

Returns:
length of learning_in_progress value, can be length of the array or number of maximum number of characters for a string

Definition at line 473 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_most_likely_identity ( ) const

Get maximum length of most_likely_identity value.

Returns:
length of most_likely_identity value, can be length of the array or number of maximum number of characters for a string

Definition at line 328 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_num_detections ( ) const

Get maximum length of num_detections value.

Returns:
length of num_detections value, can be length of the array or number of maximum number of characters for a string

Definition at line 258 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_num_identities ( ) const

Get maximum length of num_identities value.

Returns:
length of num_identities value, can be length of the array or number of maximum number of characters for a string

Definition at line 153 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_num_recognitions ( ) const

Get maximum length of num_recognitions value.

Returns:
length of num_recognitions value, can be length of the array or number of maximum number of characters for a string

Definition at line 293 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_opmode ( ) const

Get maximum length of opmode value.

Returns:
length of opmode value, can be length of the array or number of maximum number of characters for a string

Definition at line 118 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_recognized_identity ( ) const

Get maximum length of recognized_identity value.

Returns:
length of recognized_identity value, can be length of the array or number of maximum number of characters for a string

Definition at line 188 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_recognized_name ( ) const

Get maximum length of recognized_name value.

Returns:
length of recognized_name value, can be length of the array or number of maximum number of characters for a string

Definition at line 223 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_recording_progress ( ) const

Get maximum length of recording_progress value.

Returns:
length of recording_progress value, can be length of the array or number of maximum number of characters for a string

Definition at line 509 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_requested_index ( ) const

Get maximum length of requested_index value.

Returns:
length of requested_index value, can be length of the array or number of maximum number of characters for a string

Definition at line 614 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_requested_name ( ) const

Get maximum length of requested_name value.

Returns:
length of requested_name value, can be length of the array or number of maximum number of characters for a string

Definition at line 649 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_sec_since_detection ( ) const

Get maximum length of sec_since_detection value.

Returns:
length of sec_since_detection value, can be length of the array or number of maximum number of characters for a string

Definition at line 400 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_slope ( ) const

Get maximum length of slope value.

Returns:
length of slope value, can be length of the array or number of maximum number of characters for a string

Definition at line 579 of file FacerInterface.cpp.

size_t fawkes::FacerInterface::maxlenof_visibility_history ( ) const

Get maximum length of visibility_history value.

Returns:
length of visibility_history value, can be length of the array or number of maximum number of characters for a string

Definition at line 436 of file FacerInterface.cpp.

bool fawkes::FacerInterface::message_valid ( const Message message) const [virtual]

Check if message is valid and can be enqueued.

Parameters:
messageMessage to check
Returns:
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 1239 of file FacerInterface.cpp.

uint32_t fawkes::FacerInterface::most_likely_identity ( ) const

Get most_likely_identity value.

The identity that was recognized most prevalently.

Returns:
most_likely_identity value

Definition at line 318 of file FacerInterface.cpp.

uint32_t fawkes::FacerInterface::num_detections ( ) const

Get num_detections value.

Number of currently detected faces.

Returns:
num_detections value

Definition at line 248 of file FacerInterface.cpp.

uint32_t fawkes::FacerInterface::num_identities ( ) const

Get num_identities value.

The number of identities in the database.

Returns:
num_identities value

Definition at line 143 of file FacerInterface.cpp.

uint32_t fawkes::FacerInterface::num_recognitions ( ) const

Get num_recognitions value.

Number of recognized faces.

Returns:
num_recognitions value

Definition at line 283 of file FacerInterface.cpp.

FacerInterface::if_facer_opmode_t fawkes::FacerInterface::opmode ( ) const

Get opmode value.

Current opmode.

Returns:
opmode value

Definition at line 108 of file FacerInterface.cpp.

uint32_t fawkes::FacerInterface::recognized_identity ( ) const

Get recognized_identity value.

The index of the recognized identity.

Returns:
recognized_identity value

Definition at line 178 of file FacerInterface.cpp.

char * fawkes::FacerInterface::recognized_name ( ) const

Get recognized_name value.

The name of the recognized identity.

Returns:
recognized_name value

Definition at line 213 of file FacerInterface.cpp.

float fawkes::FacerInterface::recording_progress ( ) const

Get recording_progress value.

Indicates the progress of recording images of a new face.

Returns:
recording_progress value

Definition at line 499 of file FacerInterface.cpp.

uint32_t fawkes::FacerInterface::requested_index ( ) const

Get requested_index value.

Index of the identity for which the name was requested.

Returns:
requested_index value

Definition at line 604 of file FacerInterface.cpp.

char * fawkes::FacerInterface::requested_name ( ) const

Get requested_name value.

Requested name.

Returns:
requested_name value

Definition at line 639 of file FacerInterface.cpp.

float fawkes::FacerInterface::sec_since_detection ( ) const

Get sec_since_detection value.

Time in seconds since the last successful detection.

Returns:
sec_since_detection value

Definition at line 390 of file FacerInterface.cpp.

void fawkes::FacerInterface::set_bearing ( const float  new_bearing)

Set bearing value.

The relative bearing to the recognized face in radians.

Parameters:
new_bearingnew bearing value

Definition at line 556 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_history_ratio ( const float  new_history_ratio)

Set history_ratio value.

The ratio of the most likely identity showing up in the history and the length of the history.

Parameters:
new_history_rationew history_ratio value

Definition at line 377 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_learning_in_progress ( const bool  new_learning_in_progress)

Set learning_in_progress value.

Indicates whether a new identity is currently learnt. If learning is in progress only "old" faces can be recognized.

Parameters:
new_learning_in_progressnew learning_in_progress value

Definition at line 486 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_most_likely_identity ( const uint32_t  new_most_likely_identity)

Set most_likely_identity value.

The identity that was recognized most prevalently.

Parameters:
new_most_likely_identitynew most_likely_identity value

Definition at line 340 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_num_detections ( const uint32_t  new_num_detections)

Set num_detections value.

Number of currently detected faces.

Parameters:
new_num_detectionsnew num_detections value

Definition at line 270 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_num_identities ( const uint32_t  new_num_identities)

Set num_identities value.

The number of identities in the database.

Parameters:
new_num_identitiesnew num_identities value

Definition at line 165 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_num_recognitions ( const uint32_t  new_num_recognitions)

Set num_recognitions value.

Number of recognized faces.

Parameters:
new_num_recognitionsnew num_recognitions value

Definition at line 305 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_opmode ( const if_facer_opmode_t  new_opmode)

Set opmode value.

Current opmode.

Parameters:
new_opmodenew opmode value

Definition at line 130 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_recognized_identity ( const uint32_t  new_recognized_identity)

Set recognized_identity value.

The index of the recognized identity.

Parameters:
new_recognized_identitynew recognized_identity value

Definition at line 200 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_recognized_name ( const char *  new_recognized_name)

Set recognized_name value.

The name of the recognized identity.

Parameters:
new_recognized_namenew recognized_name value

Definition at line 235 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_recording_progress ( const float  new_recording_progress)

Set recording_progress value.

Indicates the progress of recording images of a new face.

Parameters:
new_recording_progressnew recording_progress value

Definition at line 521 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_requested_index ( const uint32_t  new_requested_index)

Set requested_index value.

Index of the identity for which the name was requested.

Parameters:
new_requested_indexnew requested_index value

Definition at line 626 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_requested_name ( const char *  new_requested_name)

Set requested_name value.

Requested name.

Parameters:
new_requested_namenew requested_name value

Definition at line 661 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_sec_since_detection ( const float  new_sec_since_detection)

Set sec_since_detection value.

Time in seconds since the last successful detection.

Parameters:
new_sec_since_detectionnew sec_since_detection value

Definition at line 412 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_slope ( const float  new_slope)

Set slope value.

The relative slope to the recognized face in radians.

Parameters:
new_slopenew slope value

Definition at line 591 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::FacerInterface::set_visibility_history ( const int32_t  new_visibility_history)

Set visibility_history value.

The number of consecutive sighting ( <= 1 ) and non-sightings ( >= -1 ), respectively.

Parameters:
new_visibility_historynew visibility_history value

Definition at line 449 of file FacerInterface.cpp.

References fawkes::Interface::data_changed.

float fawkes::FacerInterface::slope ( ) const

Get slope value.

The relative slope to the recognized face in radians.

Returns:
slope value

Definition at line 569 of file FacerInterface.cpp.

const char * fawkes::FacerInterface::tostring_if_facer_opmode_t ( if_facer_opmode_t  value) const

Convert if_facer_opmode_t constant to string.

Parameters:
valuevalue to convert to string
Returns:
constant value as string.

Definition at line 90 of file FacerInterface.cpp.

int32_t fawkes::FacerInterface::visibility_history ( ) const

Get visibility_history value.

The number of consecutive sighting ( <= 1 ) and non-sightings ( >= -1 ), respectively.

Returns:
visibility_history value

Definition at line 426 of file FacerInterface.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends