pub struct Engine { /* private fields */ }Implementations§
Source§impl Engine
impl Engine
Sourcepub fn new() -> Self
pub fn new() -> Self
Examples found in repository?
examples/basic_usage.rs (line 22)
21fn main() {
22 let mut engine = Engine::new();
23
24 // Two sightings of the same chair, 0.5s apart, fuse into one
25 // MapObject instead of piling up as two separate detections.
26 engine.ingest_frame(chair_frame(0.0));
27 let scene_map = engine.ingest_frame(chair_frame(0.5));
28
29 let chair = &scene_map.objects[0];
30 println!(
31 "fused '{}' at ({:.2}, {:.2}), confidence {:.2} from {} observation(s)",
32 chair.label, chair.x, chair.y, chair.confidence, chair.observation_count
33 );
34 println!("\nfull SceneMap as GeoJSON:\n{}", scene_map.to_geojson_json().unwrap());
35}pub fn with_config(config: EngineConfig) -> Self
Sourcepub fn ingest_frame(&mut self, frame: Frame) -> &SceneMap
pub fn ingest_frame(&mut self, frame: Frame) -> &SceneMap
Examples found in repository?
examples/basic_usage.rs (line 26)
21fn main() {
22 let mut engine = Engine::new();
23
24 // Two sightings of the same chair, 0.5s apart, fuse into one
25 // MapObject instead of piling up as two separate detections.
26 engine.ingest_frame(chair_frame(0.0));
27 let scene_map = engine.ingest_frame(chair_frame(0.5));
28
29 let chair = &scene_map.objects[0];
30 println!(
31 "fused '{}' at ({:.2}, {:.2}), confidence {:.2} from {} observation(s)",
32 chair.label, chair.x, chair.y, chair.confidence, chair.observation_count
33 );
34 println!("\nfull SceneMap as GeoJSON:\n{}", scene_map.to_geojson_json().unwrap());
35}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
impl UnwindSafe for Engine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more