[News] findContours doesn't alter the input image !
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.