Documentation>C API
Functions
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.

## 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

  enc | output VLAD encoding (out).
  dataType | the type of the input data (VL_TYPE_DOUBLE or VL_TYPE_FLOAT).
  numData | number of data vectors to encode.
  means | cluster means.
  numClusters | number of clusters.
  data | the data vectors to encode.
  dimension | dimensionality of the data.
  assignments | data to cluster soft assignments.
  flags | options.

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