fixed crashes in camshiftdemo sample

This commit is contained in:
Vadim Pisarevsky
2010-11-28 19:44:01 +00:00
parent 921c68de57
commit a3dfba36a1
2 changed files with 4 additions and 5 deletions

View File

@@ -892,7 +892,7 @@ EllipseEx( Mat& img, Point center, Size axes,
int angle, int arc_start, int arc_end,
const void* color, int thickness, int line_type )
{
CV_Assert( axes.width >= 0 && axes.height >= 0 );
axes.width = std::abs(axes.width), axes.height = std::abs(axes.height);
int delta = (std::max(axes.width,axes.height)+(XY_ONE>>1))>>XY_SHIFT;
delta = delta < 3 ? 90 : delta < 10 ? 30 : delta < 15 ? 18 : 5;