mirror of https://bitbucket.org/ausocean/av.git
filter: basic: comment and removing const
This commit is contained in:
parent
f27a18282b
commit
c1881cef3a
|
@ -142,7 +142,7 @@ func (bf *Basic) Write(f []byte) (int, error) {
|
|||
}
|
||||
|
||||
// If there are not enough motion pixels then discard the frame.
|
||||
if bf.motion < pixels {
|
||||
if bf.motion < bf.pix {
|
||||
return len(f), nil
|
||||
}
|
||||
|
||||
|
@ -163,12 +163,12 @@ func (bf *Basic) process(j int, wg *sync.WaitGroup) {
|
|||
|
||||
diff := diffR + diffG + diffB
|
||||
|
||||
if diff > threshold {
|
||||
if diff > bf.thresh {
|
||||
bf.motion++
|
||||
}
|
||||
|
||||
if bf.debug {
|
||||
if diff > threshold {
|
||||
if diff > bf.thresh {
|
||||
bf.bwImg.SetRGBA(i, j, color.RGBA{0xff, 0xff, 0xff, 0xff})
|
||||
} else {
|
||||
bf.bwImg.SetRGBA(i, j, color.RGBA{0x00, 0x00, 0x00, 0xff})
|
||||
|
|
Loading…
Reference in New Issue