1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Backport C-API cleanup (imgproc) from 5.x

This commit is contained in:
Maksim Shabunin
2023-01-16 23:29:50 +03:00
parent c63d79c5b1
commit c1e5c16ff3
34 changed files with 206 additions and 397 deletions
+14 -14
View File
@@ -1111,7 +1111,7 @@ FillConvexPoly( Mat& img, const Point2l* v, int npts, const void* color, int lin
Point2l p0;
int delta1, delta2;
if( line_type < CV_AA )
if( line_type < cv::LINE_AA )
delta1 = delta2 = XY_ONE >> 1;
else
delta1 = XY_ONE - 1, delta2 = 0;
@@ -1181,7 +1181,7 @@ FillConvexPoly( Mat& img, const Point2l* v, int npts, const void* color, int lin
do
{
if( line_type < CV_AA || y < (int)ymax || y == (int)ymin )
if( line_type < cv::LINE_AA || y < (int)ymax || y == (int)ymin )
{
for( i = 0; i < 2; i++ )
{
@@ -1277,7 +1277,7 @@ CollectPolyEdges( Mat& img, const Point2l* v, int count, std::vector<PolyEdge>&
pt1.x = (pt1.x + offset.x) << (XY_SHIFT - shift);
pt1.y = (pt1.y + delta) >> shift;
if( line_type < CV_AA )
if( line_type < cv::LINE_AA )
{
t0.y = pt0.y; t1.y = pt1.y;
t0.x = (pt0.x + (XY_ONE >> 1)) >> XY_SHIFT;
@@ -1632,7 +1632,7 @@ ThickLine( Mat& img, Point2l p0, Point2l p1, const void* color,
if( thickness <= 1 )
{
if( line_type < CV_AA )
if( line_type < cv::LINE_AA )
{
if( line_type == 1 || line_type == 4 || shift == 0 )
{
@@ -1678,7 +1678,7 @@ ThickLine( Mat& img, Point2l p0, Point2l p1, const void* color,
{
if( flags & (i+1) )
{
if( line_type < CV_AA )
if( line_type < cv::LINE_AA )
{
Point center;
center.x = (int)((p0.x + (XY_ONE>>1)) >> XY_SHIFT);
@@ -1796,7 +1796,7 @@ void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color,
Mat img = _img.getMat();
if( line_type == CV_AA && img.depth() != CV_8U )
if( line_type == cv::LINE_AA && img.depth() != CV_8U )
line_type = 8;
CV_Assert( 0 < thickness && thickness <= MAX_THICKNESS );
@@ -1835,7 +1835,7 @@ void rectangle( InputOutputArray _img, Point pt1, Point pt2,
Mat img = _img.getMat();
if( lineType == CV_AA && img.depth() != CV_8U )
if( lineType == cv::LINE_AA && img.depth() != CV_8U )
lineType = 8;
CV_Assert( thickness <= MAX_THICKNESS );
@@ -1885,7 +1885,7 @@ void circle( InputOutputArray _img, Point center, int radius,
Mat img = _img.getMat();
if( line_type == CV_AA && img.depth() != CV_8U )
if( line_type == cv::LINE_AA && img.depth() != CV_8U )
line_type = 8;
CV_Assert( radius >= 0 && thickness <= MAX_THICKNESS &&
@@ -1917,7 +1917,7 @@ void ellipse( InputOutputArray _img, Point center, Size axes,
Mat img = _img.getMat();
if( line_type == CV_AA && img.depth() != CV_8U )
if( line_type == cv::LINE_AA && img.depth() != CV_8U )
line_type = 8;
CV_Assert( axes.width >= 0 && axes.height >= 0 &&
@@ -1947,7 +1947,7 @@ void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color,
Mat img = _img.getMat();
if( lineType == CV_AA && img.depth() != CV_8U )
if( lineType == cv::LINE_AA && img.depth() != CV_8U )
lineType = 8;
CV_Assert( box.size.width >= 0 && box.size.height >= 0 &&
@@ -1978,7 +1978,7 @@ void fillConvexPoly( InputOutputArray _img, const Point* pts, int npts,
if( !pts || npts <= 0 )
return;
if( line_type == CV_AA && img.depth() != CV_8U )
if( line_type == cv::LINE_AA && img.depth() != CV_8U )
line_type = 8;
double buf[4];
@@ -1996,7 +1996,7 @@ void fillPoly( InputOutputArray _img, const Point** pts, const int* npts, int nc
Mat img = _img.getMat();
if( line_type == CV_AA && img.depth() != CV_8U )
if( line_type == cv::LINE_AA && img.depth() != CV_8U )
line_type = 8;
CV_Assert( pts && npts && ncontours >= 0 && 0 <= shift && shift <= XY_SHIFT );
@@ -2027,7 +2027,7 @@ void polylines( InputOutputArray _img, const Point* const* pts, const int* npts,
Mat img = _img.getMat();
if( line_type == CV_AA && img.depth() != CV_8U )
if( line_type == cv::LINE_AA && img.depth() != CV_8U )
line_type = 8;
CV_Assert( pts && npts && ncontours >= 0 &&
@@ -2572,7 +2572,7 @@ cvDrawContours( void* _img, CvSeq* contour,
cv::Point offset = _offset;
double ext_buf[4], hole_buf[4];
if( line_type == CV_AA && img.depth() != CV_8U )
if( line_type == cv::LINE_AA && img.depth() != CV_8U )
line_type = 8;
if( !contour )