Giter Site home page Giter Site logo

nielsenamrose / trap-camera Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 347 KB

Trap camera. This camera is made from a web camera connected to a single board computer. The single board computer runs code that will upload video clips when it detects movement or a certain feature in the frame.

Python 92.94% Shell 7.06%
computer-vision python opencv camera linux single-board-computer beaglebone motion-detection edge-computing

trap-camera's Introduction

Trap camera

Photo of the hardware

This camera is made from a web camera connected to a single board computer. The single board computer runs code that will upload video clips when it detects movement or a certain feature in the frame.

Sample catch

Setting up the BeagleBone Green

I have a couple of BeagleBone Greens that I bought for another project. So that is what I will be using. Another single board computer like the Raspberry PI will probably work fine too. There is some BB specific code in start.sh to turn off the blue leds on the BB, but that is it. The main program trapcam.py will run fine on a PC with a connected webcam.

First connect BBG to PC via USB. SSH to BBG as [email protected] default password is temppwd.

Configure wireless

$ sudo connmanctl
connmanctl> enable wifi
connmanctl> scan wifi
connmanctl> services
connmanctl> agent on
connmanctl> connect wifi_884aea627540_4e69656c73656e34_managed_psk
connmanctl> services

Confirm there is a *AO or *AR next to the Nexwork ID

Reference: https://www.fis.gatech.edu/how-to-configure-bbw-wifi/

Install OpenCV

Install OpenCV for Python 3 using

$ sudo apt update && sudo apt install python3-opencv

(this will take a while)

Set timezone

The current time will be printed on the video, so we will want to see the correct timezone.

Check current timezone

$ timedatectl

List available timezones

$ timedatectl list-timezones

Set timezone

$ sudo timedatectl set-timezone Australia/Brisbane

Clone the project from GitHub

Clone the repository

$ git clone https://github.com/nielsenamrose/trap-camera.git

Run start.sh when the device starts

Make start.sh executable

$ chmod +x trap-camera/start.sh

Edit crontab

$ sudo crontab -e

Add the line

@reboot cd /home/debian/trap-camera && ./start.sh &

The development environment

This section is by no means complete. There are many options for doing Python development. Here are just a few random notes I found useful when using Anaconda on Ubuntu.

To install OpenCV using conda: conda install -c conda-forge opencv

To reset camera: sudo modprobe -r uvcvideo && sudo modprobe uvcvideo

trap-camera's People

Contributors

nielsenamrose avatar

Stargazers

 avatar

Watchers

 avatar

trap-camera's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.