processor

package
v0.0.0-...-3393559 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProcessorsList = []ListEntry{

	{Key: "stats_fps", Name: "FPS counter", Processor: new(stats.Fps)},

	{Key: "input_rtmp", Name: "Read from channel", Processor: new(input.Rtmp)},
	{Key: "input_cam", Name: "Read from camera", Processor: new(input.Camera)},

	{Key: "output_imshow", Name: "Output to window", Processor: new(output.IMShow)},

	{Key: "face_recogniser", Name: "Recognise faces", Processor: new(feature.RecogniseFaces)},

	{Key: "label_faces", Name: "Label faces", Processor: new(draw.LabeledBoxes)},

	{Key: "rgba_to_bgr", Name: "Color RGBA to BGR", Processor: new(color.RGBAToBGR)},

	{Key: "resize", Name: "Resize", Processor: new(transform.Resizer)},

	{Key: "cpy_to_ctx", Name: "Copy to context", Processor: new(context.FrameCpyToCtx)},
	{Key: "load_from_ctx", Name: "Load from context", Processor: new(context.FrameLoadFromCtx)},
}

Register your processor here

View Source
var ProcessorsMap map[string]MapEntry

Functions

func Create

func Create(w http.ResponseWriter, r *http.Request)

func CreateDefault

func CreateDefault(userId int)

func Delete

func Delete(w http.ResponseWriter, r *http.Request)

func Init

func Init()

func InitProcessorsMap

func InitProcessorsMap()

func List

func List(w http.ResponseWriter, r *http.Request)

func ListChoices

func ListChoices(w http.ResponseWriter, r *http.Request)

func Retrieve

func Retrieve(w http.ResponseWriter, r *http.Request)

func Run

func Run(w http.ResponseWriter, r *http.Request)

func Update

func Update(w http.ResponseWriter, r *http.Request)

Types

type Closer

type Closer interface {
	Close() error
}

type ContextInitializer

type ContextInitializer interface {
	InitCtx(*map[string]interface{}) error
}

type Defaulter

type Defaulter interface {
	Default() error
}

type FrameProcessor

type FrameProcessor interface {
	Process(*gocv.Mat) error
}

type FrameReader

type FrameReader interface {
	Read() (*gocv.Mat, error)
}

type Initializer

type Initializer interface {
	Init(map[string]interface{}) error
}

type ListEntry

type ListEntry struct {
	Key       string
	Name      string
	Processor interface{}
}

type MapEntry

type MapEntry struct {
	Name        string            `json:"name"`
	Default     interface{}       `json:"default"`
	Types       map[string]string `json:"types"`
	IsReader    bool              `json:"is_reader"`
	IsProcessor bool              `json:"is_processor"`
}

type ProcessingChain

type ProcessingChain struct {
	UserId          int
	ProcessingNodes []FrameProcessor
	ChainContext    map[string]interface{}
}

func (*ProcessingChain) Close

func (o *ProcessingChain) Close() (err error)

func (*ProcessingChain) Init

func (o *ProcessingChain) Init(p *Processor) (err error)

func (*ProcessingChain) Run

func (o *ProcessingChain) Run() (err error)

type ProcessingNode

type ProcessingNode struct {
	Key    string                 `json:"key"`
	Params map[string]interface{} `json:"params"`
}

type Processor

type Processor struct {
	Id      string           `json:"id"`
	OwnerId int              `json:"-"`
	Name    string           `json:"name"`
	Nodes   []ProcessingNode `json:"nodes"`
}

func (*Processor) BeforeInsert

func (i *Processor) BeforeInsert(db orm.DB) error

BeforeInsert hook executed before database insert operation.

func (*Processor) BeforeUpdate

func (i *Processor) BeforeUpdate(db orm.DB) error

BeforeUpdate hook executed before database update operation.

func (*Processor) Validate

func (i *Processor) Validate() error

Validate validates User struct and returns validation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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