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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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