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"
|
"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.
|
// K-Nearest Neighbours method.
|
||||||
type KNN struct {
|
type KNN struct {
|
||||||
dst io.WriteCloser // Destination to which motion containing frames go.
|
dst io.WriteCloser // Destination to which motion containing frames go.
|
||||||
|
@ -51,7 +51,7 @@ type KNN struct {
|
||||||
hfCount int // Counter for the hold array.
|
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 {
|
func NewKNN(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool, hf int) *KNN {
|
||||||
bs := gocv.NewBackgroundSubtractorKNNWithParams(history, threshold, false)
|
bs := gocv.NewBackgroundSubtractorKNNWithParams(history, threshold, false)
|
||||||
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(kernelSize, kernelSize))
|
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(kernelSize, kernelSize))
|
||||||
|
|
|
@ -37,7 +37,7 @@ import (
|
||||||
"gocv.io/x/gocv"
|
"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.
|
// Mixture of Gaussians method.
|
||||||
type MOG struct {
|
type MOG struct {
|
||||||
dst io.WriteCloser // Destination to which motion containing frames go.
|
dst io.WriteCloser // Destination to which motion containing frames go.
|
||||||
|
@ -51,7 +51,7 @@ type MOG struct {
|
||||||
hfCount int // Counter for the hold array.
|
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 {
|
func NewMOG(dst io.WriteCloser, area, threshold float64, history int, debug bool, hf int) *MOG {
|
||||||
bs := gocv.NewBackgroundSubtractorMOG2WithParams(history, threshold, false)
|
bs := gocv.NewBackgroundSubtractorMOG2WithParams(history, threshold, false)
|
||||||
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(3, 3))
|
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(3, 3))
|
||||||
|
|
|
@ -30,7 +30,7 @@ import (
|
||||||
"io"
|
"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
|
// detected, the filter sends all frames and when it is not, the filter
|
||||||
// sends frames at a reduced framerate.
|
// sends frames at a reduced framerate.
|
||||||
type VariableFPS struct {
|
type VariableFPS struct {
|
||||||
|
@ -40,7 +40,7 @@ type VariableFPS struct {
|
||||||
count uint
|
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 {
|
func NewVariableFPS(dst io.WriteCloser, minFPS float64, filter Filter) *VariableFPS {
|
||||||
frames := uint(25 / minFPS)
|
frames := uint(25 / minFPS)
|
||||||
return &VariableFPS{filter, dst, frames, 0}
|
return &VariableFPS{filter, dst, frames, 0}
|
||||||
|
|
Loading…
Reference in New Issue