Skip to content

Pedestrian detector hack using raspberry pi camera, node streams, and hyperx/v-dom

Notifications You must be signed in to change notification settings

johnelliott/dcped-hack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Pedestrian detector hack using raspberry pi camera, node streams, and hyperx/v-dom

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published