mirror of https://bitbucket.org/ausocean/av.git
Merged in less-frames-fix (pull request #345)
Less frames fix Approved-by: Saxon Milton <saxon.milton@gmail.com>
This commit is contained in:
commit
65bc98efbf
|
@ -63,24 +63,6 @@ const (
|
||||||
rtmpConnectionTimeout = 10
|
rtmpConnectionTimeout = 10
|
||||||
)
|
)
|
||||||
|
|
||||||
// Motion filter parameters.
|
|
||||||
const minFPS = 1.0
|
|
||||||
|
|
||||||
// KNN specific parameters.
|
|
||||||
const (
|
|
||||||
knnMinArea = 25.0
|
|
||||||
knnThreshold = 300
|
|
||||||
knnHistory = 300
|
|
||||||
knnKernel = 9
|
|
||||||
)
|
|
||||||
|
|
||||||
// MOG specific parameters.
|
|
||||||
const (
|
|
||||||
mogMinArea = 50
|
|
||||||
mogThreshold = 100
|
|
||||||
mogHistory = 100
|
|
||||||
)
|
|
||||||
|
|
||||||
const pkg = "revid: "
|
const pkg = "revid: "
|
||||||
|
|
||||||
type Logger interface {
|
type Logger interface {
|
||||||
|
@ -355,11 +337,11 @@ func (r *Revid) setupPipeline(mtsEnc func(dst io.WriteCloser, rate float64) (io.
|
||||||
case config.FilterNoOp:
|
case config.FilterNoOp:
|
||||||
r.filters[i] = filter.NewNoOp(dst)
|
r.filters[i] = filter.NewNoOp(dst)
|
||||||
case config.FilterMOG:
|
case config.FilterMOG:
|
||||||
r.filters[i] = filter.NewMOGFilter(dst, mogMinArea, mogThreshold, mogHistory, r.cfg.ShowWindows, r.cfg.MotionInterval)
|
r.filters[i] = filter.NewMOGFilter(dst, r.cfg.MOGMinArea, r.cfg.MOGThreshold, int(r.cfg.MOGHistory), r.cfg.ShowWindows, r.cfg.MotionInterval)
|
||||||
case config.FilterVariableFPS:
|
case config.FilterVariableFPS:
|
||||||
r.filters[i] = filter.NewVariableFPSFilter(dst, minFPS, filter.NewMOGFilter(r.encoders, mogMinArea, mogThreshold, mogHistory, r.cfg.ShowWindows, r.cfg.MotionInterval))
|
r.filters[i] = filter.NewVariableFPSFilter(dst, r.cfg.MinFPS, filter.NewMOGFilter(dst, r.cfg.MOGMinArea, r.cfg.MOGThreshold, int(r.cfg.MOGHistory), r.cfg.ShowWindows, r.cfg.MotionInterval))
|
||||||
case config.FilterKNN:
|
case config.FilterKNN:
|
||||||
r.filters[i] = filter.NewKNNFilter(dst, knnMinArea, knnThreshold, knnHistory, knnKernel, r.cfg.ShowWindows)
|
r.filters[i] = filter.NewKNNFilter(dst, r.cfg.KNNMinArea, r.cfg.KNNThreshold, int(r.cfg.KNNHistory), int(r.cfg.KNNKernel), r.cfg.ShowWindows)
|
||||||
default:
|
default:
|
||||||
panic("Undefined Filter")
|
panic("Undefined Filter")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue