1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2018-09-07 12:40:27 +03:00
141 changed files with 3074 additions and 4777 deletions
+8 -17
View File
@@ -2478,7 +2478,7 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours,
CV_INSTRUMENT_REGION()
Mat image = _image.getMat(), hierarchy = _hierarchy.getMat();
CvMat _cimage = image;
CvMat _cimage = cvMat(image);
size_t ncontours = _contours.total();
size_t i = 0, first = 0, last = ncontours;
@@ -2547,8 +2547,8 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours,
}
}
cvDrawContours( &_cimage, &seq[first], color, color, contourIdx >= 0 ?
-maxLevel : maxLevel, thickness, lineType, offset );
cvDrawContours( &_cimage, &seq[first], cvScalar(color), cvScalar(color), contourIdx >= 0 ?
-maxLevel : maxLevel, thickness, lineType, cvPoint(offset) );
}
@@ -2559,11 +2559,6 @@ static const int CodeDeltas[8][2] =
#define CV_ADJUST_EDGE_COUNT( count, seq ) \
((count) -= ((count) == (seq)->total && !CV_IS_SEQ_CLOSED(seq)))
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
CV_IMPL void
cvDrawContours( void* _img, CvSeq* contour,
CvScalar _externalColor, CvScalar _holeColor,
@@ -2657,14 +2652,14 @@ cvDrawContours( void* _img, CvSeq* contour,
int shift = 0;
count -= !CV_IS_SEQ_CLOSED(contour);
CV_READ_SEQ_ELEM( pt1, reader );
{ CvPoint pt_ = CV_STRUCT_INITIALIZER; CV_READ_SEQ_ELEM(pt_, reader); pt1 = pt_; }
pt1 += offset;
if( thickness < 0 )
pts.push_back(pt1);
for( i = 0; i < count; i++ )
{
CV_READ_SEQ_ELEM( pt2, reader );
{ CvPoint pt_ = CV_STRUCT_INITIALIZER; CV_READ_SEQ_ELEM(pt_, reader); pt2 = pt_; }
pt2 += offset;
if( thickness >= 0 )
cv::ThickLine( img, pt1, pt2, clr, thickness, line_type, 2, shift );
@@ -2706,7 +2701,7 @@ cvEllipse2Poly( CvPoint center, CvSize axes, int angle,
CV_IMPL CvScalar
cvColorToScalar( double packed_color, int type )
{
CvScalar scalar;
cv::Scalar scalar;
if( CV_MAT_DEPTH( type ) == CV_8U )
{
@@ -2764,7 +2759,7 @@ cvColorToScalar( double packed_color, int type )
}
}
return scalar;
return cvScalar(scalar);
}
CV_IMPL int
@@ -2892,11 +2887,7 @@ cvGetTextSize( const char *text, const CvFont *_font, CvSize *_size, int *_base_
cv::Size size = cv::getTextSize( text, _font->font_face, (_font->hscale + _font->vscale)*0.5,
_font->thickness, _base_line );
if( _size )
*_size = size;
*_size = cvSize(size);
}
#if defined __GNUC__ && __GNUC__ >= 8
#pragma GCC diagnostic pop // "-Wclass-memaccess"
#endif
/* End of file. */