revid/revid.go: Renamed constants to be more specific to the MOG filter

This commit is contained in:
Scott 2019-12-31 15:41:54 +10:30
parent 9d857b8a66
commit c7fa55a993
1 changed files with 12 additions and 13 deletions

View File

@ -78,16 +78,15 @@ const (
// Motion filter parameters
const (
knnMinArea = 25.0
knnThreshold = 300
knnHistory = 300
knnKernel = 9
knnShowWindows = true
minArea = 25.0
threshold = 20.0
history = 500
showWindows = true
minFPS = 1.0
knnMinArea = 25.0
knnThreshold = 300
knnHistory = 300
knnKernel = 9
mogMinArea = 25.0
mogThreshold = 20.0
mogHistory = 500
showWindows = true
minFPS = 1.0
)
const pkg = "revid: "
@ -346,11 +345,11 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io.
case config.FilterNoOp:
r.filter = filter.NewNoOp(r.encoders)
case config.FilterMOG:
r.filter = filter.NewMOGFilter(r.encoders, minArea, threshold, history, showWindows)
r.filter = filter.NewMOGFilter(r.encoders, mogMinArea, mogThreshold, mogHistory, showWindows)
case config.FilterVariableFPS:
r.filter = filter.NewVariableFPSFilter(r.encoders, minFPS, filter.NewMOGFilter(r.encoders, minArea, threshold, history, showWindows))
r.filter = filter.NewVariableFPSFilter(r.encoders, minFPS, filter.NewMOGFilter(r.encoders, mogMinArea, mogThreshold, mogHistory, showWindows))
case config.FilterKNN:
r.filter = filter.NewKNNFilter(r.encoders, knnMinArea, knnThreshold, knnHistory, knnKernel, knnShowWindows)
r.filter = filter.NewKNNFilter(r.encoders, knnMinArea, knnThreshold, knnHistory, knnKernel, showWindows)
default:
panic("Undefined Filter")