Fixed shared windows between motion filters bug

This commit is contained in:
Scott 2020-01-02 15:46:32 +10:30
parent f74e08d70a
commit e5db4f0f1c
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ func NewKNNFilter(dst io.WriteCloser, area, threshold float64, history, kernelSi
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(kernelSize, kernelSize))
var windows []*gocv.Window
if debug {
windows = []*gocv.Window{gocv.NewWindow("Debug: Bounding boxes"), gocv.NewWindow("Debug: Motion")}
windows = []*gocv.Window{gocv.NewWindow("KNN: Bounding boxes"), gocv.NewWindow("KNN: Motion")}
}
return &KNNFilter{dst, area, &bs, k, debug, windows}
}

View File

@ -54,7 +54,7 @@ func NewMOGFilter(dst io.WriteCloser, area, threshold float64, history int, debu
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(3, 3))
var windows []*gocv.Window
if debug {
windows = []*gocv.Window{gocv.NewWindow("Debug: Bounding boxes"), gocv.NewWindow("Debug: Motion")}
windows = []*gocv.Window{gocv.NewWindow("MOG: Bounding boxes"), gocv.NewWindow("MOG: Motion")}
}
return &MOGFilter{dst, area, &bs, k, debug, windows}
}