Documentation>C API
vlad.h File Reference

VLAD encoding (Vector of Locally Aggregated Descriptors (VLAD) encoding) More...

#include "generic.h"

Macros

VLAD options
#define VL_VLAD_FLAG_NORMALIZE_COMPONENTS   (0x1 << 0)
 Normalize each VLAD component individually.
 
#define VL_VLAD_FLAG_SQUARE_ROOT   (0x1 << 1)
 Use signed squared-root.
 
#define VL_VLAD_FLAG_UNNORMALIZED   (0x1 << 2)
 Do not globally normalize the VLAD descriptor.
 
#define VL_VLAD_FLAG_NORMALIZE_MASS   (0x1 << 3)
 Normalize each component by the number of features assigned to it.
 

Functions

void vl_vlad_encode (void *enc, vl_type dataType, void const *means, vl_size dimension, vl_size numClusters, void const *data, vl_size numData, void const *assignments, int flags)
 VLAD encoding of a set of vectors. More...
 

Detailed Description

Author
David Novotny
Andrea Vedaldi
See also
Vector of Locally Aggregated Descriptors (VLAD) encoding

Function Documentation

◆ vl_vlad_encode()

void vl_vlad_encode ( void *  enc,
vl_type  dataType,
void const *  means,
vl_size  dimension,
vl_size  numClusters,
void const *  data,
vl_size  numData,
void const *  assignments,
int  flags 
)
Parameters
encoutput VLAD encoding (out).
dataTypethe type of the input data (VL_TYPE_DOUBLE or VL_TYPE_FLOAT).
numDatanumber of data vectors to encode.
meanscluster means.
numClustersnumber of clusters.
datathe data vectors to encode.
dimensiondimensionality of the data.
assignmentsdata to cluster soft assignments.
flagsoptions.

enc is the VLAD vector of size numClusters by dimension. means is a matrix with numClusters columns and dimension rows. data is the matrix of vectors to be encoded, with dimension rows and numData columns. assignments is a matrix with numClusters rows and numData columns. All the matrices should be stored in column-major order.

flag allows controlling further options: VL_VLAD_FLAG_NORMALIZE_COMPONENTS, VL_VLAD_FLAG_SQUARE_ROOT, VL_VLAD_FLAG_UNNORMALIZED, and VL_VLAD_FLAG_NORMALIZE_MASS.

See also
Vector of Locally Aggregated Descriptors (VLAD) encoding