diff --git a/filter/filters_circleci.go b/filter/filters_circleci.go index bb49d712..2e119fe5 100644 --- a/filter/filters_circleci.go +++ b/filter/filters_circleci.go @@ -32,12 +32,12 @@ import ( ) // NewMOG returns a pointer to a new NoOp struct for testing purposes only. -func NewMOG(dst io.WriteCloser, area, threshold float64, history int, debug bool, hf int, downscalingFactor int) *NoOp { +func NewMOG(dst io.WriteCloser, area, threshold float64, history int, debug bool, hf int, scaleFactor int) *NoOp { return &NoOp{dst: dst} } // NewKNN returns a pointer to a new NoOp struct for testing purposes only. -func NewKNN(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool, hf int, downscalingFactor int) *NoOp { +func NewKNN(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool, hf int, scaleFactor int) *NoOp { return &NoOp{dst: dst} } diff --git a/filter/knn.go b/filter/knn.go index 0009ce7d..fdb01937 100644 --- a/filter/knn.go +++ b/filter/knn.go @@ -53,14 +53,14 @@ type KNN struct { } // NewKNN returns a pointer to a new KNN filter struct. -func NewKNN(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool, hf int, downscalingFactor int) *KNN { +func NewKNN(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool, hf int, scaleFactor int) *KNN { bs := gocv.NewBackgroundSubtractorKNNWithParams(history, threshold, false) k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(kernelSize, kernelSize)) var windows []*gocv.Window if debug { windows = []*gocv.Window{gocv.NewWindow("KNN: Bounding boxes"), gocv.NewWindow("KNN: Motion")} } - return &KNN{dst, area, &bs, k, debug, windows, make([][]byte, hf-1), hf, 0, 1 / float64(downscalingFactor)} + return &KNN{dst, area, &bs, k, debug, windows, make([][]byte, hf-1), hf, 0, 1 / float64(scaleFactor)} } // Implements io.Closer. diff --git a/filter/mog.go b/filter/mog.go index d951823a..7971452c 100644 --- a/filter/mog.go +++ b/filter/mog.go @@ -53,14 +53,14 @@ type MOG struct { } // NewMOG returns a pointer to a new MOG filter struct. -func NewMOG(dst io.WriteCloser, area, threshold float64, history int, debug bool, hf int, downscalingFactor int) *MOG { +func NewMOG(dst io.WriteCloser, area, threshold float64, history int, debug bool, hf int, scaleFactor int) *MOG { bs := gocv.NewBackgroundSubtractorMOG2WithParams(history, threshold, false) k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(3, 3)) var windows []*gocv.Window if debug { windows = []*gocv.Window{gocv.NewWindow("MOG: Bounding boxes"), gocv.NewWindow("MOG: Motion")} } - return &MOG{dst, area, &bs, k, debug, windows, make([][]byte, hf-1), hf, 0, 1 / float64(downscalingFactor)} + return &MOG{dst, area, &bs, k, debug, windows, make([][]byte, hf-1), hf, 0, 1 / float64(scaleFactor)} } // Implements io.Closer.