Documentation>C API
vlad.c File Reference

VLAD - Declaration. More...

#include "vlad.h"
#include "mathop.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

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

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