scout

command module
v0.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2018 License: GPL-3.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Scout

A 'scout' is a webcam based device that can anonymously measure activity in and around physical spaces. You can build one these stand alone devices yourself, or get pre-built devices by joining the public beta program.

beta  GPLv3 License

Raspberry Pi Installation (Raspberry Pi)

Instructions on installing Measure the Future can be found here.

Compilation/Installation (OSX)

  1. Download & Install Go 1.7
  2. Install OpenCV-3.2 via Brew:
	$ brew install opencv3 --with-contrib --with-ffpmeg --with-tbb
  1. Download and Install PostgreSQL
  2. Create SSL keys for PostgreSQL
	$ cd ~/Library/Application\ Support/Postgres/var-9.4/
	$ openssl req -new -text -out server.req
	$ openssl rsa -in privkey.pem -out server.key
	$ rm privkey.pem
	$ openssl req -x509 -in server.req -text -key server.key -out server.crt
	$ chmod og-rwx server.key

  1. Enable SSL by editing the postgres config, uncommenting the line #sss = on (Remove the #)
	$ vim postgresql.conf
  1. Restart Postgres.app
  2. Create Databases
	$ psql
		postgres=# create database mothership;
		postgres=# create database mothership_test;
		postgres=# create user mothership_user with password 'password';
		postgres=# ALTER ROLE mothership_user SET client_encoding TO 'utf8';
		postgres=# ALTER ROLE mothership_user SET default_transaction_isolation TO 'read committed';
		postgres=# ALTER ROLE mothership_user SET timezone TO 'UTC';
		postgres=# GRANT ALL PRIVILEGES ON DATABASE mothership TO mothership_user;
		postgres=# GRANT ALL PRIVILEGES ON DATABASE mothershop_test TO mothership_user;
		postgres=# \q
  1. Download and Install Node v4.4.7
  2. Update NPM
	$ sudo npm install npm -g
  1. Create project folder and get source from Github
	$ mkdir mtf
	$ cd mtf
	$ git clone https://github.com/MeasureTheFuture/CVBindings.git
	$ cd CVBindings
	$ cmake .
	$ make
	$ cp CVBindings.h /usr/local/opt/opencv3/include
	$ cp libCVBindings.a /usr/local/opt/opencv3/lib
	$ cd ..
	$ export GOPATH=`pwd`
	$ go get github.com/MeasureTheFuture/scout
	$ go get github.com/onsi/ginkgo
	$ go get github.com/onsi/gomega
	$ go get -u github.com/mattes/migrate
  1. Build the backend, create config file and migrate databases.
	$ go build scout
	$ cp src/mothership/mothership.json_example mothership.json
	$ ./bin/migrate -url postgres://localhost:5432/mothership -path ./src/github.com/MeasureTheFuture/scout/migrations up
	$ ./bin/migrate -url postgres://localhost:5432/mothership_test -path ./src/github.com/MeasureTheFuture/scout/migrations up
  1. In a new terminal, build the frontend.
	$ cd src/mothership/frontend
	$ npm install
	$ npm run build

Testing

  1. Testing the backend
	$ go test -p 1 github.com/MeasureTheFuture/scout/...
  1. Testing the frontend
	$ cd src/scout/frontend
	$ npm run test

Operating Instructions:

The scout is a stand-alone application with a basic web-based UI for controlling the measurement hardware. (ctrl-c stops the scout)

	$ ./scout -help


	  Usage of ./scout:
      -configFile string
    	The path to the configuration file (default "scout.json")
      -debug
    	Should we run scout in debug mode, and render frames of detected materials
      -logFile string
    	The output path for log files. (default "scout.log")
      -videoFile string
    	The path to a video file to detect motion from instead of a webcam

Start measuring the future

Visit localhost:1323 in your browser.

Testing for the backend:

	$ go test -p 1 github.com/MeasureTheFuture/scout/...

License

Copyright (C) 2015, Clinton Freeman

This program is free software: you can redistribute it and/or modify it 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.

This program 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 along with this program. If not, see http://www.gnu.org/licenses/.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
* Copyright (c) 2013 The Gorilla Feeds Authors.
* Copyright (c) 2013 The Gorilla Feeds Authors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL