diff options
Diffstat (limited to 'imagealgos.h')
| -rw-r--r-- | imagealgos.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/imagealgos.h b/imagealgos.h index 77ac625..12dc8cf 100644 --- a/imagealgos.h +++ b/imagealgos.h @@ -6,6 +6,9 @@ #include <libcamera/pixel_format.h> +#include <QLineF> +#include <QList> + constexpr size_t img_width = 1280; constexpr size_t img_height = 800; constexpr uint32_t patternSize = 16; @@ -37,8 +40,12 @@ struct Pixels { Counters counters {}; std::array<float, img_width> pixels { 0.f }; + + Pixels& operator+=(const Pixels& other); + Pixels& operator/=(const float divider); }; + size_t pgm_save(Image *img, FILE *outfile, bool really_save = false); void unpack_10bit(uint8_t const *src, Image const &image, uint16_t *dest); @@ -52,3 +59,6 @@ T median3(const T& a, const T& b, const T& c) { void rotate(Image & image); Pixels process_columns(Image & image); + +QList<QLineF> pixelsToLines(const Pixels& rawProfile); +QList<QLineF> pointsToLines(const QList<QPointF>& points); |
