Reduce webcam resolution to 720p
This commit is contained in:
parent
8572b1b17b
commit
4629ed8e71
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