https://github.com/adrianosela/goaway
An OpenCV based motion detector and utilities written in Golang
https://github.com/adrianosela/goaway
Last synced: 3 months ago
JSON representation
An OpenCV based motion detector and utilities written in Golang
- Host: GitHub
- URL: https://github.com/adrianosela/goaway
- Owner: adrianosela
- License: mit
- Created: 2019-05-08T16:05:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-19T21:35:00.000Z (over 3 years ago)
- Last Synced: 2024-06-21T14:41:07.626Z (12 months ago)
- Language: Go
- Homepage:
- Size: 108 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoAway - An OpenCV based motion detector written in Go
[](https://goreportcard.com/report/github.com/adrianosela/GoAway)
[](https://godoc.org/github.com/adrianosela/GoAway)
[](https://github.com/adrianosela/GoAway/issues)
[](https://github.com/adrianosela/GoAway/blob/master/LICENSE)**Complete examples can be found in the /examples subdirectory of this repository**
### Simple Usage
```
package mainimport (
"github.com/adrianosela/GoAway/detector"
)func main() {
md, err := detector.NewMotionDetector(0, "Motion Detector", nil)
defer md.Close()
if err != nil { /* handle error */ }
md.Start()
}
```### With On-Detect Function
```
import (
"github.com/adrianosela/GoAway/detector"
)func main() {
md, err := detector.NewMotionDetector(0, "Motion Detector", func() {
// do this whenever motion is detected
// e.g. log, send yourself an email, etc...
})
defer md.Close()
if err != nil { /* handle error */ }
md.Start()
}
```