Ask Your Question

[News] findContours doesn't alter the input image !

asked 2017-02-19 11:36:49 -0500

pklab gravatar image

updated 2017-02-19 11:59:31 -0500

Just discovered from findContours master doc

Since opencv 3.2 source image is not modified by this function.

not so small change!

Looking at findContours 3.2.0 code, it does a copy of source image internally therefore user should avoid to create a clone of the image because it's completely a waste of time ! As consequence the chain code image is no more returned

Up to 3.1.0, source image should be cloned by the user because the function was working on the input image returning the chain code in it.

All is started on with a workaround to allow contours detection on image border PR #7516 merged into master on 30 Oct 2016.

Maybe you already know but I suppose that many users can't because isn't the 3.2.0 official doc.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-02-19 13:20:49 -0500

LBerger gravatar image

updated 2017-02-19 13:22:54 -0500

Yes it is in 3.2-dev doc because somebody ask a question here and after test and test

Then there is also this ....

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-02-19 11:36:49 -0500

Seen: 328 times

Last updated: Feb 19 '17