Expand description
State value and reducer: Session + step / poll / command / finish.
Each time the frame bundle of one position (FrameSet) arrives, it performs features -> matching of new pairs -> (first model /
continued registration + triangulation)
-> on zone completion, preview (foreground) densification + refinement (background thread: BA -> GPS ENU alignment -> densification),
and emits that process as per-stage Events. It writes no files or logs (run.log lines also go out as Event::Log).
§Throughput
Input::Batchprocesses the positions of a backlog together (features, one matching call, one registration and triangulation per segment between zone closings);Session::lookaheadgives aLookaheadhandle that starts the feature extraction of upcoming positions while earlier ones are processed (SessionConfig::lookahead).SessionConfig::preview(stable display) emits a sparse preview of every zone when it closes.
§State and sharing
Session is a value. step(&s, frames) returns a new Session and s can still be used.
Models, image lists, correspondence graphs etc. are shared via Arc / copy on write. However, the feature store is append-only shared
data,
so calling step twice from the same earlier value with different frames mixes up the store (rewind with Command::ResetFrom).
Background refinement results (refined models and point clouds) and the event version number are also shared by the whole session
lineage.
§Event delivery
- Default: foreground events go out in the return vector of that call; background refinement events accumulate in an internal inbox
and go out
at the front of the return vector of the next
step/poll/command/finish. - If a receiver is set with
Session::set_sink, all events (foreground and background) are delivered to it in version order as soon as they are emitted. In that case the foreground events in the return vector are copies of what was already delivered (do not deliver them again). The receiver must not block (it is called inside an internal lock). meta.versionincreases monotonically across the whole session lineage and gives the emission order (= timeline order).
§Rules for reproducing run.log and timeline (for output hooks)
- The timeline text is given by
Event::timeline_text, and it is also written to run.log in the same place as[HH:MM:SS] text. Event::Logis one run.log line at that place (with a[HH:MM:SS]prefix ifstamped).Event::Warning/Event::Errorgo out together with aLogof the same content, so do not write them to run.log separately.- The stage times of
Event::Finishedhave no post-processing (“post”) time (post-processing is done by the output hook).
Structs§
- Frame
Image - One image of one position.
- Frame
Set - Frame bundle of one position (one image per camera).
- Preview
Zone - Zone preview result.
- Refined
Zone - Zone refined result (present from the time the pose is finalized; the point cloud exists once densification finishes).
- Session
- Incremental reconstruction state value.
- Session
Config - Session settings.
- Sparse
Backends - Backends of the sparse stages that run per position. All CPU by default.
Enums§
- Input
- Reducer input.
Functions§
- command
- Command handling.
- finish
- Close the remaining zones -> wait for background jobs -> summary.
- intrinsics_
change - Largest relative change of a focal parameter (fx, fy; just f for single-focal models) over the cameras present in both
aandb, as a fraction ofa’s value. Infinite when a camera changed its model kind; 0 when no camera is shared. - pairs_
for - Pairing rule: same camera at position gaps 1..5, 8, 16 / different cameras at position difference 0..4. Only pairs involving an image of position p, as sorted name pairs.
- poll
- Collect background refinement events (when there is no receiver). The state does not change.
- step
- The new state and events after processing the next frame bundle.
- zones_
upto - Zones: start = 0, span, …; [start-ovl, start+span+ovl) intersect [0, total). Completion position = hi-1.
Type Aliases§
- Event
Sink - Immediate-delivery receiver.