forked from hybridgroup/gobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.go
43 lines (31 loc) · 901 Bytes
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
Package opencv contains the Gobot drivers for opencv.
Installing:
This package requires `opencv` to be installed on your system
Then you can install the package with:
go get gobot.io/x/gobot && go install gobot.io/x/gobot/platforms/opencv
Example:
package main
import (
cv "gobot.io/x/go-opencv/opencv"
"gobot.io/x/gobot"
"gobot.io/x/gobot/platforms/opencv"
)
func main() {
window := opencv.NewWindowDriver()
camera := opencv.NewCameraDriver(0)
work := func() {
camera.On(camera.Event("frame"), func(data interface{}) {
window.ShowImage(data.(*cv.IplImage))
})
}
robot := gobot.NewRobot("cameraBot",
[]gobot.Device{window, camera},
work,
)
robot.Start()
}
For further information refer to opencv README:
https://github.com/hybridgroup/gobot/blob/master/platforms/opencv/README.md
*/
package opencv // import "gobot.io/x/gobot/platforms/opencv"