From 5e6df9ccf832d166bd231297b521394beec1fec6 Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Mon, 2 Dec 2024 19:42:15 +0100 Subject: line search --- imagealgos.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'imagealgos.h') diff --git a/imagealgos.h b/imagealgos.h index 77ac625..12dc8cf 100644 --- a/imagealgos.h +++ b/imagealgos.h @@ -6,6 +6,9 @@ #include +#include +#include + 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 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 pixelsToLines(const Pixels& rawProfile); +QList pointsToLines(const QList& points); -- cgit v1.2.3-70-g09d2