Skip to main content

nv_view/
lib.rs

1//! # nv-view
2//!
3//! Camera view-state, PTZ modeling, and motion-aware epoch management
4//! for the NextVision runtime.
5//!
6//! This crate handles the fundamental challenge of video perception on
7//! moving cameras: when the camera's view changes, spatial relationships
8//! between frames change and temporal state may become invalid.
9//!
10//! ## Core types
11//!
12//! - **[`ViewState`]** — the current best estimate of the camera's view.
13//! - **[`ViewSnapshot`]** — a read-only, `Arc`-wrapped snapshot given to stages.
14//! - **[`ViewEpoch`]** / **[`ViewVersion`]** — monotonic counters for discontinuity and change tracking.
15//! - **[`CameraMotionState`]** — whether the camera is stable, moving, or unknown.
16//! - **[`TransitionPhase`]** — where in a motion transition the current frame sits.
17//!
18//! ## User extension points
19//!
20//! - **[`ViewStateProvider`]** — supplies motion information each frame (telemetry or inferred).
21//! - **[`EpochPolicy`]** — controls the response to detected camera motion.
22//! - **[`ViewBoundContext`]** — binds user data to a specific view for staleness checks.
23
24pub mod bound;
25pub mod camera_motion;
26pub mod epoch;
27pub mod provider;
28pub mod ptz;
29pub mod transform;
30pub mod transition;
31pub mod validity;
32pub mod view_state;
33
34pub use bound::{BoundContextValidity, ViewBoundContext};
35pub use camera_motion::{CameraMotionState, MotionSource};
36pub use epoch::{DefaultEpochPolicy, EpochDecision, EpochPolicy, EpochPolicyContext};
37pub use provider::{MotionPollContext, MotionReport, ViewStateProvider};
38pub use ptz::{PtzEvent, PtzTelemetry};
39pub use transform::{GlobalTransformEstimate, TransformEstimationMethod};
40pub use transition::TransitionPhase;
41pub use validity::{ContextValidity, DegradationReason};
42pub use view_state::{ViewEpoch, ViewSnapshot, ViewState, ViewVersion};