@Reference(type=Article, author={"Tan, Xiaoyang","Triggs, Bill"}, title="Enhanced local texture feature sets for face recognition under difficult lighting conditions", year="2010", journal="Trans. Img. Proc.", pages={"1635","","1650"}, url="http://dx.doi.org/10.1109/TIP.2010.2042645", month="June", number="6", publisher="IEEE Press", volume="19") public class LocalTernaryPattern extends Object implements ImageAnalyser<FImage>
Modifier and Type | Field and Description |
---|---|
protected int[][] |
negativeBinaryPattern |
protected int[][] |
positiveBinaryPattern |
protected float |
radius |
protected int |
samples |
protected int[][] |
ternaryPattern |
protected float |
threshold |
Constructor and Description |
---|
LocalTernaryPattern(float radius,
int samples,
float threshold)
Construct an LTP extractor with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
analyseImage(FImage image)
Analyse an image.
|
static int[][][] |
calculateLTP(FImage image,
float radius,
int samples,
float threshold)
Calculate the LBP for every pixel in the image.
|
static int[] |
calculateLTP(FImage image,
float radius,
int samples,
float threshold,
int x,
int y)
Calculate the LTP for a single point.
|
static int[] |
calculateLTP(FImage image,
float radius,
int samples,
float threshold,
Pixel point)
Calculate the LTP for a single point.
|
int[][] |
getNegativePattern()
Get the negative pattern created during the last call to
analyseImage(FImage) . |
int[][] |
getPositivePattern()
Get the positive pattern created during the last call to
analyseImage(FImage) . |
int[][] |
getTernaryPattern()
Get the ternary pattern created during the last call to
analyseImage(FImage) . |
protected int[][] positiveBinaryPattern
protected int[][] negativeBinaryPattern
protected int[][] ternaryPattern
protected float radius
protected int samples
protected float threshold
public LocalTernaryPattern(float radius, int samples, float threshold)
radius
- the radius of the sampling circlesamples
- the number of samples around the circlethreshold
- the thresholdpublic static int[][][] calculateLTP(FImage image, float radius, int samples, float threshold)
image
- the imageradius
- the radius of the sampling circlesamples
- the number of samples around the circlethreshold
- the thresholdpublic static int[] calculateLTP(FImage image, float radius, int samples, float threshold, int x, int y)
image
- the imageradius
- the radius of the sampling circlesamples
- the number of samples around the circlethreshold
- the thresholdx
- the x-coordinate of the pointy
- the y-coordinate of the pointpublic static int[] calculateLTP(FImage image, float radius, int samples, float threshold, Pixel point)
image
- the imageradius
- the radius of the sampling circlethreshold
- the thresholdsamples
- the number of samples around the circlepoint
- the pointpublic void analyseImage(FImage image)
ImageAnalyser
analyseImage
in interface ImageAnalyser<FImage>
image
- The image to process in place.public int[][] getPositivePattern()
analyseImage(FImage)
.public int[][] getNegativePattern()
analyseImage(FImage)
.public int[][] getTernaryPattern()
analyseImage(FImage)
.