Merge pull request from StevenPuttemans:bugfix_3101

This commit is contained in:
Andrey Pavlenko 2013-07-31 15:14:03 +04:00 committed by OpenCV Buildbot
commit 4c35449b7d

@ -886,11 +886,13 @@ void ellipse2Poly( Point center, Size axes, int angle,
Point pt;
pt.x = cvRound( cx + x * alpha - y * beta );
pt.y = cvRound( cy + x * beta + y * alpha );
if( pt != prevPt )
if( pt != prevPt ){
pts.push_back(pt);
prevPt = pt;
}
}
if( pts.size() < 2 )
if( pts.size() == 1 )
pts.push_back(pts[0]);
}