mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Merge pull request #26690 from MaximSmolskiy:speed-up-and-reduce-memory-consumption-for-findContours
Speed up and reduce memory consumption for findContours
This commit is contained in:
commit
4d26e16af8
@ -368,10 +368,6 @@ CNode& ContourScanner_::makeContour(schar& nbd_, const bool is_hole, const int x
|
||||
const Point start_pt(x - (is_hole ? 1 : 0), y);
|
||||
|
||||
CNode& res = tree.newElem();
|
||||
if (isChain)
|
||||
res.body.codes.reserve(200);
|
||||
else
|
||||
res.body.pts.reserve(200);
|
||||
res.body.isHole = is_hole;
|
||||
res.body.isChain = isChain;
|
||||
res.body.origin = start_pt + offset;
|
||||
|
Loading…
Reference in New Issue
Block a user