zoukankan      html  css  js  c++  java
  • opencv rectangle

    opencv   rectangle

    void rectangle( InputOutputArray _img, Point pt1, Point pt2,
                    const Scalar& color, int thickness,
                    int lineType, int shift )
    {
        CV_INSTRUMENT_REGION();
    
        Mat img = _img.getMat();
    
        if( lineType == CV_AA && img.depth() != CV_8U )
            lineType = 8;
    
        CV_Assert( thickness <= MAX_THICKNESS );
        CV_Assert( 0 <= shift && shift <= XY_SHIFT );
    
        double buf[4];
        scalarToRawData(color, buf, img.type(), 0);
    
        Point2l pt[4];
    
        pt[0] = pt1;
        pt[1].x = pt2.x;
        pt[1].y = pt1.y;
        pt[2] = pt2;
        pt[3].x = pt1.x;
        pt[3].y = pt2.y;
    
        if( thickness >= 0 )
            PolyLine( img, pt, 4, true, buf, thickness, lineType, shift );
        else
            FillConvexPoly( img, pt, 4, buf, lineType, shift );
    }
    void rectangle( InputOutputArray img, Rect rec,
                    const Scalar& color, int thickness,
                    int lineType, int shift )
    {
        CV_INSTRUMENT_REGION();
    
        if( !rec.empty() )
            rectangle( img, rec.tl(), rec.br() - Point(1<<shift,1<<shift),
                       color, thickness, lineType, shift );
    }

    ############################################

    QQ 3087438119
  • 相关阅读:
    图形验证码---pillow
    vue富文本编辑器vue-quill-editor
    django邮件发送
    Django REST Framework JWT
    jwt验证
    使用django的用户表进行登录管理
    [转]CSRF漏洞详细说明
    Django框架10
    Django框架09
    Django框架08
  • 原文地址:https://www.cnblogs.com/herd/p/15413905.html
Copyright © 2011-2022 走看看