the database that contains all object and class relations and models of the vision system More...
#include <SignatureDB.h>
the database that contains all object and class relations and models of the vision system
class SignatureDB
Definition at line 59 of file SignatureDB.h.
SignatureDB::SignatureDB | ( | XMLTag * | config | ) |
Empty Constructor
char* | with an error message in case of failure |
Definition at line 66 of file SignatureDB.cpp.
SignatureDB::~SignatureDB | ( | ) | [virtual] |
Empty Destructor
Definition at line 153 of file SignatureDB.cpp.
int SignatureDB::AddClass | ( | std::string | stname, |
int | id | ||
) |
Definition at line 363 of file SignatureDB.cpp.
int SignatureDB::AddSignature | ( | Signature * | sig | ) |
Adds a signature to the database, an index will be created for all related classes
Definition at line 201 of file SignatureDB.cpp.
void SignatureDB::AddSignatures | ( | std::vector< Results_t > | matches | ) |
Definition at line 247 of file SignatureDB.cpp.
void SignatureDB::AddSignatureToActiveList | ( | Signature * | sig, |
int | index | ||
) | [protected] |
AddSignatureToActiveList Adds a signature to the list of currenty active signatures and maps it to the index
Definition at line 278 of file SignatureDB.cpp.
bool SignatureDB::Check | ( | ObjectID_t | sigID, |
int & | error | ||
) | const |
Check if this ID is already in the DB
Definition at line 680 of file SignatureDB.cpp.
std::string SignatureDB::CheckClass | ( | ObjectID_t | id | ) |
Definition at line 593 of file SignatureDB.cpp.
ObjectID_t SignatureDB::CheckClass | ( | std::string | name | ) |
Definition at line 580 of file SignatureDB.cpp.
void SignatureDB::CleanUpActiveSignatureList | ( | ) | [protected] |
CleanUpActiveSignatureList deletes all old signatures in the active Signature List
Definition at line 336 of file SignatureDB.cpp.
void SignatureDB::CompleteSignature | ( | Signature * | sig_max, |
std::vector< ObjectID_t > | class_ids | ||
) |
Add known Descriptior
Definition at line 392 of file SignatureDB.cpp.
Definition at line 717 of file SignatureDB.cpp.
void SignatureDB::EvaluatePerceptionPrimitive | ( | PerceptionPrimitiveID_t | id, |
double | value, | ||
double | weight, | ||
std::vector< ObjectID_t > | blacklist | ||
) |
TODO Check if the PP should continue existing.
Definition at line 724 of file SignatureDB.cpp.
Elem * SignatureDB::FindCreateDescriptor | ( | ObjectID_t | class_id | ) |
Definition at line 496 of file SignatureDB.cpp.
void SignatureDB::FreeActiveSignature | ( | Signature * | sig | ) |
Free Active Signature Marks a signature for later delete
Definition at line 558 of file SignatureDB.cpp.
Class * SignatureDB::GetClassByID | ( | ObjectID_t | id | ) |
Definition at line 571 of file SignatureDB.cpp.
std::vector< std::pair< PerceptionPrimitiveID_t, PerceptionPrimitiveState > > SignatureDB::GetCurrentRunState | ( | ) |
Definition at line 807 of file SignatureDB.cpp.
int SignatureDB::GetElemIdByClass | ( | ObjectID_t | ClassID, |
int | index = 0 |
||
) | [private] |
Helping function to get the first element connected with a class
Definition at line 604 of file SignatureDB.cpp.
Signature * SignatureDB::GetSignature | ( | std::vector< ObjectID_t > | class_ids | ) |
Get a signature for the given class
Check this signature for containing more of the given classes
Keep the best signature
Copy the best
if there was no signature, put all classes to a new sig
Returning the best
Definition at line 431 of file SignatureDB.cpp.
Signature * SignatureDB::GetSignatureByClass | ( | ObjectID_t | ClassID, |
int | index = 0 |
||
) |
Direct request for an class
Definition at line 622 of file SignatureDB.cpp.
Signature* cop::SignatureDB::GetSignatureByClass | ( | std::string | className, |
int | index = 0 |
||
) | [inline] |
Definition at line 118 of file SignatureDB.h.
Signature * SignatureDB::GetSignatureByID | ( | ObjectID_t | ElemID | ) |
Direct request for an element
Definition at line 355 of file SignatureDB.cpp.
Signature * SignatureDB::GetSignatureByIndex | ( | unsigned int | index | ) | [protected] |
Definition at line 305 of file SignatureDB.cpp.
XMLTag * SignatureDB::Query | ( | std::string | stQueryString | ) |
Answers any queryx to the cop model database, pass class name or id as string
Definition at line 648 of file SignatureDB.cpp.
XMLTag * SignatureDB::Save | ( | ) |
Definition at line 630 of file SignatureDB.cpp.
void SignatureDB::SetClassSignature | ( | ObjectID_t | idClass, |
ObjectID_t | idObject | ||
) | [private] |
Definition at line 285 of file SignatureDB.cpp.
void SignatureDB::SetNewObjectCallback | ( | Comm * | comm, |
bool | wait_for_new = true |
||
) |
Definition at line 537 of file SignatureDB.cpp.
void SignatureDB::UpdateIDList | ( | ) | [protected] |
Definition at line 695 of file SignatureDB.cpp.
void SignatureDB::UpdateNodes | ( | Signature * | sig, |
int | index | ||
) |
Definition at line 291 of file SignatureDB.cpp.
std::map<int, int> cop::SignatureDB::m_activeMap [private] |
Definition at line 244 of file SignatureDB.h.
std::vector<std::pair<std::string, ObjectID_t> > cop::SignatureDB::m_classes [private] |
Definition at line 241 of file SignatureDB.h.
std::map<ObjectID_t, std::vector<ObjectID_t> > cop::SignatureDB::m_classToSignature [private] |
Definition at line 245 of file SignatureDB.h.
std::vector<std::pair<Signature*, int> > cop::SignatureDB::m_currentlyActiveSignatures [private] |
Definition at line 243 of file SignatureDB.h.
XMLTag* cop::SignatureDB::m_dbStarter [private] |
Definition at line 235 of file SignatureDB.h.
std::vector<ObjectID_t> cop::SignatureDB::m_ids [private] |
Definition at line 240 of file SignatureDB.h.
XMLTag* cop::SignatureDB::m_index [private] |
Definition at line 236 of file SignatureDB.h.
std::vector<Comm*> cop::SignatureDB::m_newObjectSubscriber [private] |
Definition at line 238 of file SignatureDB.h.
std::map<PerceptionPrimitiveID_t, PerceptionPrimitive*> cop::SignatureDB::m_ppMap [private] |
Definition at line 246 of file SignatureDB.h.