Itseez/opencv — pull request #3006 by smvv (2014-07-26 15:04:52+00:00)
Title: Fix Python 2 bindings for findContours

The sanity check prevents Python 2 from calling findContours, because the
Python 2 bindings pass an empty matrix for `_contours`. If `_contours` is not
empty, the channel and depth check should determine whether the matrix is of
the correct type and size.

Note: the Python 2 bindings passes a matrix of type `STD_VECTOR_MAT` to
parameters of the type `OutputArrayOfArrays`.

This fixes the following bug reports:
- http://code.opencv.org/issues/3606
- http://code.opencv.org/issues/3809