LBPHFaceRecognizer

Objective-C

@interface LBPHFaceRecognizer : FaceRecognizer

Swift

class LBPHFaceRecognizer : FaceRecognizer

The LBPHFaceRecognizer module

Member of Face

Methods

  • Declaration

    Objective-C

    - (Mat*)getLabels NS_SWIFT_NAME(getLabels());

    Swift

    func getLabels() -> Mat
  • Declaration

    Objective-C

    + (nonnull LBPHFaceRecognizer *)create:(int)radius
                                 neighbors:(int)neighbors
                                    grid_x:(int)grid_x
                                    grid_y:(int)grid_y
                                 threshold:(double)threshold;

    Swift

    class func create(radius: Int32, neighbors: Int32, grid_x: Int32, grid_y: Int32, threshold: Double) -> LBPHFaceRecognizer

    Parameters

    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.
  • Declaration

    Objective-C

    + (nonnull LBPHFaceRecognizer *)create:(int)radius
                                 neighbors:(int)neighbors
                                    grid_x:(int)grid_x
                                    grid_y:(int)grid_y;

    Swift

    class func create(radius: Int32, neighbors: Int32, grid_x: Int32, grid_y: Int32) -> LBPHFaceRecognizer

    Parameters

    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. 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.
  • Declaration

    Objective-C

    + (nonnull LBPHFaceRecognizer *)create:(int)radius
                                 neighbors:(int)neighbors
                                    grid_x:(int)grid_x;

    Swift

    class func create(radius: Int32, neighbors: Int32, grid_x: Int32) -> LBPHFaceRecognizer

    Parameters

    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. publications. The more cells, the finer the grid, the higher the dimensionality of the resulting feature vector. 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.
  • Declaration

    Objective-C

    + (nonnull LBPHFaceRecognizer *)create:(int)radius neighbors:(int)neighbors;

    Swift

    class func create(radius: Int32, neighbors: Int32) -> LBPHFaceRecognizer

    Parameters

    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. publications. The more cells, the finer the grid, the higher the dimensionality of the resulting feature vector. publications. The more cells, the finer the grid, the higher the dimensionality of the resulting feature vector. 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.
  • Declaration

    Objective-C

    + (nonnull LBPHFaceRecognizer *)create:(int)radius;

    Swift

    class func create(radius: Int32) -> LBPHFaceRecognizer

    Parameters

    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. appropriate value is to use 8 sample points. Keep in mind: the more sample points you include, the higher the computational cost. publications. The more cells, the finer the grid, the higher the dimensionality of the resulting feature vector. publications. The more cells, the finer the grid, the higher the dimensionality of the resulting feature vector. 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.
  •  radius, the smoother the image but more spatial information you can get.
     appropriate value is to use `8` sample points. Keep in mind: the more sample points you include,
     the higher the computational cost.
     publications. The more cells, the finer the grid, the higher the dimensionality of the resulting
     feature vector.
     publications. The more cells, the finer the grid, the higher the dimensionality of the resulting
     feature vector.
     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.
    

    Declaration

    Objective-C

    + (nonnull LBPHFaceRecognizer *)create;

    Swift

    class func create() -> LBPHFaceRecognizer
  • Declaration

    Objective-C

    - (double)getThreshold;

    Swift

    func getThreshold() -> Double
  • Declaration

    Objective-C

    - (int)getGridX;

    Swift

    func getGridX() -> Int32
  • Declaration

    Objective-C

    - (int)getGridY;

    Swift

    func getGridY() -> Int32
  • Declaration

    Objective-C

    - (int)getNeighbors;

    Swift

    func getNeighbors() -> Int32
  • Declaration

    Objective-C

    - (int)getRadius;

    Swift

    func getRadius() -> Int32
  • Declaration

    Objective-C

    - (NSArray<Mat*>*)getHistograms NS_SWIFT_NAME(getHistograms());

    Swift

    func getHistograms() -> [Mat]
  • getGridX - see: -getGridX:

    Declaration

    Objective-C

    - (void)setGridX:(int)val;

    Swift

    func setGridX(val: Int32)
  • getGridY - see: -getGridY:

    Declaration

    Objective-C

    - (void)setGridY:(int)val;

    Swift

    func setGridY(val: Int32)
  • getNeighbors - see: -getNeighbors:

    Declaration

    Objective-C

    - (void)setNeighbors:(int)val;

    Swift

    func setNeighbors(val: Int32)
  • getRadius - see: -getRadius:

    Declaration

    Objective-C

    - (void)setRadius:(int)val;

    Swift

    func setRadius(val: Int32)
  • getThreshold - see: -getThreshold:

    Declaration

    Objective-C

    - (void)setThreshold:(double)val;

    Swift

    func setThreshold(val: Double)