Open
Description
Possible minor refactoring to improve the recognition rate.
Testing Result
Playing around with whether a duplicate fingerprint hash is processed produced an unexpected improvement in the recognition rate when duplicate fingerprints are not considered. However, this might not suit all use cases for the query algorithm.
Suggestion
Add a boolean flag to allow duplicate fingerprints or not. See pseudocode below:
//query
for(PanakoFingerprint print : prints) {
long hash = print.hash();
hashNotADuplicate = // add duplicate logic
if(allowDuplicates || hashNotADuplicate) {
db.addToQueryQueue(hash);
}
printMap.put(hash, print);
}