opencv: correct formatting in face detect example
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
b66c038c5c
commit
c492ec49d0
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue