You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB

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