https://github.com/johnelliott/dcped-hack
Pedestrian detector hack using raspberry pi camera, node streams, and hyperx/v-dom
https://github.com/johnelliott/dcped-hack
camera hack opencv pedestrian raspberry-pi-camera ssh
Last synced: 3 months ago
JSON representation
Pedestrian detector hack using raspberry pi camera, node streams, and hyperx/v-dom
- Host: GitHub
- URL: https://github.com/johnelliott/dcped-hack
- Owner: johnelliott
- Created: 2016-05-15T02:16:12.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-15T02:32:19.000Z (about 10 years ago)
- Last Synced: 2025-10-24T01:52:33.429Z (8 months ago)
- Topics: camera, hack, opencv, pedestrian, raspberry-pi-camera, ssh
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# about
This is a hack for the DC Great Streets hackathon put on by the District of Columbia government. Twitter hashtags for this event were #innomaytion and #GShackathon.
This requires a Raspberry Pi with a Raspberry Pi camera. The main hack is to call the Raspberry Pi camera using SSH from within node to skip deploying any code to the Pi.
The app has as server and browser front-end. The server gets a picture stream from pi via ssh/node child processes, pipes jpegs through openCV, does person detection, and sends data over a websocket to the browser with a virtual-DOM library that refreshes the view.
# directory structure
index.js - server
lib - modules using camera and openCV
src - front-end code
# use
Change `lib/ssh-cam.js` to ssh to your Pi—this is the hacky bit.
Uses Node v4+ or whenever spreads were introduced. The front-end uses requires a browser supporting template literals.
Check out the `watch`, `build`, and `dbg` npm scripts in `package.json` to build and run the app in debug mode