datastore

package
v0.0.0-...-1174e2e Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NORMALRENDERING draws circles around heads
	NORMALRENDERING = iota
	// FUNRENDERING draws logos instead on top of heads
	FUNRENDERING
)

Variables

This section is empty.

Functions

func Camera

func Camera() int

Camera return current camera number set

func FaceDetection

func FaceDetection() bool

FaceDetection tells if detection is on or off

func SetCamera

func SetCamera(cameranum int)

SetCamera save active camera number

func SetFaceDetection

func SetFaceDetection(faceDetection bool)

SetFaceDetection save new detection state

func SetRenderingMode

func SetRenderingMode(renderingMode RenderMode)

SetRenderingMode save new rendering mode

func StartDB

func StartDB(dir string, shutdown <-chan interface{}, wg *sync.WaitGroup)

StartDB opens and run the DB in its own goroutine

func WipeDB

func WipeDB(dir string)

WipeDB removes database in dir unconditionally (existing or not)

Types

type Database

type Database struct {

	// Stats has the full collection of added Stat from the DB or live
	Stats []Stat
	// contains filtered or unexported fields
}

Database is the global DB handler

var (
	// DB main object
	DB Database
)

func (*Database) Add

func (db *Database) Add(s Stat)

Add current stat to the DB and global stats

type RenderMode

type RenderMode int

RenderMode corresponds to various rendering mode options (fun, normal…)

func RenderingMode

func RenderingMode() RenderMode

RenderingMode return current rendering mode

type Stat

type Stat struct {
	TimeStamp  time.Time
	NumPersons int
}

Stat is a datapoint in time of collected face detected stats

Jump to

Keyboard shortcuts

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