package main
import (
"gocv.io/x/gocv"
"time"
)
func main() {
webcam, _ := gocv.OpenVideoCapture(0)
img := gocv.NewMat()
file_name := "/tmp/hoge.png"
time.Sleep(1 * time.Second)
webcam.Read(&img)
gocv.IMWrite(file_name, img)
}
Comments