opencv: update to latest version of GoCV

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans 2018-04-24 12:56:26 +02:00
parent 9d4969ccdd
commit b082d6739a
5 changed files with 8 additions and 8 deletions

6
Gopkg.lock generated
View File

@ -166,8 +166,8 @@
[[projects]]
name = "gocv.io/x/gocv"
packages = ["."]
revision = "65d6ebdd323af342cc48ac0d146ef7ad16b33fbc"
version = "v0.9.0"
revision = "ab6d932219faf43e531eea89ef3496cdb67aa734"
version = "0.11.0"
[[projects]]
branch = "master"
@ -209,6 +209,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "ce3deb9e4c499f6262bf532372e9f8fec873daa6ddb9c19d2a0ecc55d2c50da4"
inputs-digest = "c43dc994a8c7f2d4c032139478a57e90a174738d54033e5076e9705e13352dda"
solver-name = "gps-cdcl"
solver-version = 1

View File

@ -75,7 +75,7 @@
[[constraint]]
name = "gocv.io/x/gocv"
version = "0.9.0"
version = "0.11.0"
[[constraint]]
branch = "master"

View File

@ -8,7 +8,7 @@ import (
)
type capture interface {
Read(img gocv.Mat) bool
Read(img *gocv.Mat) bool
}
const (
@ -67,7 +67,7 @@ func (c *CameraDriver) Start() (err error) {
img := gocv.NewMat()
go func() {
for {
if ok := c.camera.Read(img); ok {
if ok := c.camera.Read(&img); ok {
c.Publish(Frame, img)
}
}

View File

@ -6,7 +6,7 @@ import (
type testCapture struct{}
func (c *testCapture) Read(img gocv.Mat) bool {
func (c *testCapture) Read(img *gocv.Mat) bool {
return true
}

View File

@ -29,7 +29,7 @@ func DetectObjects(haar string, img gocv.Mat) []image.Rectangle {
// DrawRectangles uses Rect array values to return image with rectangles drawn.
func DrawRectangles(img gocv.Mat, rects []image.Rectangle, r int, g int, b int, thickness int) {
for _, rect := range rects {
gocv.Rectangle(img, rect, color.RGBA{uint8(r), uint8(g), uint8(b), 0}, thickness)
gocv.Rectangle(&img, rect, color.RGBA{uint8(r), uint8(g), uint8(b), 0}, thickness)
}
return
}