annotation

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: MIT Imports: 4 Imported by: 0

README

Annotation: Linker Annotation Tools

GitHub license
GoDoc
Build Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyPointAnnotation

func AnyPointAnnotation(annots []Annotation) bool

func AnyRectAnnotation

func AnyRectAnnotation(annots []Annotation) bool

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

Types

type Annotation

type Annotation struct {
	Id   int    `bson:"id" json:"id"`
	Type string `bson:"type" json:"type"`

	// Exclusive fields
	Rect  *RectAnnotation  `bson:"rect,omitempty" json:"rect,omitempty"`
	Point *PointAnnotation `bson:"point,omitempty" json:"point,omitempty"`
}

func PointToAnnotation

func PointToAnnotation(points []pts.Point) []Annotation

type AnnotationCollection

type AnnotationCollection []Annotation

func (AnnotationCollection) PointAnnotations

func (ac AnnotationCollection) PointAnnotations() []PointAnnotation

func (AnnotationCollection) RectAnnotations

func (ac AnnotationCollection) RectAnnotations() []RectAnnotation

type PointAnnotation

type PointAnnotation struct {
	Label string `bson:"label" json:"label"`
	X     int    `bson:"x" json:"x"`
	Y     int    `bson:"y" json:"y"`
}

type RectAnnotation

type RectAnnotation struct {
	Label  string `bson:"label" json:"label"`
	X      int    `bson:"x" json:"x"`
	Y      int    `bson:"y" json:"y"`
	Width  int    `bson:"width" json:"width"`
	Height int    `bson:"height" json:"height"`
}

func FindPointAnnotationRect

func FindPointAnnotationRect(label string, annots AnnotationCollection, padding int, image image.Image) RectAnnotation

func (RectAnnotation) Canon

func (ra RectAnnotation) Canon() RectAnnotation

func (RectAnnotation) FixBounds

func (ra RectAnnotation) FixBounds(size image.Point) RectAnnotation

FixBounds returns a new fixed rectangle annotation

func (*RectAnnotation) Rectangle

func (ra *RectAnnotation) Rectangle() image.Rectangle

Directories

Path Synopsis
parser
pts
tools

Jump to

Keyboard shortcuts

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