Trait MACETrait

Source
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§

Provided Methods§

Source

fn salt(&mut self, passphrase: &str) -> Result<()>

optionally encrypt images with random convolution

§Parameters
  • passphrase: a crc64 random seed will get generated from this
Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§