Debian Codegraph @

src/thirdparty/VLFeat/liop.h

raw
1 /** @file liop.h
2 ** @brief Local Intensity Order Pattern (LIOP) descriptor (@ref liop)
3 ** @author Hana Sarbortova
4 ** @author Andrea Vedaldi
5 ** @see @ref liop
6 **/
7
8 /*
9 Copyright (C) 2013 Hana Sarbortova 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_LIOP_H
17 #define VL_LIOP_H
18
19 #include "generic.h"
20
21 /** @brief LIOP descriptor extractor object */
22 typedef struct _VlLiopDesc
23 {
24 vl_int numNeighbours; /**< Number of neighbours. */
25 vl_int numSpatialBins; /**< Number of bins. */
26 float intensityThreshold; /**< Weight threshold. */
27 vl_size dimension; /**< LIOP descriptor size. */
28
29 /* Pixels in the circular patch */
30 vl_size patchSideLength ;
31 vl_size patchSize ; /* only circular neighbourhood */
32 vl_uindex * patchPixels ;
33 float * patchIntensities ;
34 vl_uindex * patchPermutation ;
35
36 /* Neighbourhoods of each pixel (samples in a circle) */
37 float neighRadius; /**< Point to neighbour radius (distance). */
38
39 float * neighIntensities ;
40 vl_uindex * neighPermutation ;
41 double * neighSamplesX ;
42 double * neighSamplesY ;
43
44 } VlLiopDesc ;
45
46 /** @name Construct and destroy
47 ** @{ */
48 VL_EXPORT
49 VlLiopDesc * vl_liopdesc_new (vl_int numNeighbours,
50 vl_int numSpatialBins,
51 float radius,
52 vl_size sideLength) ;
53
54 VL_EXPORT
55 VlLiopDesc * vl_liopdesc_new_basic (vl_size sideLength) ;
56
57 VL_EXPORT
58 void vl_liopdesc_delete (VlLiopDesc * self) ;
59 /** @} */
60
61 /** @name Get data and parameters
62 ** @{ */
63 VL_EXPORT vl_size vl_liopdesc_get_dimension (VlLiopDesc const * self) ;
64 VL_EXPORT vl_size vl_liopdesc_get_num_neighbours (VlLiopDesc const * self) ;
65 VL_EXPORT float vl_liopdesc_get_intensity_threshold (VlLiopDesc const * self) ;
66 VL_EXPORT vl_size vl_liopdesc_get_num_spatial_bins (VlLiopDesc const * self) ;
67 VL_EXPORT double vl_liopdesc_get_neighbourhood_radius (VlLiopDesc const * self) ;
68 VL_EXPORT void vl_liopdesc_set_intensity_threshold (VlLiopDesc * self, float x) ;
69 /** @} */
70
71 /** @name Compute LIOP descriptor
72 ** @{ */
73 VL_EXPORT
74 void vl_liopdesc_process (VlLiopDesc * liop, float * desc, float const * patch) ;
75 /** @} */
76
77 /* VL_LIOP_H */
78 #endif