porting polylines with empty vector<Point> from 2.4 to master

This commit is contained in:
Andrey Pavlenko
2015-04-24 17:11:51 +03:00
parent 755527a90a
commit d2409d12c6
2 changed files with 22 additions and 0 deletions

View File

@@ -2229,7 +2229,10 @@ void cv::polylines(InputOutputArray _img, InputArrayOfArrays pts,
{
Mat p = pts.getMat(manyContours ? i : -1);
if( p.total() == 0 )
{
npts[i] = 0;
continue;
}
CV_Assert(p.checkVector(2, CV_32S) >= 0);
ptsptr[i] = p.ptr<Point>();
npts[i] = p.rows*p.cols*p.channels()/2;