Skip to content

Commit

Permalink
init property map
Browse files Browse the repository at this point in the history
  • Loading branch information
LdDl committed Apr 23, 2021
1 parent ef78a40 commit 270e701
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions v2/blob/kalman_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func NewKalmanBlobie(rect image.Rectangle, options *BlobOptions) Blobie {
yMatrix: mat.NewDense(2, 1, []float64{centerX, centerY}),
uMatrix: mat.NewDense(4, 1, []float64{0.0, 0.0, 0.0, 0.0}),
crossedLine: false,
customProperties: make(map[string]interface{}),
}
kalmanBlobie.pointTracker.SetStateValue(centerX, centerY, 0, 0)
if options != nil {
Expand Down
9 changes: 5 additions & 4 deletions v2/blob/simple_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func NewSimpleBlobie(rect image.Rectangle, options *BlobOptions) Blobie {
isStillBeingTracked: true,
noMatchTimes: 0,
crossedLine: false,
customProperties: make(map[string]interface{}),
}
if options != nil {
blobie.TrackTime = []time.Time{options.Time}
Expand Down Expand Up @@ -87,10 +88,10 @@ func NewBlobieDefaults(rect image.Rectangle) *SimpleBlobie {
isExists: true,
isStillBeingTracked: true,
noMatchTimes: 0,

classID: -1,
className: "No class",
crossedLine: false,
classID: -1,
className: "No class",
customProperties: make(map[string]interface{}),
crossedLine: false,
}
}

Expand Down

0 comments on commit 270e701

Please sign in to comment.