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