Documentation>C API
Local Intensity Order Pattern (LIOP) descriptor

Author
  Hana Sarbortova
  Andrea Vedaldi

liop.h implements Local Intensity Order Pattern descriptor (LIOP) of [32] . LIOP is a local image descriptor, similarly to the SIFT descriptor.

Getting started with LIOP demonstrates how to use the C API to compute the LIOP descriptor of a patch. For further details refer to:

- LIOP fundamentals - LIOP definition and parameters.

# Getting started with LIOP

The following code fragment demonstrates how tow to use liop.h in a C program in order to compute the LIOP descriptor of an image patch.

#include <vl/liop.h>
// Create a new object instance (these numbers corresponds to parameter
// values proposed by authors of the paper, except for 41)
vl_size sideLength = 41 ;
VlLiopDesc * liop = vl_liopdesc_new_basic (sideLength);
// allocate the descriptor array
vl_size dimension = vl_liopdesc_get_dimension(liop) ;
float * desc = vl_malloc(sizeof(float) * dimension) ;
// compute descriptor from a patch (an array of length sideLegnth *
// sideLength)
vl_liopdesc_process(liop, desc, patch) ;
// delete the object
vl_liopdesc_delete(liop) ;
vl_malloc
void * vl_malloc(size_t n)
Allocate a memory block.
Definition generic.c:1312
vl_size
vl_uint64 vl_size
Unsigned integer holding the size of a memory block.
Definition host.h:392
vl_liopdesc_delete
void vl_liopdesc_delete(VlLiopDesc *self)
Delete object instance.
Definition liop.c:417
vl_liopdesc_process
void vl_liopdesc_process(VlLiopDesc *self, float *desc, float const *patch)
Compute liop descriptor for a patch.
Definition liop.c:442
vl_liopdesc_new_basic
VlLiopDesc * vl_liopdesc_new_basic(vl_size sideLength)
Create a new object with default parameters.
Definition liop.c:405
vl_liopdesc_get_dimension
vl_size vl_liopdesc_get_dimension(VlLiopDesc const *self)
Get the dimension of a LIOP descriptor.
Definition liop.c:569
liop.h
Local Intensity Order Pattern (LIOP) descriptor (Local Intensity Order Pattern (LIOP) descriptor).
VlLiopDesc
LIOP descriptor extractor object.
Definition liop.h:23

The image patch must be of odd side length and in single precision. There are several parameters affecting the LIOP descriptor. An example is the threshold used to discard low-contrast oder pattern in the computation of the statistics. This is changed by using vl_liopdesc_set_intensity_threshold.