vector_aggregation
Class VladAggregatorMean

java.lang.Object
  extended by vector_aggregation.AbstractFeatureAggregator
      extended by vector_aggregation.VladAggregatorMean

public class VladAggregatorMean
extends AbstractFeatureAggregator

This class computes raw VLAD vectors with mean instead of sum aggregation. The produced vectors should be power and L2 normalized afterwards.

Author:
Eleftherios Spyromitros-Xioufis

Field Summary
 
Fields inherited from class vector_aggregation.AbstractFeatureAggregator
codebook, descriptorLength, numCentroids, vectorLength
 
Constructor Summary
VladAggregatorMean(double[][] codebook)
          The default constructor calls the super constructor.
 
Method Summary
 double[] aggregateInternal(java.util.ArrayList<double[]> descriptors)
          Takes as input an ArrayList of double arrays which contains the set of local descriptors for an image.
 double[] aggregateInternal(double[][] descriptors)
          Takes as input 2-dimensional double array which contains the set of local descriptors for an image.
 int getVectorLength()
          Should compute and return the length of the generated vector.
 
Methods inherited from class vector_aggregation.AbstractFeatureAggregator
aggregate, aggregate, computeKNearestCentroids, computeNearestCentroid, computeNearestCentroidIndexAndDistance, getDescriptorLength, getNumCentroids, readCodebookFile, setDescriptorLength, setNumCentroids
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VladAggregatorMean

public VladAggregatorMean(double[][] codebook)
The default constructor calls the super constructor.

Parameters:
codebook -
Method Detail

aggregateInternal

public double[] aggregateInternal(double[][] descriptors)
Takes as input 2-dimensional double array which contains the set of local descriptors for an image. Returns the VLAD vector representation of the image using the codebook supplied in the constructor.

Specified by:
aggregateInternal in class AbstractFeatureAggregator
Parameters:
descriptors -
Returns:
Throws:
java.lang.Exception

aggregateInternal

public double[] aggregateInternal(java.util.ArrayList<double[]> descriptors)
Takes as input an ArrayList of double arrays which contains the set of local descriptors for an image. Returns the VLAD vector representation of the image using the codebook supplied in the constructor.

Specified by:
aggregateInternal in class AbstractFeatureAggregator
Parameters:
descriptors -
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: