pub trait MACETrait: AlgorithmTrait + MACETraitConst {
// Required method
fn as_raw_mut_MACE(&mut self) -> *mut c_void;
// Provided methods
fn salt(&mut self, passphrase: &str) -> Result<()> { ... }
fn train(&mut self, images: &impl ToInputArray) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::face::MACE
Required Methods§
fn as_raw_mut_MACE(&mut self) -> *mut c_void
Provided Methods§
sourcefn salt(&mut self, passphrase: &str) -> Result<()>
fn salt(&mut self, passphrase: &str) -> Result<()>
optionally encrypt images with random convolution
Parameters
- passphrase: a crc64 random seed will get generated from this
sourcefn train(&mut self, images: &impl ToInputArray) -> Result<()>
fn train(&mut self, images: &impl ToInputArray) -> Result<()>
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
Parameters
- images: a vector
with the train images