mirror of https://bitbucket.org/ausocean/av.git
Fixed shared windows between motion filters bug
This commit is contained in:
parent
f74e08d70a
commit
e5db4f0f1c
|
@ -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}
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue