From 9dde2ab53c8e2c97647164fce89cf149260fbc8f Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Sun, 12 Jan 2025 11:50:34 +0100 Subject: implement calibration --- src/pixels.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/pixels.h (limited to 'src/pixels.h') diff --git a/src/pixels.h b/src/pixels.h new file mode 100644 index 0000000..6095220 --- /dev/null +++ b/src/pixels.h @@ -0,0 +1,32 @@ +#pragma once + +#include + +#include "fuck_intel.h" + +#include + +#include "typedefs.h" + +struct Pixels +{ + Counters counters{}; + std::array pixels{0.f}; + + Pixels& operator+=(const Pixels& other); + Pixels& operator/=(const float divider); + + // TODO: tests for everything everywhere + /*! + * \brief load - load binary pixels from file + * \param filename - file path + * \return Pixels on success, empty std::optional otherwise + */ + [[nodiscard]] static std::optional load(const QString& filename); + /*! + * \brief save - save binary profile to file + * \param filename - file path + * \return - true on success, false otherwise + */ + [[nodiscard]] bool save(const QString& filename); +}; -- cgit v1.2.3-70-g09d2