Enable (shitty) contour simplification
I think my implementation of this algorithm is broken. It does something, but the output looks bad.
This commit is contained in:
parent
a26c04873e
commit
3ef3f0223e
1 changed files with 2 additions and 2 deletions
|
|
@ -436,7 +436,7 @@ void gerbolyze::OpenCVContoursVectorizer::vectorize_image(xform2d &mat, const pu
|
|||
draw_bg_rect(local_xf, width, height, clip_path, sink);
|
||||
|
||||
img->binarize();
|
||||
nopencv::find_contours(*img, [&sink, &local_xf, &clip_path, off_x, off_y, scale_x, scale_y](Polygon_i& poly, nopencv::ContourPolarity pol) {
|
||||
nopencv::find_contours(*img, nopencv::simplify_contours_teh_chin([&sink, &local_xf, &clip_path, off_x, off_y, scale_x, scale_y](Polygon_i& poly, nopencv::ContourPolarity pol) {
|
||||
|
||||
if (pol == nopencv::CP_HOLE) {
|
||||
std::reverse(poly.begin(), poly.end());
|
||||
|
|
@ -476,7 +476,7 @@ void gerbolyze::OpenCVContoursVectorizer::vectorize_image(xform2d &mat, const pu
|
|||
});
|
||||
sink << out;
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
gerbolyze::VectorizerSelectorizer::VectorizerSelectorizer(const string default_vectorizer, const string defs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue