From c492ec49d04d7b64993f5f85f340dea29d26cf8a Mon Sep 17 00:00:00 2001 From: deadprogram Date: Thu, 5 Oct 2017 17:47:19 +0200 Subject: [PATCH] opencv: correct formatting in face detect example Signed-off-by: deadprogram --- examples/opencv_face_detect.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/opencv_face_detect.go b/examples/opencv_face_detect.go index a4025f94..c4fa6612 100644 --- a/examples/opencv_face_detect.go +++ b/examples/opencv_face_detect.go @@ -7,11 +7,10 @@ package main import ( "path" "runtime" - //"time" + "github.com/hybridgroup/gocv" "gobot.io/x/gobot" "gobot.io/x/gobot/platforms/opencv" - "github.com/hybridgroup/gocv" ) func main() { @@ -19,7 +18,7 @@ func main() { cascade := path.Join(path.Dir(currentfile), "haarcascade_frontalface_alt.xml") window := opencv.NewWindowDriver() - camera := opencv.NewCameraDriver(0) + camera := opencv.NewCameraDriver(1) work := func() { camera.On(opencv.Frame, func(data interface{}) { @@ -27,7 +26,7 @@ func main() { faces := opencv.DetectFaces(cascade, i) opencv.DrawRectangles(i, faces, 0, 255, 0, 5) window.ShowImage(i) - window.WaitKey(1) + window.WaitKey(1) }) }