camera

package
v0.0.0-...-b302c77 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Overview

Package camera.

Index

Constants

View Source
const (
	PropBrightness    = v4l.CtrlBrightness
	PropContrast      = v4l.CtrlContrast
	PropSaturation    = v4l.CtrlSaturation
	PropHue           = v4l.CtrlHue
	PropGain          = v4l.CtrlGain
	PropExposure      = v4l.CtrlExposure
	PropWhiteBalanceU = v4l.CtrlWhiteBalance
	PropSharpness     = v4l.CtrlSharpness
	PropWhiteBalanceV = v4l.CtrlDoWhiteBalance
	PropBacklight     = v4l.CtrlBacklightCompensation
)

Property identifiers.

Variables

This section is empty.

Functions

This section is empty.

Types

type Camera

type Camera struct {
	// contains filtered or unexported fields
}

Camera represents camera.

func New

func New(opts Options) (camera *Camera, err error)

New returns new Camera for given camera index.

func (*Camera) Close

func (c *Camera) Close() (err error)

Close closes camera.

func (*Camera) GetProperty

func (c *Camera) GetProperty(id int) float64

GetProperty returns the specified camera property.

func (*Camera) Read

func (c *Camera) Read() (img image.Image, err error)

Read reads next frame from camera and returns image.

func (*Camera) SetProperty

func (c *Camera) SetProperty(id int, value float64)

SetProperty sets a camera property.

type Options

type Options struct {
	Index     int
	Rotate    int
	Width     float64
	Height    float64
	Timestamp bool
}

Options.

Jump to

Keyboard shortcuts

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