diff --git a/openbr/core/cluster.cpp b/openbr/core/cluster.cpp index 9e87b44..44f196a 100644 --- a/openbr/core/cluster.cpp +++ b/openbr/core/cluster.cpp @@ -25,13 +25,12 @@ #include "openbr/core/bee.h" #include "openbr/core/cluster.h" +#include "openbr/plugins/openbr_internal.h" -typedef QPair Neighbor; // QPair -typedef QList Neighbors; -typedef QVector Neighborhood; +using namespace br; // Compare function used to order neighbors from highest to lowest similarity -static bool compareNeighbors(const Neighbor &a, const Neighbor &b) +bool br::compareNeighbors(const Neighbor &a, const Neighbor &b) { if (a.second == b.second) return a.first < b.first; diff --git a/openbr/core/core.cpp b/openbr/core/core.cpp index ce4e3bd..7926b68 100644 --- a/openbr/core/core.cpp +++ b/openbr/core/core.cpp @@ -715,6 +715,11 @@ void br::Deduplicate(const File &inputGallery, const File &outputGallery, const else qFatal("Unable to convert deduplication threshold to float."); } +QSharedPointer br::Transform::fromComparison(const QString &algorithm) +{ + return AlgorithmManager::getAlgorithm(algorithm)->comparison; +} + QSharedPointer br::Transform::fromAlgorithm(const QString &algorithm, bool preprocess) { if (!preprocess) diff --git a/openbr/openbr_plugin.h b/openbr/openbr_plugin.h index a4bde4c..76566ba 100644 --- a/openbr/openbr_plugin.h +++ b/openbr/openbr_plugin.h @@ -461,9 +461,9 @@ struct TemplateList : public QList