vector_aggregation
Class BowAggregator
java.lang.Object
vector_aggregation.AbstractFeatureAggregator
vector_aggregation.BowAggregator
public class BowAggregator
- extends AbstractFeatureAggregator
This class computes raw BOW vectors. The produced vectors should be (optionally) power and L2 normalized
afterwards.
- Author:
- Eleftherios Spyromitros-Xioufis
Field Summary |
private int |
k
The number of centroids where each descriptor is quantized. |
Method Summary |
protected double[] |
aggregateInternal(java.util.ArrayList<double[]> descriptors)
This method should be overridden by all aggregators. |
protected double[] |
aggregateInternal(double[][] descriptors)
This method should be overridden by all aggregators. |
int |
getVectorLength()
Should compute and return the length of the generated vector. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
k
private int k
- The number of centroids where each descriptor is quantized. Default = 1 means hard quantization.
BowAggregator
public BowAggregator(double[][] codebook)
BowAggregator
public BowAggregator(double[][] codebook,
int k)
aggregateInternal
protected double[] aggregateInternal(double[][] descriptors)
throws java.lang.Exception
- Description copied from class:
AbstractFeatureAggregator
- This method should be overridden by all aggregators.
- Specified by:
aggregateInternal
in class AbstractFeatureAggregator
- Returns:
-
- Throws:
java.lang.Exception
aggregateInternal
protected double[] aggregateInternal(java.util.ArrayList<double[]> descriptors)
throws java.lang.Exception
- Description copied from class:
AbstractFeatureAggregator
- This method should be overridden by all aggregators.
- Specified by:
aggregateInternal
in class AbstractFeatureAggregator
- Returns:
-
- Throws:
java.lang.Exception
getVectorLength
public int getVectorLength()
- Description copied from class:
AbstractFeatureAggregator
- Should compute and return the length of the generated vector.
- Specified by:
getVectorLength
in class AbstractFeatureAggregator
- Returns: