diff --git a/revid/revid.go b/revid/revid.go index 5f4df7d8..fd3f83cf 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -76,6 +76,15 @@ const ( rtmpConnectionTimeout = 10 ) +// KNN filter properties +const ( + knnMinArea = 25.0 + knnThreshold = 300 + knnHistory = 300 + knnKernel = 9 + knnShowWindows = true +) + const pkg = "revid: " type Logger interface { @@ -336,7 +345,7 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io. case config.FilterVariableFPS: r.filter = filter.NewVariableFPSFilter(r.encoders, 1.0, filter.NewMOGFilter(r.encoders, 25, 20, 500, 3, true)) 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: panic("Undefined Filter") }