Skip to content

Commit af735cf

Browse files
committed
refresj no match func
1 parent 28eb099 commit af735cf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

blob/array_tracker.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func NewBlobiesDefaults() *Blobies {
3333
}
3434
}
3535

36-
// MatchToExisting Check if blob already exists
36+
// MatchToExisting Check if some of blobs already exists
3737
func (bt *Blobies) MatchToExisting(rects []image.Rectangle) {
3838
bt.prepare()
3939
blobies := make([]*Blobie, len(rects))
@@ -43,7 +43,6 @@ func (bt *Blobies) MatchToExisting(rects []image.Rectangle) {
4343

4444
for i := range blobies {
4545
minUUID := uuid.UUID{}
46-
_ = minUUID
4746
minDistance := math.MaxFloat64
4847
for j := range (*bt).Objects {
4948
dist := distanceBetweenPoints(blobies[i].Center, (*bt).Objects[j].Center)
@@ -61,6 +60,10 @@ func (bt *Blobies) MatchToExisting(rects []image.Rectangle) {
6160
}
6261
}
6362

63+
bt.RefreshNoMatch()
64+
}
65+
66+
func (bt *Blobies) RefreshNoMatch() {
6467
for i, b := range (*bt).Objects {
6568
if b.isExists == false {
6669
b.noMatchTimes++

0 commit comments

Comments
 (0)