Reduce webcam resolution to 720p
This commit is contained in:
parent
ed240e2f40
commit
668f14e1b6
3
main.go
3
main.go
|
@ -402,6 +402,9 @@ func Webcam(input json.RawMessage) (string, error) {
|
||||||
}
|
}
|
||||||
defer webcam.Close()
|
defer webcam.Close()
|
||||||
|
|
||||||
|
webcam.Set(gocv.VideoCaptureFrameWidth, 1280.0)
|
||||||
|
webcam.Set(gocv.VideoCaptureFrameHeight, 720.0)
|
||||||
|
|
||||||
if !webcam.IsOpened() {
|
if !webcam.IsOpened() {
|
||||||
return "", errors.New("Unable to open video capture device")
|
return "", errors.New("Unable to open video capture device")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue