annotation

package
v0.0.0-...-0484061 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(p *project.Project, an *Annotation) error

func SetStore

func SetStore(as AnnotationStore)

Types

type Annotation

type Annotation struct {
	Image string `json:"image" bson:"image"`
	Boxes []*Box `json:"boxes" bson:"boxes"`
}

func Get

func Get(p *project.Project) []*Annotation

func GetImage

func GetImage(p *project.Project, name string) (*Annotation, error)

type AnnotationStore

type AnnotationStore interface {
	Save(*project.Project, *Annotation) error
	Get(*project.Project) []*Annotation
	GetImage(p *project.Project, name string) (*Annotation, error)
}

type Box

type Box struct {
	Label string  `json:"label" bson:"label"`
	X     float64 `json:"x" bson:"x"`
	Y     float64 `json:"y" bson:"y"`
	W     float64 `json:"width" bson:"w"`
	H     float64 `json:"height" bson:"h"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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