DocsSmartSpectra
Browse documentation
Desktop / C++

Get Started with the SmartSpectra C++ SDK

View MarkdownView source

Cross-platform C++ SDK for measuring vitals and waveform shapes (pulse, breathing, relative arterial pressure, and more) from a camera. Headless by default with optional preview frames; runs on Linux, macOS, and Windows.

Supported Platforms

PlatformStatusNotes
Ubuntu 22.04 / Mint 21 (amd64)ExperimentalDebian package available
Ubuntu 22.04 / Mint 21 (arm64)ExperimentalDebian package available
Ubuntu 24.04 / Mint 22 (amd64)ExperimentalDebian package available via packages.presagetech.com apt channel
Ubuntu 24.04 / Mint 22 (arm64)ExperimentalDebian package available via packages.presagetech.com apt channel
macOS Apple Silicon (14.0+)SupportedHomebrew package available
Windows 10 / 11 (x64)ExperimentalZIP distribution available
macOS IntelNot supported—
Debian 13 / Trixie (amd64)ExperimentalDebian package available
Debian 13 / Trixie (arm64)ExperimentalDebian package available
Debian 12Not supported—
RHEL 9 / Fedora 41Not supported—

For platforms marked “Not supported” or anything not listed above, contact support@presagetech.com if you have a specific need.

Camera selection

On Linux, macOS, and Windows, discover cameras with SmartSpectra::AvailableCameras(cameras) and choose one with spectra.UseCamera(CameraSelection::ById(camera.id)).Build(). Default(), Front(), and Back() express a camera preference or requirement. Discovery also exists in the native C++ API on iOS. See the camera selection migration notes for platform support, errors, and a complete example.

Common Prerequisites

All platforms need:

The SDK package is self-contained — you do not need to install protobuf, curl, or OpenSSL separately on any platform.

Pick your platform

Each guide is self-contained: prerequisites → install → first running build.

Start with a full runnable sample: choose the quickstart for your platform below. Each guide includes a complete hello_vitals.cpp and CMakeLists.txt.

Scope

The quickstarts intentionally request only the breathing and cardio metric bundles, which is enough to see live values on the console. See the C++ API reference for the full requested_metrics catalog and custom-input pipeline.

If you need to redistribute a Linux desktop app without requiring end users to configure the Presage apt source, see Redistribute SmartSpectra on Linux.

Going further

Once your first build runs:

Logging

SDK log verbosity defaults to warnings and errors only. To change it, set log_level on the config before constructing SmartSpectra:

SmartSpectraConfig config;
config.api_key = "...";
config.log_level = presage::smartspectra::SmartSpectraLogLevel::kInfo;
SmartSpectra spectra(config);

Levels are cumulative — kDebug, kInfo, kWarning (default), kError, kNone. kDebug also enables verbose diagnostics where they exist, but it cannot restore debug-only statements compiled out of release binaries. A GLOG_minloglevel environment variable always takes precedence — when it is set, the SDK leaves logging untouched.

Bugs & Troubleshooting

Search quick starts, measurements, and API references.