diff options
| author | Nikita Kostovsky <nikita@kostovsky.me> | 2025-01-12 11:50:34 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <nikita@kostovsky.me> | 2025-01-12 11:50:34 +0100 |
| commit | 9dde2ab53c8e2c97647164fce89cf149260fbc8f (patch) | |
| tree | f428169ce67a93d0532d91883e18892736bb26b4 /src/pixels.h | |
| parent | 8630381c7e1fa1527026b9c823790dc3f92c6321 (diff) | |
implement calibration
Diffstat (limited to 'src/pixels.h')
| -rw-r--r-- | src/pixels.h | 32 |
1 files changed, 32 insertions, 0 deletions
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 <array> + +#include "fuck_intel.h" + +#include <QString> + +#include "typedefs.h" + +struct Pixels +{ + Counters counters{}; + std::array<float, img_width> 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<Pixels> 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); +}; |
