zoukankan      html  css  js  c++  java
  • opencv fillPoly

    opencv   fillPoly

    void fillPoly( InputOutputArray _img, const Point** pts, const int* npts, int ncontours,
                   const Scalar& color, int line_type,
                   int shift, Point offset )
    {
        CV_INSTRUMENT_REGION();
    
        Mat img = _img.getMat();
    
        if( line_type == CV_AA && img.depth() != CV_8U )
            line_type = 8;
    
        CV_Assert( pts && npts && ncontours >= 0 && 0 <= shift && shift <= XY_SHIFT );
    
        double buf[4];
        scalarToRawData(color, buf, img.type(), 0);
    
        std::vector<PolyEdge> edges;
    
        int i, total = 0;
        for( i = 0; i < ncontours; i++ )
            total += npts[i];
    
        edges.reserve( total + 1 );
        for (i = 0; i < ncontours; i++)
        {
            std::vector<Point2l> _pts(pts[i], pts[i] + npts[i]);
            CollectPolyEdges(img, _pts.data(), npts[i], edges, buf, line_type, shift, offset);
        }
    
        FillEdgeCollection(img, edges, buf);
    }

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

    QQ 3087438119
  • 相关阅读:
    Codeforces 1000C Covered Points Count
    Array类型
    Object对象
    变量、作用域与内存
    window.onload 方法脚本
    页面的性能优化
    node属性
    JavaScript图片
    DOM节点
    canvas象棋 画图
  • 原文地址:https://www.cnblogs.com/herd/p/15416320.html
Copyright © 2011-2022 走看看