pub trait PersistentDetector: Detector {
    // Required methods
    fn load<R: Read>(&mut self, reader: R) -> Result<(), Box<dyn Error>>;
    fn save<W: Write>(&self, writer: W) -> Result<(), Box<dyn Error>>;
}
Expand description

Trait for objects that can be persisted to and loaded from storage

Required Methods§

source

fn load<R: Read>(&mut self, reader: R) -> Result<(), Box<dyn Error>>

Loads the detector from the provided reader.

Arguments
  • reader - The reader to load the detector from.
Returns

A Result containing an error string if loading fails, or Ok if loading succeeds.

source

fn save<W: Write>(&self, writer: W) -> Result<(), Box<dyn Error>>

Saves the detector to the provided writer.

Arguments
  • writer - The writer to save the detector to.
Returns

A Result containing an error string if saving fails, or Ok if saving succeeds.

Implementors§

source§

impl<WG> PersistentDetector for BriefSVMDetector<WG>where WG: WindowGenerator<DynamicImage>,

source§

impl<WG> PersistentDetector for HOGSVMDetector<WG>where WG: WindowGenerator<DynamicImage>,