diff options
author | jaseg <git@jaseg.de> | 2021-05-30 20:22:59 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-05-30 20:22:59 +0200 |
commit | bbf1c02e799573532d1f5416fafe1b2255168bba (patch) | |
tree | e695d9cb5d2c311f3581f7e123669f072000fd30 /svg-flatten/src/nopencv.hpp | |
parent | d1755701779b88389dc1d2e30d2430320a17f78e (diff) | |
download | gerbolyze-bbf1c02e799573532d1f5416fafe1b2255168bba.tar.gz gerbolyze-bbf1c02e799573532d1f5416fafe1b2255168bba.tar.bz2 gerbolyze-bbf1c02e799573532d1f5416fafe1b2255168bba.zip |
Contour finding tests run through
Diffstat (limited to 'svg-flatten/src/nopencv.hpp')
-rw-r--r-- | svg-flatten/src/nopencv.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
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); } } |