[−][src]Trait opencv::face::LBPHFaceRecognizer
Required methods
pub fn as_raw_LBPHFaceRecognizer(&self) -> *const c_void
[src]
pub fn as_raw_mut_LBPHFaceRecognizer(&mut self) -> *mut c_void
[src]
Provided methods
pub fn get_grid_x(&self) -> Result<i32>
[src]
See also
setGridX
pub fn set_grid_x(&mut self, val: i32) -> Result<()>
[src]
See also
setGridX getGridX
pub fn get_grid_y(&self) -> Result<i32>
[src]
See also
setGridY
pub fn set_grid_y(&mut self, val: i32) -> Result<()>
[src]
See also
setGridY getGridY
pub fn get_radius(&self) -> Result<i32>
[src]
See also
setRadius
pub fn set_radius(&mut self, val: i32) -> Result<()>
[src]
See also
setRadius getRadius
pub fn get_neighbors(&self) -> Result<i32>
[src]
See also
setNeighbors
pub fn set_neighbors(&mut self, val: i32) -> Result<()>
[src]
See also
setNeighbors getNeighbors
pub fn get_threshold(&self) -> Result<f64>
[src]
See also
setThreshold
pub fn set_threshold(&mut self, val: f64) -> Result<()>
[src]
See also
setThreshold getThreshold
pub fn get_histograms(&self) -> Result<Vector<Mat>>
[src]
pub fn get_labels(&self) -> Result<Mat>
[src]
Implementations
impl<'_> dyn LBPHFaceRecognizer + '_
[src]
pub fn create(
radius: i32,
neighbors: i32,
grid_x: i32,
grid_y: i32,
threshold: f64
) -> Result<Ptr<dyn LBPHFaceRecognizer>>
[src]
radius: i32,
neighbors: i32,
grid_x: i32,
grid_y: i32,
threshold: f64
) -> Result<Ptr<dyn 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.
C++ default parameters
- radius: 1
- neighbors: 8
- grid_x: 8
- grid_y: 8
- threshold: DBL_MAX