mirror of https://bitbucket.org/ausocean/av.git
filter: fixing comments
This commit is contained in:
parent
02777c4dd5
commit
9c5b284d68
|
@ -37,7 +37,7 @@ import (
|
|||
"gocv.io/x/gocv"
|
||||
)
|
||||
|
||||
// KNNFilter is a filter that provides basic motion detection. KNN is short for
|
||||
// KNN is a filter that provides basic motion detection. KNN is short for
|
||||
// K-Nearest Neighbours method.
|
||||
type KNN struct {
|
||||
dst io.WriteCloser // Destination to which motion containing frames go.
|
||||
|
@ -51,7 +51,7 @@ type KNN struct {
|
|||
hfCount int // Counter for the hold array.
|
||||
}
|
||||
|
||||
// NewKNNFilter returns a pointer to a new KNNFilter.
|
||||
// NewKNN returns a pointer to a new KNNFilter.
|
||||
func NewKNN(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool, hf int) *KNN {
|
||||
bs := gocv.NewBackgroundSubtractorKNNWithParams(history, threshold, false)
|
||||
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(kernelSize, kernelSize))
|
||||
|
|
|
@ -37,7 +37,7 @@ import (
|
|||
"gocv.io/x/gocv"
|
||||
)
|
||||
|
||||
// MOGFilter is a filter that provides basic motion detection. MoG is short for
|
||||
// MOG is a filter that provides basic motion detection. MoG is short for
|
||||
// Mixture of Gaussians method.
|
||||
type MOG struct {
|
||||
dst io.WriteCloser // Destination to which motion containing frames go.
|
||||
|
@ -51,7 +51,7 @@ type MOG struct {
|
|||
hfCount int // Counter for the hold array.
|
||||
}
|
||||
|
||||
// NewMOGFilter returns a pointer to a new MOGFilter struct.
|
||||
// NewMOG returns a pointer to a new MOGFilter struct.
|
||||
func NewMOG(dst io.WriteCloser, area, threshold float64, history int, debug bool, hf int) *MOG {
|
||||
bs := gocv.NewBackgroundSubtractorMOG2WithParams(history, threshold, false)
|
||||
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(3, 3))
|
||||
|
|
|
@ -30,7 +30,7 @@ import (
|
|||
"io"
|
||||
)
|
||||
|
||||
// VariableFPSFilter is a filter that has a variable frame rate. When motion is
|
||||
// VariableFPS is a filter that has a variable frame rate. When motion is
|
||||
// detected, the filter sends all frames and when it is not, the filter
|
||||
// sends frames at a reduced framerate.
|
||||
type VariableFPS struct {
|
||||
|
@ -40,7 +40,7 @@ type VariableFPS struct {
|
|||
count uint
|
||||
}
|
||||
|
||||
// NewVariableFPSFilter returns a pointer to a new VariableFPSFilter struct.
|
||||
// NewVariableFPS returns a pointer to a new VariableFPSFilter struct.
|
||||
func NewVariableFPS(dst io.WriteCloser, minFPS float64, filter Filter) *VariableFPS {
|
||||
frames := uint(25 / minFPS)
|
||||
return &VariableFPS{filter, dst, frames, 0}
|
||||
|
|
Loading…
Reference in New Issue