| 1 |
/** @file fisher.h |
| 2 |
** @brief Fisher encoding (@ref fisher) |
| 3 |
** @author David Novotny |
| 4 |
** @author Andrea Vedaldi |
| 5 |
** @see @ref fisher |
| 6 |
**/ |
| 7 |
|
| 8 |
/* |
| 9 |
Copyright (C) 2013 David Novotny and Andrea Vedaldi. |
| 10 |
All rights reserved. |
| 11 |
|
| 12 |
This file is part of the VLFeat library and is made available under |
| 13 |
the terms of the BSD license (see the COPYING file). |
| 14 |
*/ |
| 15 |
|
| 16 |
#ifndef VL_FISHER_H |
| 17 |
#define VL_FISHER_H |
| 18 |
|
| 19 |
#include "generic.h" |
| 20 |
|
| 21 |
/** @name Fisher vector options |
| 22 |
** @{ */ |
| 23 |
#define VL_FISHER_FLAG_SQUARE_ROOT (0x1 << 0) |
| 24 |
#define VL_FISHER_FLAG_NORMALIZED (0x1 << 1) |
| 25 |
#define VL_FISHER_FLAG_IMPROVED (VL_FISHER_FLAG_NORMALIZED|VL_FISHER_FLAG_SQUARE_ROOT) |
| 26 |
#define VL_FISHER_FLAG_FAST (0x1 << 2) |
| 27 |
|
| 28 |
/** @def VL_FISHER_FLAG_SQUARE_ROOT |
| 29 |
** @brief Use signed squared-root (@ref fisher-normalization). |
| 30 |
**/ |
| 31 |
|
| 32 |
/** @def VL_FISHER_FLAG_NORMALIZED |
| 33 |
** @brief Gobally normalize the Fisher vector in L2 norm (@ref fisher-normalization). |
| 34 |
**/ |
| 35 |
|
| 36 |
/** @def VL_FISHER_FLAG_IMPROVED |
| 37 |
** @brief Improved Fisher vector. |
| 38 |
** This is the same as @c VL_FISHER_FLAG_SQUARE_ROOT|VL_FISHER_FLAG_NORMALIZED. |
| 39 |
**/ |
| 40 |
|
| 41 |
/** @def VL_FISHER_FLAG_FAST |
| 42 |
** @brief Fast but more approximate calculations (@ref fisher-fast). |
| 43 |
** Keep only the larges data to cluster assignment (posterior). |
| 44 |
**/ |
| 45 |
|
| 46 |
/** @} */ |
| 47 |
|
| 48 |
VL_EXPORT vl_size vl_fisher_encode |
| 49 |
(void * enc, vl_type dataType, |
| 50 |
void const * means, vl_size dimension, vl_size numClusters, |
| 51 |
void const * covariances, |
| 52 |
void const * priors, |
| 53 |
void const * data, vl_size numData, |
| 54 |
int flags) ; |
| 55 |
|
| 56 |
/* VL_FISHER_H */ |
| 57 |
#endif |