camera

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package camera include camera modules

Index

Constants

This section is empty.

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 NewCamera

func NewCamera(device Device, detector *facenet.Instance) *Camera

NewCamera returns new Camera for given detector and device

func (*Camera) Close

func (c *Camera) Close() error

Close to close the camera

func (*Camera) Read

func (c *Camera) Read() (*Frame, error)

Start device start recording

func (*Camera) Start

func (c *Camera) Start() error

Start device start recording

type Device

type Device interface {
	Start() error
	Read() (image.Image, error)
	Close() error
	GetProperty(int) float64
	SetProperty(int, float64)
}

Device defines device interface

type Frame

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

Frame represents frame

func NewFrame

func NewFrame(img image.Image, markers *core.FaceMarkers) *Frame

NewFrame returns new Frame for given image and markers

func (*Frame) Create

func (f *Frame) Create(img image.Image, markers *core.FaceMarkers)

Create set image and markers in frame

func (*Frame) Image

func (f *Frame) Image(ins *facenet.Instance) image.Image

Image generate image from Frame

type Options

type Options struct {
	// Index device index
	Index int
	// Width frame width
	Width float64
	// Height frame height
	Height float64
	// Delay delay between two frames in milliseconds
	Delay int
}

Options device options

Directories

Path Synopsis
Package image utils.
Package image utils.
Package linux implement linux device
Package linux implement linux device

Jump to

Keyboard shortcuts

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