camera

package
v0.0.0-...-31ab637 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2019 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Binarize

func Binarize(src gocv.Mat, dst *gocv.Mat)

func Equalize

func Equalize(src gocv.Mat, dst *gocv.Mat)

func MakeQuantize

func MakeQuantize(max int) func(gocv.Mat, *gocv.Mat)

Types

type Camera

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

func New

func New(id int, t WriterType) (*Camera, error)

New creates a new Camera. Parameter id is the USB device ID to be used. Argument t is type of Writer (Window or direct to file).

func (*Camera) Close

func (C *Camera) Close()

Close closes all buffers.

func (*Camera) Draw

func (C *Camera) Draw(D func(src gocv.Mat, dst *gocv.Mat))

Draw draws the original video frame to the writer. If D is not nil, then apply some drawing function to it first.

func (*Camera) Instance

func (C *Camera) Instance() map[int]int

Instance converts a gocv.Mat to an spn.VarSet.

func (*Camera) Update

func (C *Camera) Update(T func(src gocv.Mat, dst *gocv.Mat))

Update applies a transformation to the original video frame. If T is nil, then only apply grayscale and resizing.

type CameraWriter

type CameraWriter interface {
	Write(M gocv.Mat)
	Close()
}

type Recorder

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

func NewRecorder

func NewRecorder(w, h int) *Recorder

func (*Recorder) Close

func (r *Recorder) Close()

func (*Recorder) Write

func (r *Recorder) Write(M gocv.Mat)

type Window

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

func NewWindow

func NewWindow() *Window

func (*Window) Close

func (w *Window) Close()

func (*Window) Write

func (w *Window) Write(M gocv.Mat)

type WriterType

type WriterType int
const (
	WriterTypeWindow   WriterType = 0
	WriterTypeRecorder WriterType = 1
)

Jump to

Keyboard shortcuts

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