From bbf1c02e799573532d1f5416fafe1b2255168bba Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 30 May 2021 20:22:59 +0200 Subject: Contour finding tests run through --- svg-flatten/src/nopencv.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'svg-flatten/src/nopencv.hpp') diff --git a/svg-flatten/src/nopencv.hpp b/svg-flatten/src/nopencv.hpp index b749808..98f6f50 100644 --- a/svg-flatten/src/nopencv.hpp +++ b/svg-flatten/src/nopencv.hpp @@ -65,6 +65,14 @@ namespace gerbolyze { return m_data[y*m_cols + x]; }; + void set_at(int x, int y, int val) { + assert(x >= 0 && y >= 0 && x < m_cols && y < m_rows); + assert(m_data != nullptr); + + m_data[y*m_cols + x] = val; + cerr << "set_at " << x << " " << y << ": " << val << " -> " << at(x, y) << endl; + }; + const int32_t &at(int x, int y) const { assert(x >= 0 && y >= 0 && x < m_cols && y < m_rows); assert(m_data != nullptr); @@ -92,7 +100,7 @@ namespace gerbolyze { int m_rows=0, m_cols=0; }; - void find_blobs(Image32 img, ContourCallback cb); + void find_blobs(Image32 &img, ContourCallback cb); } } -- cgit