Commit 50a1def8 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3006 from smvv:fix_findContours_for_python2

parents cb492cc2 d25770ee
...@@ -1704,8 +1704,10 @@ void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours, ...@@ -1704,8 +1704,10 @@ void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours,
OutputArray _hierarchy, int mode, int method, Point offset ) OutputArray _hierarchy, int mode, int method, Point offset )
{ {
// Sanity check: output must be of type vector<vector<Point>> // Sanity check: output must be of type vector<vector<Point>>
CV_Assert( _contours.kind() == _InputArray::STD_VECTOR_VECTOR && CV_Assert((_contours.kind() == _InputArray::STD_VECTOR_VECTOR || _contours.kind() == _InputArray::STD_VECTOR_MAT ||
_contours.channels() == 2 && _contours.depth() == CV_32S ); _contours.kind() == _InputArray::STD_VECTOR_UMAT));
CV_Assert(_contours.empty() || (_contours.channels() == 2 && _contours.depth() == CV_32S));
Mat image = _image.getMat(); Mat image = _image.getMat();
MemStorage storage(cvCreateMemStorage()); MemStorage storage(cvCreateMemStorage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment