Class PlainImageMatcher
- java.lang.Object
-
- dev.brachtendorf.jimagehash.matcher.PlainImageMatcher
-
- Direct Known Subclasses:
AbstractCategoricalMatcher,BloomFilter,RandomForestCategorizer
public class PlainImageMatcher extends Object
Image matchers are a collection of classes bundling the hashing operation of one or multipleHashingAlgorithmstogether and usually exposing functionalities to compare multiple images with each other.PlainImage matchers accept hashing algorithms with no further configuration arguments.
- Since:
- 3.0.0
- Author:
- Kilian
- See Also:
TypedImageMatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkedHashSet<HashingAlgorithm>steps
-
Constructor Summary
Constructors Constructor Description PlainImageMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddHashingAlgorithm(HashingAlgorithm hashingAlgorithm)Append a new hashing algorithm to be used by this matcher.voidclearHashingAlgorithms()Remove all hashing algorithms used by this image matcher instance.booleanequals(Object obj)Set<HashingAlgorithm>getAlgorithms()inthashCode()booleanremoveHashingAlgorithm(HashingAlgorithm hashingAlgorithm)Remove a hashing algorithm from this matcher.
-
-
-
Field Detail
-
steps
protected LinkedHashSet<HashingAlgorithm> steps
-
-
Method Detail
-
addHashingAlgorithm
public boolean addHashingAlgorithm(HashingAlgorithm hashingAlgorithm)
Append a new hashing algorithm to be used by this matcher. The same algorithm may only be added once. Attempts to add the same algorithm twice is a NOP.For some matchers the order of added hashing algorithms is crucial. The order the hashes are added is preserved.
- Parameters:
hashingAlgorithm- The algorithms to be added- Returns:
- true if the algorithm was added, false if it was already present
-
removeHashingAlgorithm
public boolean removeHashingAlgorithm(HashingAlgorithm hashingAlgorithm)
Remove a hashing algorithm from this matcher.- Parameters:
hashingAlgorithm- The algorithms to be removed- Returns:
- true if the algorithm was removed, false if it was not present.
-
clearHashingAlgorithms
public void clearHashingAlgorithms()
Remove all hashing algorithms used by this image matcher instance. At least one algorithm has to be supplied before images can be processed
-
getAlgorithms
public Set<HashingAlgorithm> getAlgorithms()
- Returns:
- an unmofifiable collection of the hashing algorithms added to this matcher.
-
-