Class GazeFusionResult#

Class Documentation#

class GazeFusionResult

Parses a session-root “gaze_fusion.json” file written by analysis/run_gaze_fusion.py into a queryable in-memory structure, for the Analysis tab’s Multi-Camera Gaze Fusion plugin (per-camera bbox+arrow overlay during playback, plus a 3D room-view widget). Mirrors ExpressionResult (src/analysis/expression_result.hpp) closely — same load()/is_valid() shape — with one deliberate divergence: frames are keyed on the shared master tick/timestamp (not any single video’s frame_index, since fusion is inherently cross-camera), so nearest-frame lookup is by timestamp, not frame index.

Usage:

auto result = GazeFusionResult::load(jsonPath);
if (result.is_valid()) { ... }

Public Functions

GazeFusionResult() = default
inline bool is_valid() const
inline const QStringList &source_videos() const
inline const QVector<GazeFusionRoomCamera> &cameras() const
inline bool plane_defined() const
inline Vec3 plane_point() const
inline Vec3 plane_normal() const
inline double master_fps() const
inline const QVector<GazeFusionFrame> &frames() const
const GazeFusionFrame *nearest_frame(int64_t timestampNsEstimate) const

Nearest-frame lookup by timestamp (ns) estimate — binary search, since frames() is stored in the ascending timestampNs order run_gaze_fusion.py writes ascending master ticks in. Returns nullptr if there are no frames.

Public Static Functions

static GazeFusionResult load(const QString &jsonPath)

Parses jsonPath. Returns a default-constructed (is_valid() == false) result if the file is missing or malformed.