@Namespace(value="cv::face") @Properties(inherit=opencv_face.class) public class LBPHFaceRecognizer extends FaceRecognizer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
LBPHFaceRecognizer(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
static LBPHFaceRecognizer |
create() |
static LBPHFaceRecognizer |
create(int radius,
int neighbors,
int grid_x,
int grid_y,
double threshold) |
int |
getGridX() |
int |
getGridY() |
MatVector |
getHistograms() |
Mat |
getLabels() |
int |
getNeighbors() |
int |
getRadius() |
double |
getThreshold()
\brief threshold parameter accessor - required for default BestMinDist collector
|
void |
setGridX(int val)
\copybrief getGridX @see getGridX
|
void |
setGridY(int val)
\copybrief getGridY @see getGridY
|
void |
setNeighbors(int val)
\copybrief getNeighbors @see getNeighbors
|
void |
setRadius(int val)
\copybrief getRadius @see getRadius
|
void |
setThreshold(double val)
\copybrief getThreshold @see getThreshold
|
empty, getLabelInfo, getLabelsByString, getLabelsByString, predict_collect, predict_collect, predict_collect, predict_label, predict_label, predict_label, predict, predict, predict, predict, predict, predict, predict, predict, predict, read, read, read, setLabelInfo, setLabelInfo, train, train, train, train, train, train, train, train, train, update, update, update, update, update, update, update, update, update, write, write, write
clear, getDefaultName, position, save, save, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public LBPHFaceRecognizer(Pointer p)
Pointer.Pointer(Pointer)
.public int getGridX()
setGridX
public void setGridX(int val)
public int getGridY()
setGridY
public void setGridY(int val)
public int getRadius()
setRadius
public void setRadius(int val)
public int getNeighbors()
setNeighbors
public void setNeighbors(int val)
public double getThreshold()
FaceRecognizer
getThreshold
in class FaceRecognizer
setThreshold
public void setThreshold(double val)
setThreshold
in class FaceRecognizer
@opencv_core.Ptr public static LBPHFaceRecognizer create(int radius, int neighbors, int grid_x, int grid_y, double threshold)
radius
- The radius used for building the Circular Local Binary Pattern. The greater the
radius, the smoother the image but more spatial information you can get.neighbors
- The number of sample points to build a Circular Local Binary Pattern from. An
appropriate value is to use 8
sample points. Keep in mind: the more sample points you include,
the higher the computational cost.grid_x
- The number of cells in the horizontal direction, 8 is a common value used in
publications. The more cells, the finer the grid, the higher the dimensionality of the resulting
feature vector.grid_y
- The number of cells in the vertical direction, 8 is a common value used in
publications. The more cells, the finer the grid, the higher the dimensionality of the resulting
feature vector.threshold
- The threshold applied in the prediction. If the distance to the nearest neighbor
is larger than the threshold, this method returns -1.
### Notes:
- The Circular Local Binary Patterns (used in training and prediction) expect the data given as grayscale images, use cvtColor to convert between the color spaces. - This model supports updating.
### Model internal data:
- radius see LBPHFaceRecognizer::create. - neighbors see LBPHFaceRecognizer::create. - grid_x see LLBPHFaceRecognizer::create. - grid_y see LBPHFaceRecognizer::create. - threshold see LBPHFaceRecognizer::create. - histograms Local Binary Patterns Histograms calculated from the given training data (empty if none was given). - labels Labels corresponding to the calculated Local Binary Patterns Histograms.
@opencv_core.Ptr public static LBPHFaceRecognizer create()
Copyright © 2020. All rights reserved.