mirror of https://bitbucket.org/ausocean/av.git
Merged in circleci-gocv (pull request #317)
Circle-CI doesn't like to build because of gocv Approved-by: Alan Noble <anoble@gmail.com> Approved-by: Saxon Milton <saxon.milton@gmail.com>
This commit is contained in:
commit
a62c25af41
|
@ -23,9 +23,9 @@ jobs:
|
|||
|
||||
- run: go get -d -t -v ./...
|
||||
|
||||
- run: go build -v ./...
|
||||
- run: go build -v -tags circleci ./...
|
||||
|
||||
- run: go test -v ./...
|
||||
- run: go test -v -tags circleci ./...
|
||||
|
||||
- save_cache:
|
||||
key: v1-pkg-cache
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build !circleci
|
||||
|
||||
// What it does:
|
||||
//
|
||||
// This example detects motion using a delta threshold from the first frame,
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
// +build circleci
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
Replaces filters that use the gocv package when Circle-CI builds revid. This
|
||||
is needed because Circle-CI does not have a copy of Open CV installed.
|
||||
|
||||
AUTHORS
|
||||
Scott Barnard <scott@ausocean.org>
|
||||
|
||||
LICENSE
|
||||
filters_circleci.go is Copyright (C) 2019 the Australian Ocean Lab (AusOcean)
|
||||
|
||||
It is free software: you can redistribute it and/or modify them
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
It is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
in gpl.txt. If not, see http://www.gnu.org/licenses.
|
||||
*/
|
||||
|
||||
package filter
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
// NewMOGFilter returns a pointer to a new NoOp struct for testing purposes only.
|
||||
func NewMOGFilter(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool) *NoOp {
|
||||
return &NoOp{dst: dst}
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
// +build !circleci
|
||||
|
||||
/*
|
||||
DESCRIPTION
|
||||
A filter that detects motion and discards frames without motion. The
|
||||
|
@ -45,7 +47,7 @@ type MOGFilter struct {
|
|||
windows []*gocv.Window
|
||||
}
|
||||
|
||||
// NewMOGFilter returns a pointer to a new MOGFilter.
|
||||
// NewMOGFilter returns a pointer to a new MOGFilter struct.
|
||||
func NewMOGFilter(dst io.WriteCloser, area, threshold float64, history, kernelSize int, debug bool) *MOGFilter {
|
||||
bs := gocv.NewBackgroundSubtractorMOG2WithParams(history, threshold, false)
|
||||
k := gocv.GetStructuringElement(gocv.MorphRect, image.Pt(kernelSize, kernelSize))
|
||||
|
|
Loading…
Reference in New Issue