public class FeatureCalculatorLBPRIULUTs extends Object
This class basically contains various static arrays with rotation-invariant LBP codes. The arrays are initialized at the time of first access. Note that this may take some time depending on the power of your computer. Furthermore at least 1 GB of RAM should be available.
The theory regarding rotation invariant LBP codes can be found in
Ojala et al, Multiresolution Gray-Scale and Rotation Invariant
Texture Classification with Local Binary Patterns, PAMI, vol. 24,
no. 7, pp. 971-987, July 2002.
FeatureCalculatorLBPOriginal
,
FeatureCalculatorLBP
Modifier and Type | Field and Description |
---|---|
static int[][] |
codeArrayRI
Array containing rotation invariant LBP codes.
|
static int[][] |
codeArrayRIU
Array containing uniform rotation invariant LBP codes.
|
static int[][] |
codeDistributionRI
Distribution of codes.
|
private static int |
maxBitsSoFar
Maximal bit number for which the class has already been initialized.
|
Constructor and Description |
---|
FeatureCalculatorLBPRIULUTs() |
Modifier and Type | Method and Description |
---|---|
static int[][] |
getCodeDistributionRI(int maxBits)
Get array with LBP-RI code distributions.
|
static int[][] |
getLBPCodeArrayRI(int maxBits)
Get array with LBP rotation invariant codes.
|
static int[][] |
getLBPCodeArrayRIU(int maxBits)
Get array with LBP rotation invariant uniform codes.
|
protected static void |
initArrayRI(int maxBits)
Initializes the array with rotation invariant and uniform codes.
|
protected static void |
initArrayRIU(int maxBits)
Initializes the array with rotation invariant and uniform codes.
|
static void |
main(String[] args)
Test function.
|
public static int[][] codeArrayRI
The array has 2^24 rows and 4 columns. Each column contains a certain unified code for the index:
public static int[][] codeArrayRIU
The array has 2^24 rows and 4 columns. Each column contains a certain unified code for the index:
public static int[][] codeDistributionRI
The array has 2^24 rows and 4 columns. Each column contains the number of appearances of the index as LBP code given the corresponding number of bits:
private static int maxBitsSoFar
By storing the maximum bit number already handled we seek to avoid doing time-consuming calculations multiple times.
public static int[][] getLBPCodeArrayRI(int maxBits)
maxBits
- Maximal number of bits to consider.public static int[][] getLBPCodeArrayRIU(int maxBits)
maxBits
- Maximal number of bits to consider.public static int[][] getCodeDistributionRI(int maxBits)
maxBits
- Maximal number of bits to consider.protected static void initArrayRI(int maxBits)
Note that particularly the 24-bit codes take a rather long time for initialization and at least 1 GB RAM.
maxBits
- Maximal number of bits to consider.protected static void initArrayRIU(int maxBits)
maxBits
- Maximal number of bits to consider.public static void main(String[] args)
args
- Command-line arguments.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.