Documentation ¶
Index ¶
- type Blobie
- type Point
- type Rectangle
- type SimpleBlob
- func (blob *SimpleBlob) Activate()
- func (blob *SimpleBlob) Deactivate()
- func (blob *SimpleBlob) DistanceTo(otherBlob *SimpleBlob) float64
- func (blob *SimpleBlob) DistanceToPredicted(otherBlob *SimpleBlob) float64
- func (blob *SimpleBlob) GetBBox() Rectangle
- func (blob *SimpleBlob) GetCenter() Point
- func (blob *SimpleBlob) GetDiagonal() float64
- func (blob *SimpleBlob) GetID() uuid.UUID
- func (blob *SimpleBlob) GetMaxTrackLen() int
- func (blob *SimpleBlob) GetNoMatchTimes() int
- func (blob *SimpleBlob) GetTrack() []Point
- func (blob *SimpleBlob) IncNoMatch()
- func (blob *SimpleBlob) PredictNextPosition()
- func (blob *SimpleBlob) SetID(newID uuid.UUID)
- func (blob *SimpleBlob) SetMaxTrackLen(newMaxTrackLen int)
- func (blob *SimpleBlob) Update(newBlob *SimpleBlob) error
- type SimpleTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
func NewPointFrom ¶
type Rectangle ¶
func NewRectFrom ¶
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) 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