View Source Evision.Face.LBPHFaceRecognizer (Evision v0.1.38)

Summary

Types

t()

Type that represents an Face.LBPHFaceRecognizer struct.

Types

@type t() :: %Evision.Face.LBPHFaceRecognizer{ref: reference()}

Type that represents an Face.LBPHFaceRecognizer struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec create() :: t() | {:error, String.t()}

create

Keyword Arguments
  • radius: int.

    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: int.

    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: int.

    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: int.

    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: double.

    The threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

Return
  • retval: LBPHFaceRecognizer

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.

Python prototype (for reference only):

create([, radius[, neighbors[, grid_x[, grid_y[, threshold]]]]]) -> retval
@spec create([{atom(), term()}, ...] | nil) :: t() | {:error, String.t()}

create

Keyword Arguments
  • radius: int.

    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: int.

    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: int.

    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: int.

    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: double.

    The threshold applied in the prediction. If the distance to the nearest neighbor is larger than the threshold, this method returns -1.

Return
  • retval: LBPHFaceRecognizer

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.

Python prototype (for reference only):

create([, radius[, neighbors[, grid_x[, grid_y[, threshold]]]]]) -> retval
@spec getGridX(t()) :: integer() | {:error, String.t()}

getGridX

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
Return
  • retval: int

@see setGridX/2

Python prototype (for reference only):

getGridX() -> retval
@spec getGridY(t()) :: integer() | {:error, String.t()}

getGridY

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
Return
  • retval: int

@see setGridY/2

Python prototype (for reference only):

getGridY() -> retval
@spec getHistograms(t()) :: [Evision.Mat.t()] | {:error, String.t()}

getHistograms

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
Return
  • retval: [Evision.Mat]

Python prototype (for reference only):

getHistograms() -> retval
@spec getLabels(t()) :: Evision.Mat.t() | {:error, String.t()}

getLabels

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getLabels() -> retval
@spec getNeighbors(t()) :: integer() | {:error, String.t()}

getNeighbors

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
Return
  • retval: int

@see setNeighbors/2

Python prototype (for reference only):

getNeighbors() -> retval
@spec getRadius(t()) :: integer() | {:error, String.t()}

getRadius

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
Return
  • retval: int

@see setRadius/2

Python prototype (for reference only):

getRadius() -> retval
@spec getThreshold(t()) :: number() | {:error, String.t()}

getThreshold

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
Return
  • retval: double

@see setThreshold/2

Python prototype (for reference only):

getThreshold() -> retval
@spec setGridX(t(), integer()) :: t() | {:error, String.t()}

setGridX

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
  • val: int

@see getGridX/1

Python prototype (for reference only):

setGridX(val) -> None
@spec setGridY(t(), integer()) :: t() | {:error, String.t()}

setGridY

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
  • val: int

@see getGridY/1

Python prototype (for reference only):

setGridY(val) -> None
@spec setNeighbors(t(), integer()) :: t() | {:error, String.t()}

setNeighbors

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
  • val: int

@see getNeighbors/1

Python prototype (for reference only):

setNeighbors(val) -> None
@spec setRadius(t(), integer()) :: t() | {:error, String.t()}

setRadius

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
  • val: int

@see getRadius/1

Python prototype (for reference only):

setRadius(val) -> None
@spec setThreshold(t(), number()) :: t() | {:error, String.t()}

setThreshold

Positional Arguments
  • self: Evision.Face.LBPHFaceRecognizer.t()
  • val: double

@see getThreshold/1

Python prototype (for reference only):

setThreshold(val) -> None