no really, I fixed the initialization bug
This commit is contained in:
parent
f457299f50
commit
300367c00b
3
main.go
3
main.go
@ -56,12 +56,13 @@ func main() {
|
|||||||
|
|
||||||
fmt.Printf("Start reading device: %v\n", deviceID)
|
fmt.Printf("Start reading device: %v\n", deviceID)
|
||||||
|
|
||||||
// This is a warm up ladies and gentlemen.
|
// This is a warm up ladies and gentlemen.
|
||||||
for i := 0; i < 20; i++ {
|
for i := 0; i < 20; i++ {
|
||||||
if ok := webcam.Read(&img); !ok {
|
if ok := webcam.Read(&img); !ok {
|
||||||
fmt.Printf("Device closed: %v\n", deviceID)
|
fmt.Printf("Device closed: %v\n", deviceID)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
detectMotion(img)
|
||||||
}
|
}
|
||||||
|
|
||||||
// main loop
|
// main loop
|
||||||
|
Loading…
Reference in New Issue
Block a user