From 3b05931b1baf1a170674df531b625c5d24254a1c Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期二, 02 七月 2019 10:36:23 +0800 Subject: [PATCH] --- --- util/simpleCV.go | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/util/simpleCV.go b/util/simpleCV.go index 2cb0f81..aaaf30b 100644 --- a/util/simpleCV.go +++ b/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, 250), green, 2) + gocv.Line(&rook, image.Pt(100, 250), image.Pt(250, 250), green, 2) + gocv.Line(&rook, image.Pt(250, 250), image.Pt(250, 100), green, 2) + gocv.Line(&rook, image.Pt(250, 100), image.Pt(100, 100), green, 2) //return nil,nil // 涓婁紶 -- Gitblit v1.8.0