mot

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blobie

type Blobie interface {
	TrackLen() int
	Exists() bool
	IncNoMatch()
	DecNoMatch()
	PredictNextPositionNaive(depth int)
}

type Point

type Point struct {
	X float64
	Y float64
}

func NewPoint

func NewPoint(x, y float64) Point

func NewPointFrom

func NewPointFrom(point image.Point) Point

type Rectangle

type Rectangle struct {
	X      float64
	Y      float64
	Width  float64
	Height float64
}

func NewRect

func NewRect(x, y, height, width float64) Rectangle

func NewRectFrom

func NewRectFrom(rect image.Rectangle) Rectangle

type SimpleBlob

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

func NewSimpleBlob

func NewSimpleBlob(currentBbox Rectangle) *SimpleBlob

func NewSimpleBlobWithCenterTime added in v0.1.1

func NewSimpleBlobWithCenterTime(currentCenter Point, currentBbox Rectangle, dt float64) *SimpleBlob

func NewSimpleBlobWithTime

func NewSimpleBlobWithTime(currentBbox Rectangle, dt float64) *SimpleBlob

func (*SimpleBlob) Activate

func (blob *SimpleBlob) Activate()

Activate activates blob

func (*SimpleBlob) Deactivate

func (blob *SimpleBlob) Deactivate()

Deactivate deactivates blob

func (*SimpleBlob) DistanceTo

func (blob *SimpleBlob) DistanceTo(otherBlob *SimpleBlob) float64

DistanceTo returns distance to other blob (center to center)

func (*SimpleBlob) DistanceToPredicted

func (blob *SimpleBlob) DistanceToPredicted(otherBlob *SimpleBlob) float64

DistanceToPredicted returns distance to other blob (predicted center to predicted center)

func (*SimpleBlob) GetBBox

func (blob *SimpleBlob) GetBBox() Rectangle

GetBBox returns blob's current bounding box

func (*SimpleBlob) GetCenter

func (blob *SimpleBlob) GetCenter() Point

GetCenter returns blob's current center

func (*SimpleBlob) GetDiagonal

func (blob *SimpleBlob) GetDiagonal() float64

GetDiagonal returns blob's estimated diagonal

func (*SimpleBlob) GetID

func (blob *SimpleBlob) GetID() uuid.UUID

GetID returns blob's indentifier

func (*SimpleBlob) GetMaxTrackLen

func (blob *SimpleBlob) GetMaxTrackLen() int

GetMaxTrackLen returns blob's max track length

func (*SimpleBlob) GetNoMatchTimes

func (blob *SimpleBlob) GetNoMatchTimes() int

GetNoMatchTimes returns blob's no match times

func (*SimpleBlob) GetTrack

func (blob *SimpleBlob) GetTrack() []Point

GetTrack returns blob's current track. Be careful: this is not copy of track, but reference to it

func (*SimpleBlob) IncNoMatch

func (blob *SimpleBlob) IncNoMatch()

IncNoMatch increases blob's no match times

func (*SimpleBlob) PredictNextPosition

func (blob *SimpleBlob) PredictNextPosition()

PredictNextPosition execute Kalman filter's first step but without re-evaluating state vector based on Kalman gain

func (*SimpleBlob) SetID

func (blob *SimpleBlob) SetID(newID uuid.UUID)

SetID sets blob's indentifier

func (*SimpleBlob) SetMaxTrackLen

func (blob *SimpleBlob) SetMaxTrackLen(newMaxTrackLen int)

SetMaxTrackLen sets blob's max track length

func (*SimpleBlob) Update

func (blob *SimpleBlob) Update(newBlob *SimpleBlob) error

Update updates blob's position and execute Kalman filter's second step (evalute state vector based on Kalman gain)

type SimpleTracker

type SimpleTracker struct {
	// Main storage
	Objects map[uuid.UUID]*SimpleBlob
	// contains filtered or unexported fields
}

SimpleTracker is naive implementation of Multi-object tracker (MOT)

func NewNewSimpleTracker

func NewNewSimpleTracker(minDistThreshold float64, maxNoMatch int) *SimpleTracker

NewSimpleTracker creates new instance of SimpleTracker

func NewSimpleTrackerDefault

func NewSimpleTrackerDefault() *SimpleTracker

NewSimpleTrackerDefault creates default instance of SimpleTracker

func (*SimpleTracker) MatchObjects

func (tracker *SimpleTracker) MatchObjects(newObjects []*SimpleBlob) error

Jump to

Keyboard shortcuts

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