File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed
Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ type Blobie interface {
1818 GetDiagonal () float64
1919 GetClassID () int
2020 GetClassName () string
21+ GetPropetry (key string ) (interface {}, bool )
22+ SetPropetry (key string , value interface {})
2123 Exists () bool
2224 NoMatchTimes () int
2325 IncrementNoMatchTimes ()
Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ type KalmanBlobie struct {
3131 noMatchTimes int
3232 PredictedNextPosition image.Point
3333
34- classID int
35- className string
34+ classID int
35+ className string
36+ customProperties map [string ]interface {}
3637
3738 // Kalman filter wrapping
3839 pointTracker * kf.PointTracker
@@ -213,6 +214,15 @@ func (b *KalmanBlobie) GetClassName() string {
213214 return b .className
214215}
215216
217+ func (b * KalmanBlobie ) GetPropetry (key string ) (interface {}, bool ) {
218+ v , ok := b .customProperties [key ]
219+ return v , ok
220+ }
221+
222+ func (b * KalmanBlobie ) SetPropetry (key string , value interface {}) {
223+ b .customProperties [key ] = value
224+ }
225+
216226// SetDraw Sets options for drawing [KalmanBlobie]
217227func (b * KalmanBlobie ) SetDraw (drawOptions * DrawOptions ) {
218228 b .drawingOptions = drawOptions
Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ type SimpleBlobie struct {
2626 noMatchTimes int
2727 PredictedNextPosition image.Point
2828
29- classID int
30- className string
29+ classID int
30+ className string
31+ customProperties map [string ]interface {}
3132
3233 // For array tracker
3334 drawingOptions * DrawOptions
@@ -201,6 +202,15 @@ func (b *SimpleBlobie) GetClassName() string {
201202 return b .className
202203}
203204
205+ func (b * SimpleBlobie ) GetPropetry (key string ) (interface {}, bool ) {
206+ v , ok := b .customProperties [key ]
207+ return v , ok
208+ }
209+
210+ func (b * SimpleBlobie ) SetPropetry (key string , value interface {}) {
211+ b .customProperties [key ] = value
212+ }
213+
204214// SetDraw Sets options for drawing [SimpleBlobie]
205215func (b * SimpleBlobie ) SetDraw (drawOptions * DrawOptions ) {
206216 b .drawingOptions = drawOptions
You can’t perform that action at this time.
0 commit comments