Coder Social home page Coder Social logo

picam's Introduction

picam

A server that allows a raspberry pi camera to be controlled with an HTTP API and an admin GUI. It can also be run as a docker container.

The server takes a picture every X seconds and also allows you to take a picture on demand and configure the options. You can currently only access one photo at a time.

API

take a picture = $ curl -X POST http://picam/photo

get the picture = $ curl http://picam/photo.jpg

get camera options = $ curl http://picam/camera

set camera options = $ curl -X PUT http://picam/camera -H "Content-Type: application/json" -d '{}'

note: you can optionally pass camera options when taking a picture, for example:

$ curl -X POST http://picam/photo -d '{}'

GUI

Go to http://picam/admin for the admin GUI that allows you to take a picture, view a picture, and change the camera options

Docker

To build and deploy the docker image...

$ docker build -t jritsema/rpi-picam:1.1.1 .
$ docker tag -f x jritsema/rpi-picam:latest
$ docker push jritsema/rpi-picam:1.1.1
$ docker push jritsema/rpi-picam:latest

Fresh pi setup

  • flash sd card using hypriot's os that comes with docker preinstalled

  • attach raspberry pi camera

  • boot

  • optionally change passwd, and host name from black-pearl and enable wifi in $ nano /boot/occidentalis.txt

  • enable the camera in $ sudo nano /boot/config.txt and add the following lines

start_x=1
disable_camera_led=1
gpu_mem=128
  • reboot the pi

  • setup docker hub credentials using $ docker login

  • start the container

docker run -it --rm -p 80:9000 --device /dev/vchiq --name picam jritsema/rpi-picam

picam's People

Contributors

jritsema avatar

Watchers

Tom Townsend avatar James Cloos avatar

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.