adding constants for the integer arguments

This commit is contained in:
Ella Pietraroia 2019-12-31 15:18:06 +10:30
parent 51e45c6ffa
commit 65f1c89ff2
1 changed files with 10 additions and 1 deletions

View File

@ -76,6 +76,15 @@ const (
rtmpConnectionTimeout = 10 rtmpConnectionTimeout = 10
) )
// KNN filter properties
const (
knnMinArea = 25.0
knnThreshold = 300
knnHistory = 300
knnKernel = 9
knnShowWindows = true
)
const pkg = "revid: " const pkg = "revid: "
type Logger interface { type Logger interface {
@ -336,7 +345,7 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io.
case config.FilterVariableFPS: case config.FilterVariableFPS:
r.filter = filter.NewVariableFPSFilter(r.encoders, 1.0, filter.NewMOGFilter(r.encoders, 25, 20, 500, 3, true)) r.filter = filter.NewVariableFPSFilter(r.encoders, 1.0, filter.NewMOGFilter(r.encoders, 25, 20, 500, 3, true))
case config.FilterKNN: case config.FilterKNN:
r.filter = filter.NewKNNFilter(r.encoders, 25, 300, 300, 9, true) r.filter = filter.NewKNNFilter(r.encoders, knnMinArea, knnThreshold, knnHistory, knnKernel, knnShowWindows)
default: default:
panic("Undefined Filter") panic("Undefined Filter")
} }