View Source Evision.Face.MACE (Evision v0.2.9)
Summary
Functions
Clears the algorithm state
constructor
constructor
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
getDefaultName
constructor
constructor
Reads algorithm parameters from a file storage
optionally encrypt images with random convolution
correlate query img and threshold to min class value
save
train it on positive features
compute the mace filter: h = D(-1) * X * (X(+) * D(-1) * X)(-1) * C
also calculate a minimal threshold for this class, the smallest self-similarity from the train images
Stores algorithm parameters in a file storage
write
Types
@type t() :: %Evision.Face.MACE{ref: reference()}
Type that represents an Face.MACE
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}
Clears the algorithm state
Positional Arguments
- self:
Evision.Face.MACE.t()
Python prototype (for reference only):
clear() -> None
constructor
Keyword Arguments
iMGSIZE:
integer()
.images will get resized to this (should be an even number)
Return
- retval:
cv::Ptr<MACE>
Python prototype (for reference only):
create([, IMGSIZE]) -> retval
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create([{:iMGSIZE, term()}] | nil) :: t() | {:error, String.t()}
constructor
Keyword Arguments
iMGSIZE:
integer()
.images will get resized to this (should be an even number)
Return
- retval:
cv::Ptr<MACE>
Python prototype (for reference only):
create([, IMGSIZE]) -> retval
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
Positional Arguments
- self:
Evision.Face.MACE.t()
Return
- retval:
bool
Python prototype (for reference only):
empty() -> retval
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.Face.MACE.t()
Return
- retval:
String
Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
Python prototype (for reference only):
getDefaultName() -> retval
@spec load(Keyword.t()) :: any() | {:error, String.t()}
@spec load(binary()) :: t() | {:error, String.t()}
constructor
Positional Arguments
filename:
String
.build a new MACE instance from a pre-serialized FileStorage
Keyword Arguments
objname:
String
.(optional) top-level node in the FileStorage
Return
- retval:
cv::Ptr<MACE>
Python prototype (for reference only):
load(filename[, objname]) -> retval
constructor
Positional Arguments
filename:
String
.build a new MACE instance from a pre-serialized FileStorage
Keyword Arguments
objname:
String
.(optional) top-level node in the FileStorage
Return
- retval:
cv::Ptr<MACE>
Python prototype (for reference only):
load(filename[, objname]) -> retval
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}
Reads algorithm parameters from a file storage
Positional Arguments
- self:
Evision.Face.MACE.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
optionally encrypt images with random convolution
Positional Arguments
self:
Evision.Face.MACE.t()
passphrase:
String
.a crc64 random seed will get generated from this
Python prototype (for reference only):
salt(passphrase) -> None
@spec same(t(), Evision.Mat.maybe_mat_in()) :: boolean() | {:error, String.t()}
correlate query img and threshold to min class value
Positional Arguments
self:
Evision.Face.MACE.t()
query:
Evision.Mat
.a Mat with query image
Return
- retval:
bool
Python prototype (for reference only):
same(query) -> retval
save
Positional Arguments
- self:
Evision.Face.MACE.t()
- filename:
String
Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
Python prototype (for reference only):
save(filename) -> None
@spec train(t(), [Evision.Mat.maybe_mat_in()]) :: t() | {:error, String.t()}
train it on positive features
compute the mace filter: h = D(-1) * X * (X(+) * D(-1) * X)(-1) * C
also calculate a minimal threshold for this class, the smallest self-similarity from the train images
Positional Arguments
self:
Evision.Face.MACE.t()
images:
[Evision.Mat]
.a vector<Mat> with the train images
Python prototype (for reference only):
train(images) -> None
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}
Stores algorithm parameters in a file storage
Positional Arguments
- self:
Evision.Face.MACE.t()
- fs:
Evision.FileStorage
Python prototype (for reference only):
write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}
write
Positional Arguments
- self:
Evision.Face.MACE.t()
- fs:
Evision.FileStorage
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None