Defines | Functions
liop.c File Reference

Local Intensity Order Pattern (LIOP) descriptor - Definition. More...

#include "liop.h"
#include "mathop.h"
#include "imopv.h"
#include <string.h>
#include "qsort-def.h"
Include dependency graph for liop.c:

Go to the source code of this file.

Defines

#define DEFAULT_INTENSITY_THRESHOLD   -(5.0/255)
#define DEFAULT_NUM_NEIGHBOURS   4
#define DEFAULT_NUM_SPATIAL_BINS   6
#define DEFAULT_RADIUS   6.0
#define VL_QSORT_array   VlLiopDesc*
#define VL_QSORT_array   VlLiopDesc*
#define VL_QSORT_cmp   patch_cmp
#define VL_QSORT_cmp   neigh_cmp
#define VL_QSORT_prefix   patch
#define VL_QSORT_prefix   neigh
#define VL_QSORT_swap   patch_swap
#define VL_QSORT_swap   neigh_swap

Functions

static vl_int factorial (vl_int num)
VL_INLINE vl_index get_permutation_index (vl_uindex *permutation, vl_size size)
VL_INLINE float neigh_cmp (VlLiopDesc *liop, vl_index i, vl_index j)
VL_INLINE void neigh_swap (VlLiopDesc *liop, vl_index i, vl_index j)
VL_INLINE float patch_cmp (VlLiopDesc *liop, vl_index i, vl_index j)
VL_INLINE void patch_swap (VlLiopDesc *liop, vl_index i, vl_index j)
void vl_liopdesc_delete (VlLiopDesc *self)
 Delete object instance.
vl_size vl_liopdesc_get_dimension (VlLiopDesc const *self)
 Get the dimension of a LIOP descriptor.
float vl_liopdesc_get_intensity_threshold (VlLiopDesc const *self)
 Get the intensity threshold.
double vl_liopdesc_get_neighbourhood_radius (VlLiopDesc const *self)
 Get the neighbourhood radius.
vl_size vl_liopdesc_get_num_neighbours (VlLiopDesc const *self)
 Get the number of neighbours.
vl_size vl_liopdesc_get_num_spatial_bins (VlLiopDesc const *self)
 Get the number of spatial bins.
VlLiopDescvl_liopdesc_new (vl_int numNeighbours, vl_int numSpatialBins, float radius, vl_size sideLength)
 Create a new LIOP object instance.
VlLiopDescvl_liopdesc_new_basic (vl_size sideLength)
 Create a new object with default parameters.
void vl_liopdesc_process (VlLiopDesc *self, float *desc, float const *patch)
 Compute liop descriptor for a patch.
void vl_liopdesc_set_intensity_threshold (VlLiopDesc *self, float x)
 Set the intensity threshold.

Detailed Description

Local Intensity Order Pattern (LIOP) descriptor - Definition.

Author:
Hana Sarbortova
Andrea Vedaldi

Definition in file liop.c.


Define Documentation

#define DEFAULT_INTENSITY_THRESHOLD   -(5.0/255)

$ into a vector ${h}$ and then normalising it:

\[ = {{h}}{\|{h}\|_2} \]

The dimensionality is therefore $m n!$, where $m$ is the numSpatialBins number of spatial bins and $n$ is the numNeighbours number of neighbours (see vl_liopdesc_new). By default, this descriptor is stored in single format. It can be stored as a sequence of bytes by premultiplying the values by the constant 255 and then rounding:

\[ {round}[ 255\, ]. \]

Definition at line 208 of file liop.c.

#define DEFAULT_NUM_NEIGHBOURS   4

Definition at line 211 of file liop.c.

#define DEFAULT_NUM_SPATIAL_BINS   6

Definition at line 210 of file liop.c.

#define DEFAULT_RADIUS   6.0

Definition at line 209 of file liop.c.

#define VL_QSORT_array   VlLiopDesc*

Definition at line 300 of file liop.c.

#define VL_QSORT_array   VlLiopDesc*

Definition at line 300 of file liop.c.

#define VL_QSORT_cmp   patch_cmp

Definition at line 301 of file liop.c.

#define VL_QSORT_cmp   neigh_cmp

Definition at line 301 of file liop.c.

#define VL_QSORT_prefix   patch

Definition at line 299 of file liop.c.

#define VL_QSORT_prefix   neigh

Definition at line 299 of file liop.c.

#define VL_QSORT_swap   patch_swap

Definition at line 302 of file liop.c.

#define VL_QSORT_swap   neigh_swap

Definition at line 302 of file liop.c.


Function Documentation

static vl_int factorial ( vl_int  num) [static]

Definition at line 218 of file liop.c.

VL_INLINE vl_index get_permutation_index ( vl_uindex permutation,
vl_size  size 
)

Definition at line 250 of file liop.c.

VL_INLINE float neigh_cmp ( VlLiopDesc liop,
vl_index  i,
vl_index  j 
)

Definition at line 285 of file liop.c.

VL_INLINE void neigh_swap ( VlLiopDesc liop,
vl_index  i,
vl_index  j 
)

Definition at line 292 of file liop.c.

VL_INLINE float patch_cmp ( VlLiopDesc liop,
vl_index  i,
vl_index  j 
)

Definition at line 265 of file liop.c.

VL_INLINE void patch_swap ( VlLiopDesc liop,
vl_index  i,
vl_index  j 
)

Definition at line 272 of file liop.c.

Delete object instance.

Parameters:
selfobject instance.

Definition at line 417 of file liop.c.

Get the dimension of a LIOP descriptor.

Parameters:
selfobject.
Returns:
dimension.

Definition at line 569 of file liop.c.

Get the intensity threshold.

Parameters:
selfobject.
Returns:
intensity threshold.
See also:
liop-weighing

Definition at line 594 of file liop.c.

Get the neighbourhood radius.

Parameters:
selfobject.
Returns:
neighbourhood radius.

Definition at line 625 of file liop.c.

Get the number of neighbours.

Parameters:
selfobject.
Returns:
number of neighbours.

Definition at line 581 of file liop.c.

Get the number of spatial bins.

Parameters:
selfobject.
Returns:
number of spatial bins.

Definition at line 637 of file liop.c.

VlLiopDesc* vl_liopdesc_new ( vl_int  numNeighbours,
vl_int  numSpatialBins,
float  radius,
vl_size  sideLength 
)

Create a new LIOP object instance.

Parameters:
numNeighboursnumber of neighbours.
numSpatialBinsnumber of bins.
radiusradius of the cirucal sample neighbourhoods.
sideLengthwidth of the input image patch (the patch is square).
Returns:
new object instance.

The value of radius should be at least less than half the sideLength of the patch.

Definition at line 321 of file liop.c.

Create a new object with default parameters.

Parameters:
sideLengthsize of the patches to be processed.
Returns:
new object.
See also:
vl_liopdesc_new.

Definition at line 405 of file liop.c.

void vl_liopdesc_process ( VlLiopDesc self,
float *  desc,
float const *  patch 
)

Compute liop descriptor for a patch.

Parameters:
selfobject instance
descdescriptor to be computed (output).
patchpatch to process

Use vl_liopdesc_get_dimension to get the size of the descriptor desc.

Definition at line 442 of file liop.c.

Set the intensity threshold.

Parameters:
selfobject.
xintensity threshold.

If non-negative, the threshold as is is used when comparing intensities. If negative, the absolute value of the specified number is multipled by the maximum intensity difference inside a patch to obtain the threshold.

See also:
liop-weighing

Definition at line 613 of file liop.c.



libvlfeat
Author(s): Andrea Vedaldi
autogenerated on Thu Jun 6 2019 20:25:52