| | |
| | | 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 |
| | | // 上传 |