SRS-LBP features extractor


SRS-LBP features extractor is a binary program used to perform the SRS-LBP Transform from graylevel images to histograms of SRS-LBP in the form of .csv files. This program can be tuned to extract pyramids or any other regions in the image with parameters.


This program is provided as a mean of demonstrating the exact performance of a specific published method works. Sparse Radial Sampling LBP for Writer Identification If using it in any scientific context that is published please cite the article.


This binary is based on experimental code and could seriously corrupt your filesystem, specially if you dont have a good understanding of how the command line parameters work. You are advised to use it in a sand-boxed environment.


This program will run in a win32 command line environment or under wine in unix environments. All library dependencies are statically linked so it should rum under almost all win32 environments. The software was cross-compiled under the M cross environment


srslbp.exe (command line win32 binary) (source code for srslbp.exe)



-h | –help t: boolean Print this help message. Default value: 0

-v | –verbose-level t: integer Verbocity level integer. 0: least verbose , 10: most verbose. Default value: 0

-I | –input-argv t: string Aditional File from where to load command paramenters. Usefull for huge argument lists. Default value:

-i | –input-files t: string list A list of image files supported by opencv (tif,png,bmp,jpeg etc.)..

-s | –sampling t: string The maner of sampling the points on the periphery. values: [nearEuclidean bilinear arc-convolution nearCityblock nearChessboard] Default value: nearEuclidean
-c | –comparisson-operator t: string The operator that compares the sample on the circle to the central. For the standard LBP this should be threshold-one-tail.. values: [one-tail two-tails] Default value: one-tail

-T | –comparisson-threshold t: string A number describing the threshold at whitch the tails are choped. If you want automatic estimation you can use ‘otsu’. For the standart LBP set this to 0.. Default value: 0

-r | –radii t: string list A list of positive numbers indicating the radii for which the LBP will be computed.. Default value: [ 1 , 2 , 3 ] .

-o | –output t: string The path the outputfile. If the file exists it will be appended. In oreder to print to the standart output put ‘stdout’. Default value: stdout

-S | –horizontal-separator t: string The sequence which separates two columns in the csv. Default value: ,

-n | –number-of-samples t: integer An integer defining the number of points sampled on the circle and compared to the central pixel.. Default value: 8

-H | –output-header t: boolean A boolean defining wether the first line of the CSV should contain the name of each feature.. Default value: 0

-w | –windows t: string list The window on which histograms will be concatenated {Left,Top,Right,Bottom} as real numbers between 0 and 1.. Default value: [ 0,0,1,1 ] .

-d | –distict-pattern-per-window t: boolean Whether each window should be considered a distinct pattern or not.. Default value: 0

-b | –white-border-size t: integer An integer defining the width of the white padding drawn around the image before the patterns are drawn.. Default value: 0

Example usage assuming a graylevel image graytext.tif:

#Extract the default SRS-LBP Features:
wine srslbp.exe -S bilinear -T otsu -r 1 2 3 4 5 6 7 8 9 10 11 12 -i /path/to/dataset/*.png > /path/to/features/output.csv
#Extremely faster variant:
wine srslbp.exe -S nearEuclidean -T 0 -r 3  -i /path/to/dataset/*.png > /path/to/features/output.csv