Class HogHashAngularEncoded
- java.lang.Object
-
- dev.brachtendorf.jimagehash.hashAlgorithms.HashingAlgorithm
-
- dev.brachtendorf.jimagehash.hashAlgorithms.experimental.HogHash
-
- dev.brachtendorf.jimagehash.hashAlgorithms.experimental.HogHashAngularEncoded
-
- All Implemented Interfaces:
Serializable
public class HogHashAngularEncoded extends HogHash
Deprecated.not ready to use yet- Since:
- 2.0.0
- Author:
- Kilian
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class dev.brachtendorf.jimagehash.hashAlgorithms.experimental.HogHash
cellWidth, height, numBins, width, xCells, yCells
-
Fields inherited from class dev.brachtendorf.jimagehash.hashAlgorithms.HashingAlgorithm
bitResolution, immutableState, keyResolution, opaqueReplacementColor, opaqueReplacementThreshold, preProcessing
-
-
Constructor Summary
Constructors Constructor Description HogHashAngularEncoded(int bitResolution)Deprecated.* Create a hog hasher with the target bit resolution.HogHashAngularEncoded(int width, int height, int cellWidth, int numBins)Deprecated.Create a hog hasher with parameters specific to the hog feature detection algorithm.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected BigIntegerhash(BufferedImage image, HashBuilder hash)Deprecated.Calculate a hash for the given image.-
Methods inherited from class dev.brachtendorf.jimagehash.hashAlgorithms.experimental.HogHash
blockNormalization, computeHogFeatures, precomputeAlgoId, toImage, toImage, toString
-
Methods inherited from class dev.brachtendorf.jimagehash.hashAlgorithms.HashingAlgorithm
addFilter, algorithmId, createAlgorithmSpecificHash, createPixelAccessor, equals, getKeyResolution, getOpaqueReplacementColor, getOpaqueReplacementThreshold, hash, hash, hash, hash, hashCode, removeFilter, setOpaqueHandling, setOpaqueHandling
-
-
-
-
Constructor Detail
-
HogHashAngularEncoded
public HogHashAngularEncoded(int bitResolution)
Deprecated.* Create a hog hasher with the target bit resolution. Default values of 4 bins per cell (0°,45°,90°,135°) and a cell width of 2 pixels per cell are assumed.- Parameters:
bitResolution- the bit resolution of the final hash. The hash will be at least the specified bits but may be bigger due to algorithmic constraints. The best attempt is made to return a hash with the given number of bits.
-
HogHashAngularEncoded
public HogHashAngularEncoded(int width, int height, int cellWidth, int numBins)Deprecated.Create a hog hasher with parameters specific to the hog feature detection algorithm. The actual hash will have a key length of(width / cellWidth) * (height / cellWidth) * numBins- Parameters:
width- of the rescaled imageheight- of the rescaled imagecellWidth- the width and height of sub cell. For each cell a gradient will be computed. The cell width has to be a divisor of width AND height!numBins- the number of bins per cell. The number of bins represent the angular granularity the gradients will be sorted into. The gradients will be sorted into buckets equivalent of the size of 180°/numBins- Throws:
IllegalArgumentException- if width or height can't be divided by cellWidth or if any of the arguments is smaller or equal 0
-
-
Method Detail
-
hash
protected BigInteger hash(BufferedImage image, HashBuilder hash)
Deprecated.Description copied from class:HashingAlgorithmCalculate a hash for the given image. Invoking the hash function on the same image has to return the same hash value. A comparison of the hashes relates to the similarity of the images. The lower the value the more similar the images are. Equal images will produce a similarity of 0.This method is intended to be overwritten by implementations and takes a baseHash argument to allow concatenating multiple hashes as well to be able to compute the effective hash length in
HashingAlgorithm.getKeyResolution(). Preceding 0's are omitted in big integer objects, while the usual hamming distance can be calculated due to xoring without issue the normalized distance requires the potential length of the key to be known.
-
-