liop.h File Reference
Local Intensity Order Pattern descriptor (Local Intensity Order Pattern descriptor) More...
Data Structures | |
struct | VlLiopBin |
LIOP bin A bin of a LIOP descriptor. More... | |
struct | VlLiopDesc |
LIOP Descriptor settings. More... |
Functions | |
Construct and destroy | |
VlLiopDesc * | vl_liopdesc_new (vl_int neighbours, vl_int bins, float radius, float threshold, vl_size patchSideLength) |
Create a new object instance. | |
VlLiopBin * | vl_liopbin_new (vl_uindex *binIndexes, vl_size binSize, float *binLiop, vl_size binLiopSize) |
Create a new object instance. | |
void | vl_liopdesc_delete (VlLiopDesc *self) |
Delete object instance. | |
void | vl_liopbin_delete (VlLiopBin *bin) |
Delete object instance. | |
Compute LIOP descriptor | |
void | compute_liop_descriptor (VlLiopDesc *liop, float *patch, float *desc) |
Compute liop descriptor for a patch. | |
void | compute_bin_liop_descriptor (VlLiopDesc *liop, VlLiopBin *bin, float *patch) |
Compute one bin of LIOP descriptor. | |
void | get_intensities_of_neighbours (float *intensities, float *patch, VlLiopDesc *liop, float x, float y) |
Get intensities of neighbours. | |
Sorting | |
void | stable_indexes_qsort (float *array, vl_uindex *indexes, vl_uindex begin, vl_uindex end) |
Stable quick sort (sort only indexes, not the array of values) | |
void | qsort_swap (vl_uindex *array, vl_uindex index1, vl_uindex index2) |
Quick sort swap (swap only indexes, not array values) | |
Other functions | |
vl_int | get_permutation_index (vl_uindex *permutation, vl_size size) |
Compute permutation index. | |
float | interpolate (float *patch, vl_int sideLength, float x, float y) |
Compute 4 point linear interpolation. | |
vl_int | factorial (int num) |
Compute factorial of a number. | |
void | get_coordinates (vl_int a, vl_int pos, float *x, float *y) |
Get coordinates (the patch center has coordinates [0,0]) | |
vl_uindex | get_vector_position (vl_int a, float x, float y) |
Get position of a point in the patch vector. | |
void | rotate_vector (float alpha, float *x, float *y) |
Rotate vector. | |
float | get_weight (float *intensities, vl_size size, float threshold) |
Get weight of a particular group of intensities. | |
float | find_weight_threshold (float *data, vl_size length) |
Find weight threshold according to data range. | |
Reshape patch to a circle | |
vl_int * | compute_circle_look_up_table (vl_int radius, vl_int sideLength) |
Compute circle look up table. | |
void | compute_inner_patch_indexes (VlLiopDesc *self, vl_int length, vl_int radius) |
Get indexes that will be used for descriptor computation (inner circle of the patch) |
Detailed Description
Function Documentation
void compute_bin_liop_descriptor | ( | VlLiopDesc * | self, |
VlLiopBin * | bin, | ||
float * | patch | ||
) |
- Parameters:
-
self object instance bin object instance patch patch to process
- Parameters:
-
radius circle radius sideLength patch side length
- Returns:
- array of length
sideLength
with number of pixels that are outside of the circle but still in the patch. Each alement is for one column of a half of the patch.
void compute_inner_patch_indexes | ( | VlLiopDesc * | self, |
vl_int | length, | ||
vl_int | radius | ||
) |
- Parameters:
-
length patch side length radius radius of the inner circle
void compute_liop_descriptor | ( | VlLiopDesc * | self, |
float * | patch, | ||
float * | desc | ||
) |
- Parameters:
-
self object instance patch patch to process desc descriptor to be computed
vl_int factorial | ( | int | num | ) |
- Parameters:
-
num number
- Returns:
- factorial of the number
float find_weight_threshold | ( | float * | data, |
vl_size | length | ||
) |
- Parameters:
-
data intensity values length length of the data array
- Returns:
- threshold
- Parameters:
-
sideLength patch side length pos position in the patch vector x x coordinate y y coordinate
void get_intensities_of_neighbours | ( | float * | intensities, |
float * | patch, | ||
VlLiopDesc * | self, | ||
float | x, | ||
float | y | ||
) |
- Parameters:
-
intensities array of neighbours' intensities patch patch to process self object instance x x coordinate of the point X to be processed y y coordinate of the point X to be processed
- Parameters:
-
permutation array containing all values from 0 to (size - 1) size size of the permutation array
- Returns:
- permutation index
Compute a unique index of a particular permutation without comparing arrays. Let's consider permutation array containing numbers from 1 to 4. The lowest index 0 has permutation [1 2 3 4]
, 1 [1 2 4 3]
, 2 [1 3 2 4]
, 3 [1 3 4 2]
,... and the highest (size - 1) [4 3 2 1]
- Parameters:
-
sideLength patch side length x x coordinate y y coordinate
- Returns:
- position in the patch vector
float get_weight | ( | float * | intensities, |
vl_size | size, | ||
float | threshold | ||
) |
- Parameters:
-
intensities array of intensities size size of the intensities array threshold threshold (minimum difference between intensities that should be considered as large enough for increasing weight)
- Returns:
- weight
float interpolate | ( | float * | patch, |
vl_int | sideLength, | ||
float | x, | ||
float | y | ||
) |
- Parameters:
-
patch patch to process sideLength patch side length x x coordinate y y coordinate
- Returns:
- interpolated intensity value
- Parameters:
-
array array of values index1 first index to be swaped index2 second index to be swaped
void rotate_vector | ( | float | alpha, |
float * | x, | ||
float * | y | ||
) |
- Parameters:
-
alpha angle of rotation x first element of the vector y second element of the vector
- Parameters:
-
array array of values indexes indexes to values of array that should be used for sorting begin first index of the array of indexes end last index of the array of indexes
void vl_liopbin_delete | ( | VlLiopBin * | bin | ) |
- Parameters:
-
bin object instance
VlLiopBin* vl_liopbin_new | ( | vl_uindex * | binIndexes, |
vl_size | binSize, | ||
float * | binLiop, | ||
vl_size | binLiopSize | ||
) |
- Parameters:
-
binIndexes patch indexes of points belonging to the bin binSize number of points belonging to the bin binLiop bin liop descriptor binLiopSize size of the bin liop descriptor
- Returns:
void vl_liopdesc_delete | ( | VlLiopDesc * | self | ) |
- Parameters:
-
self object instance
VlLiopDesc* vl_liopdesc_new | ( | vl_int | neighbours, |
vl_int | bins, | ||
float | radius, | ||
float | threshold, | ||
vl_size | sideLength | ||
) |
- Parameters:
-
neighbours number of neighbours bins number of bins radius radius between a point and it's neighbours threshold weighting threshold sideLength patch side length
- Returns:
- new liop descriptor settings