Class RppgResult#
Defined in File rppg_result.hpp
Class Documentation#
-
class RppgResult#
Parses a “<video_stem>.<backend>.rppg.json” file written by analysis/run_rppg.py into a queryable in-memory structure, for the Analysis tab’s Remote Heart Rate (rPPG) plugin.
Usage:
auto result = RppgResult::load(jsonPath); if (result.is_valid()) { ... }
Warning
EXPERIMENTAL — this is a research-grade heart-rate estimate only, not a medical device and not clinically validated (see the plugin’s own persistent UI disclaimer banner).
Public Functions
-
RppgResult() = default#
-
inline bool is_valid() const#
-
inline const QString &source_video() const#
-
inline const QString &backend() const#
-
inline double window_sec() const#
-
inline double hop_sec() const#
-
inline const QVector<RppgWindow> &windows() const#
-
inline std::optional<double> mean_bpm() const#
Precomputed by run_rppg.py from the raw (non-smoothed) per-window bpm values — not recomputed here, avoiding duplicating percentile/ mean math in two languages. std::nullopt if no window in the file had any reliable estimate.
-
inline std::optional<double> median_bpm() const#
-
inline std::optional<double> min_bpm() const#
-
inline std::optional<double> max_bpm() const#
-
inline double pct_windows_good() const#
-
const RppgWindow *nearest_window(int64_t timestampMsEstimate) const#
Binary search by start time (windows()/frames() are both written in chronological order by run_rppg.py) with a before/after numerically-closer tie-break — mirrors GazeFusionResult:: nearest_frame()’s exact convention. Returns nullptr only if windows()/frames() is empty.
Public Static Functions
-
static RppgResult load(const QString &jsonPath)#
Parses jsonPath. Returns a default-constructed (is_valid() == false) result if the file is missing or malformed.
-
RppgResult() = default#