panlei
2019-07-02 461919b86da883133ddc6d30bf684539cc0d3b1a
改用画线方式
1个文件已修改
22 ■■■■■ 已修改文件
util/simpleCV.go 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
util/simpleCV.go
@@ -172,15 +172,19 @@
    defer rook.Close()
    green := color.RGBA{0, 255, 0, 0}
    points := [][]image.Point{
        {
            image.Pt(100., 100),
            image.Pt(100., 400),
            image.Pt(400, 400),
            image.Pt(400, 100),
        },
    }
    gocv.FillPoly(&rook, points, green)
    //points := [][]image.Point{
    //    {
    //        image.Pt(100., 100),
    //        image.Pt(100., 400),
    //        image.Pt(400, 400),
    //        image.Pt(400, 100),
    //    },
    //}
    //gocv.FillPoly(&rook, points, green)
    gocv.Line(&rook, image.Pt(100, 100), image.Pt(100, 400), green, 2)
    gocv.Line(&rook, image.Pt(100, 400), image.Pt(400, 400), green, 2)
    gocv.Line(&rook, image.Pt(400, 400), image.Pt(400, 100), green, 2)
    gocv.Line(&rook, image.Pt(400, 100), image.Pt(100, 100), green, 2)
    //return nil,nil
    // 上传