SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
Loading...
Searching...
No Matches
confidence_thresholding.hpp
1
2// confidence_thresholding.hpp
3// Created by greg on 12/16/24.
4// Copyright (C) 2024 Presage Security, Inc.
5//
6// This program is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 3 of the License, or (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public License
17// along with this program; if not, write to the Free Software Foundation,
18// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
21// === standard library includes (if any) ===
22// === third-party includes (if any) ===
23// === local includes (if any) ===
24#pragma once
25
26namespace presage::smartspectra::gui {
27
28// TODO: establish SST between Core & Edge for thresholding constants
29constexpr float pulse_log_snr_threshold = 2.35; // Defined Sept 2024, taken from line 1062 of compute_metrics.py
30constexpr float breathing_log_snr_threshold = 1.7; // Defined Oct 2024 (after changing PW =2), taken from line 1115 of compute_metrics.py
31constexpr float min_supported_breathing_rate = 8.0;
32constexpr float max_supported_breathing_rate = 31.0;
33
34bool is_pulse_high_confidence(float snr);
35bool is_breathing_high_confidence(float snr);
36bool is_breathing_rate_high_confidence(float snr, float rate);
37
38
39
40} // namespace presage::smartspectra::gui