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
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 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
Click to show internal directories.
Click to hide internal directories.