diff --git a/v2/blob/kalman_blob.go b/v2/blob/kalman_blob.go index 6cb579d..6b8da8f 100644 --- a/v2/blob/kalman_blob.go +++ b/v2/blob/kalman_blob.go @@ -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 { diff --git a/v2/blob/simple_blob.go b/v2/blob/simple_blob.go index 42a4017..7332379 100644 --- a/v2/blob/simple_blob.go +++ b/v2/blob/simple_blob.go @@ -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} @@ -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, } }