snapshot

package
v0.0.0-...-934acc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

snapshot extracts image frames from a video stream.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(fs webcam.FrameSize, w, h int) bool

Return true if frame size can accomodate request.

Types

type Snapper

type Snapper struct {
	Timeout uint32
	Buffers uint32
	// contains filtered or unexported fields
}

func NewSnapper

func NewSnapper() *Snapper

NewSnapper creates a new Snapper.

func (*Snapper) Close

func (c *Snapper) Close()

Close releases all current frames and shuts down the webcam.

func (*Snapper) GetControl

func (c *Snapper) GetControl(id webcam.ControlID) (int32, error)

GetControl returns the current value of a camera control.

func (*Snapper) Open

func (c *Snapper) Open(device string, format frame.FourCC, w, h int) (ret error)

Open initialises the webcam ready for use, and begins streaming.

func (*Snapper) SetControl

func (c *Snapper) SetControl(id webcam.ControlID, value int32) error

SetControl sets the selected camera control.

func (*Snapper) Snap

func (c *Snapper) Snap() (frame.Frame, error)

Snap returns one frame from the camera.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL