gocv
gocv copied to clipboard
unable to Set FPS
Description
unable to change frame per second value.
Steps to Reproduce
// open webcam
webcam, err = gocv.OpenVideoCapture(deviceID)
if err != nil {
fmt.Printf("Error opening capture device: %v\n", deviceID)
return
}
defer webcam.Close()
webcam.Set(5, 10)
log.Println(webcam.Get(5))
output
30
Your Environment
- Operating System and version: Ubuntu 20.04.2 LTS - 64bit
- OpenCV version used: opencv lib version: 4.5.3
- How did you install OpenCV? followed this -> https://pkg.go.dev/gocv.io/x/gocv#readme-ubuntu-linux
- GoCV version used: gocv version: 0.28.0
- Go version: go1.16.3
- Did you run the
env.sh
orenv.cmd
script before trying togo run
orgo build
? No
same problem
#913 same problem
You should use webca.Grab(webcam.Get(gocv.VideoCaptureFPS) - yourFps)
to skip frames before calling webcam.Read()