From 461919b86da883133ddc6d30bf684539cc0d3b1a Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期二, 02 七月 2019 10:34:38 +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..dedfb87 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, 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
 	// 涓婁紶

--
Gitblit v1.8.0