![]() |
digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
|
Public Member Functions | |
void | clearImageSimilarity (FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
This method removes all image similarity entries for the algorithm. | |
void | copySimilarityAttributes (qlonglong srcId, qlonglong destId) |
Copies all similarity-specific information, from image srcId to destId. | |
QList< qlonglong > | getDirtyOrMissingFingerprints (const QList< ItemInfo > &imageInfos, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
Returns a list of all item ids (images, videos,...) where either no fingerprint for the given algorithm exists or is outdated because the file is identified as changed since the generation of the fingerprint. | |
QStringList | getDirtyOrMissingFingerprintURLs (const QList< ItemInfo > &imageInfos, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
Returns a list of the URLs of all items (images, videos,...) where either no fingerprint for the given algorithm exists or is outdated because the file is identified as changed since the generation of the fingerprint. | |
double | getImageSimilarity (qlonglong imageID1, qlonglong imageID2, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
Returns the similarity value for two images. | |
QList< FuzzyAlgorithm > | getImageSimilarityAlgorithms (qlonglong imageID1, qlonglong imageID2) |
Returns the algorithms for which a similarity value exists for the given image ids. | |
QString | getLegacySetting (const QString &keyword) |
Returns the legacy settings with the keyword name. | |
QString | getSetting (const QString &keyword) |
Returns the setting with the keyword name. | |
bool | hasDirtyOrMissingFingerprint (const ItemInfo &imageInfo, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) const |
Checks if the given image has a dirty fingerprint or even none for the given algorithm. | |
bool | hasFingerprint (qlonglong imageId, FuzzyAlgorithm algorithm) const |
This method checks if the given image has a fingerprint for the given algorithm. | |
bool | hasFingerprints () |
This method checks if there are any fingerprints for any algorithm present. | |
bool | hasFingerprints (FuzzyAlgorithm algorithm) const |
This method checks if there are any fingerprints for the given algorithm. | |
bool | integrityCheck () |
This method checks the integrity of the similarity database. | |
QSet< qlonglong > | registeredImageIds () const |
This method returns all image ids that are present in the similarity db tables. | |
void | removeImageFingerprint (qlonglong imageID, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
This method removes the fingerprint entry for the given imageId and algorithm. | |
void | removeImageSimilarity (qlonglong imageID, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
This method removes the image similarity entries for the imageID and algorithm. | |
void | removeImageSimilarity (qlonglong imageID1, qlonglong imageID2, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
This method removes the image similarity entry for the imageIDs and algorithm. | |
void | setImageSimilarity (qlonglong imageID1, qlonglong imageID2, double value, FuzzyAlgorithm algorithm=FuzzyAlgorithm::Haar) |
bool | setSetting (const QString &keyword, const QString &value) |
Set the database setting entry given by keyword to the given value. | |
void | vacuum () |
This method shrinks the database. | |
Friends | |
class | SimilarityDbAccess |
void Digikam::SimilarityDb::clearImageSimilarity | ( | FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar | ) |
algorithm | The algorithm. |
QList< qlonglong > Digikam::SimilarityDb::getDirtyOrMissingFingerprints | ( | const QList< ItemInfo > & | imageInfos, |
FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar |
||
) |
imageInfos | The image info objects representing the items. |
algorithm | The algorithm. |
QStringList Digikam::SimilarityDb::getDirtyOrMissingFingerprintURLs | ( | const QList< ItemInfo > & | imageInfos, |
FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar |
||
) |
imageInfos | The image info objects representing the items. |
algorithm | The algorithm. |
double Digikam::SimilarityDb::getImageSimilarity | ( | qlonglong | imageID1, |
qlonglong | imageID2, | ||
FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar |
||
) |
A value of -1 means nonexistence. A value of -2 means that there is a value that cannot be converted into a double
QList< FuzzyAlgorithm > Digikam::SimilarityDb::getImageSimilarityAlgorithms | ( | qlonglong | imageID1, |
qlonglong | imageID2 | ||
) |
imageID1 | The first image id. |
imageID2 | The second image id. |
QString Digikam::SimilarityDb::getLegacySetting | ( | const QString & | keyword | ) |
keyword | The setting entry name. |
QString Digikam::SimilarityDb::getSetting | ( | const QString & | keyword | ) |
keyword | The setting entry name. |
bool Digikam::SimilarityDb::hasDirtyOrMissingFingerprint | ( | const ItemInfo & | imageInfo, |
FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar |
||
) | const |
imageInfo | The image info object representing the item. |
algorithm | The algorithm used for the fingerprint. |
bool Digikam::SimilarityDb::hasFingerprint | ( | qlonglong | imageId, |
FuzzyAlgorithm | algorithm | ||
) | const |
imageId | The Id of the image to check. |
algorithm | The algorithm. |
bool Digikam::SimilarityDb::hasFingerprints | ( | ) |
bool Digikam::SimilarityDb::hasFingerprints | ( | FuzzyAlgorithm | algorithm | ) | const |
algorithm | The algorithm. |
bool Digikam::SimilarityDb::integrityCheck | ( | ) |
QSet< qlonglong > Digikam::SimilarityDb::registeredImageIds | ( | ) | const |
void Digikam::SimilarityDb::removeImageFingerprint | ( | qlonglong | imageID, |
FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar |
||
) |
Also, this automatically removes the entries in the ImageSimilarities table for the given algorithm and image id.
imageID | The image id. |
algorithm | The algorithm. |
void Digikam::SimilarityDb::removeImageSimilarity | ( | qlonglong | imageID, |
FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar |
||
) |
imageID | The image id. |
algorithm | The algorithm. |
void Digikam::SimilarityDb::removeImageSimilarity | ( | qlonglong | imageID1, |
qlonglong | imageID2, | ||
FuzzyAlgorithm | algorithm = FuzzyAlgorithm::Haar |
||
) |
imageID1 | The first image id. |
imageID2 | The second image id. |
algorithm | The algorithm. |
bool Digikam::SimilarityDb::setSetting | ( | const QString & | keyword, |
const QString & | value | ||
) |
keyword | The keyword, i.e. setting name. |
value | The value. |