client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

type Circle struct {
	Center Point   `json:"center"`
	Radius float32 `json:"radius"`
	Style
	Metadata
}

type Line

type Line struct {
	P1 Point `json:"p1"`
	P2 Point `json:"p2"`
	Style
	Metadata
}

type Metadata

type Metadata struct {
	SourceId         string   `json:"sourceId,omitempty"`
	Layer            []string `json:"layer,omitempty"`
	VisibleByDefault bool     `json:"visibleByDefault,omitempty"`
}

type Package

type Package struct {
	FieldWidth     float32           `json:"fieldWidth"`
	FieldLength    float32           `json:"fieldLength"`
	CenterRadius   float32           `json:"centerRadius"`
	PenaltyWidth   float32           `json:"penaltyWidth`
	PenaltyDepth   float32           `json:"penaltyDepth`
	PenaltyPoint   float32           `json:"penaltyPoint"`
	BoundaryWidth  float32           `json:"boundaryWidth"`
	GoalWidth      float32           `json:"goalWidth"`
	GoalDepth      float32           `json:"goalDepth"`
	Shapes         []Shape           `json:"shapes"`
	ActiveSourceId string            `json:"activeSourceId"`
	Sources        map[string]string `json:"sources"`
}

func (*Package) AddDetectionFrame

func (p *Package) AddDetectionFrame(frame *vision.Frame)

func (*Package) AddGeometryShapes

func (p *Package) AddGeometryShapes(geometry *vision.Field)

func (*Package) SortShapes

func (p *Package) SortShapes()

type Point

type Point struct {
	X float32 `json:"x"`
	Y float32 `json:"y"`
}

type PublishType

type PublishType int

type Publisher

type Publisher struct {
	DetectionProvider func() *vision.Frame
	GeometryProvider  func() *vision.Field
	// contains filtered or unexported fields
}

func NewPublisher

func NewPublisher() (p Publisher)

func (*Publisher) Handler

func (p *Publisher) Handler(w http.ResponseWriter, r *http.Request)

type PublisherClient

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

type Rect

type Rect struct {
	X      float32 `json:"x"`
	Y      float32 `json:"y"`
	Width  float32 `json:"width"`
	Height float32 `json:"height"`
	Ori    float32 `json:"ori"`
	Style
	Metadata
}

type Request

type Request struct {
	ActiveSourceId string `json:"activeSourceId"`
}

type Shape

type Shape struct {
	OrderNumber int32   `json:"orderNumber"`
	Line        *Line   `json:"line,omitempty"`
	Circle      *Circle `json:"circle,omitempty"`
	Rect        *Rect   `json:"rect,omitempty"`
	Text        *Text   `json:"text,omitempty"`
}

type ShapesByOrderNumber

type ShapesByOrderNumber []Shape

func (ShapesByOrderNumber) Len

func (a ShapesByOrderNumber) Len() int

func (ShapesByOrderNumber) Less

func (a ShapesByOrderNumber) Less(i, j int) bool

func (ShapesByOrderNumber) Swap

func (a ShapesByOrderNumber) Swap(i, j int)

type Style

type Style struct {
	Stroke      *string  `json:"stroke,omitempty"`
	StrokeWidth *float32 `json:"strokeWidth,omitempty"`
	Fill        *string  `json:"fill,omitempty"`
	FillOpacity *float32 `json:"fillOpacity,omitempty"`
	Font        *string  `json:"font,omitempty"`
}

type Text

type Text struct {
	Text string `json:"text"`
	P    Point  `json:"p"`
	Style
	Metadata
}

Jump to

Keyboard shortcuts

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