4#include "internal/Image.h"
5#include "internal/PixelConverters.h"
6#include "internal/Point.h"
7#include "internal/RGBAPixel.h"
8#include "internal/SavitskyGolay.h"
23 float x, y, width, height;
29 std::vector<std::vector<Point>> contours;
30 std::vector<std::vector<QuadBezier>> curves;
34 std::vector<std::array<int, 4>> hierarchy;
37 std::vector<bool> is_hole;
43 std::vector<ImageLib::RGBAPixel<uint8_t>> colors;
47ContoursResult find_contours(
const std::vector<uint8_t>& binary,
int width,
int height);
49void stitch_smooth(std::vector<Point>& vecA, std::vector<Point>& vecB);
50void coupled_smooth(std::vector<std::vector<Point>>& contours,
Rect bounds);
64void coupled_smooth_junctions(
65 std::vector<std::vector<Point>>& contours,
Rect bounds, std::vector<uint8_t> junctions,
69void pack_with_boundary_constraints(
70 std::vector<std::vector<Point>>& contours,
Rect bounds,
int iterations = 15