From d59a6b29d59018816ed52d64968632e83fd20f71 Mon Sep 17 00:00:00 2001 From: Marek Nogacki Date: Thu, 7 May 2015 11:15:11 +0200 Subject: [PATCH] fixed http://code.opencv.org/issues/4276 - removed drawing thickness upper limit --- modules/imgproc/src/drawing.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/modules/imgproc/src/drawing.cpp b/modules/imgproc/src/drawing.cpp index e52312a3b8..e8997d306c 100644 --- a/modules/imgproc/src/drawing.cpp +++ b/modules/imgproc/src/drawing.cpp @@ -1664,7 +1664,7 @@ void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color, if( line_type == CV_AA && img.depth() != CV_8U ) line_type = 8; - CV_Assert( 0 <= thickness && thickness <= 255 ); + CV_Assert( 0 <= thickness ); CV_Assert( 0 <= shift && shift <= XY_SHIFT ); double buf[4]; @@ -1699,7 +1699,6 @@ void rectangle( InputOutputArray _img, Point pt1, Point pt2, if( lineType == CV_AA && img.depth() != CV_8U ) lineType = 8; - CV_Assert( thickness <= 255 ); CV_Assert( 0 <= shift && shift <= XY_SHIFT ); double buf[4]; @@ -1740,8 +1739,7 @@ void circle( InputOutputArray _img, Point center, int radius, if( line_type == CV_AA && img.depth() != CV_8U ) line_type = 8; - CV_Assert( radius >= 0 && thickness <= 255 && - 0 <= shift && shift <= XY_SHIFT ); + CV_Assert( radius >= 0 && 0 <= shift && shift <= XY_SHIFT ); double buf[4]; scalarToRawData(color, buf, img.type(), 0); @@ -1769,7 +1767,7 @@ void ellipse( InputOutputArray _img, Point center, Size axes, line_type = 8; CV_Assert( axes.width >= 0 && axes.height >= 0 && - thickness <= 255 && 0 <= shift && shift <= XY_SHIFT ); + 0 <= shift && shift <= XY_SHIFT ); double buf[4]; scalarToRawData(color, buf, img.type(), 0); @@ -1794,8 +1792,7 @@ void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color, if( lineType == CV_AA && img.depth() != CV_8U ) lineType = 8; - CV_Assert( box.size.width >= 0 && box.size.height >= 0 && - thickness <= 255 ); + CV_Assert( box.size.width >= 0 && box.size.height >= 0 ); double buf[4]; scalarToRawData(color, buf, img.type(), 0); @@ -1857,8 +1854,7 @@ void polylines( Mat& img, const Point* const* pts, const int* npts, int ncontour line_type = 8; CV_Assert( pts && npts && ncontours >= 0 && - 0 <= thickness && thickness <= 255 && - 0 <= shift && shift <= XY_SHIFT ); + 0 <= thickness && 0 <= shift && shift <= XY_SHIFT ); double buf[4]; scalarToRawData( color, buf, img.type(), 0 ); @@ -2378,8 +2374,6 @@ cvDrawContours( void* _img, CvSeq* contour, if( !contour ) return; - CV_Assert( thickness <= 255 ); - scalarToRawData( externalColor, ext_buf, img.type(), 0 ); scalarToRawData( holeColor, hole_buf, img.type(), 0 );