digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::IdentityProvider Class Reference

Public Member Functions

Identity addIdentity (const QMultiMap< QString, QString > &attributes)
 Adds a new identity with the specified attributes.
 
Identity addIdentityDebug (const QMultiMap< QString, QString > &attributes)
 This is the debug version of addIdentity, so the identity is only added to identityCache, but not into the recognition database.
 
int addTraining (const Identity &identity, const QString &hash, const cv::Mat &feature)
 add the face features and hash to the recognition DB returns the ID of the new row
 
QList< IdentityallIdentities () const
 Returns all identities known to the database.
 
void clearAllTraining ()
 clears all identites and face training from the recognition DB
 
bool clearTraining (const QString &hash)
 Deletes the training image for the given hash, leaving the identity as such in the database.
 
void deleteIdentities (QList< Identity > identitiesToBeDeleted)
 Deletes a list of identities from the database.
 
void deleteIdentity (const Identity &identityToBeDeleted)
 Deletes an identity from the database.
 
Identity findIdentity (const QMultiMap< QString, QString > &attributes) const
 Finds the identity matching the given attributes.
 
Identity findIdentity (const QString &attribute, const QString &value) const
 Finds the first identity with matching attribute - value.
 
Identity identity (int id) const
 
bool integrityCheck ()
 Checks the integrity and returns true if everything is fine.
 
bool isValidId (int label) const
 checks if the id exists in the recognition DB
 
void vacuum ()
 Shrinks the database.
 

Static Public Member Functions

static IdentityProviderinstance ()
 

Protected Member Functions

bool addIdentityFace (const Identity &identity, QString &hash, cv::Mat embedding)
 
bool deleteIdentityFace (const Identity &identity, QString &hash)
 
cv::Ptr< cv::ml::TrainData > getTrainingData () const
 Deletes a list of identities from the database.
 
bool initialize ()
 

Friends

class FaceClassifier
 
class Identity
 
class IdentityProviderCreator
 

Member Function Documentation

◆ addIdentity()

Identity Digikam::IdentityProvider::addIdentity ( const QMultiMap< QString, QString > &  attributes)

Please note that a UUID is automatically generated.

◆ findIdentity() [1/2]

Identity Digikam::IdentityProvider::findIdentity ( const QMultiMap< QString, QString > &  attributes) const

Attributes are first checked with knowledge of their meaning. Secondly, all unknown attributes are used. Returns a null Identity if no match is possible or the map is empty.

◆ findIdentity() [2/2]

Identity Digikam::IdentityProvider::findIdentity ( const QString &  attribute,
const QString &  value 
) const

Returns a null identity if no match is found or attribute is empty.