GithubHelp home page GithubHelp logo

jamesjrg / abbeyroad Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.55 MB

displays the web cam image at the Abbey Road crossing (of Beatles album cover fame) and plays piano notes when people walk across the bars

License: Apache License 2.0

F# 89.13% HTML 4.89% JavaScript 5.97%

abbeyroad's Introduction

#Abbey Road

At someone else's suggestion I made a web page that displays the web cam image from the camera at the Abbey Road crossing (of Beatles album cover fame) and plays piano notes when people walk across the bars of the crossing.

Currently (and very likely forever) it is just a proof of concept with some serious flaws:

  1. the lag between detection and the piano note being played in the browser is far too big. It takes time to detect motion, send that result over the internet via websockets, and then wait for the Web Audio API to respond to Javascript. Delaying the video feed would be very difficult, because the source RTMP feed seems to be obfuscated somehow.

  2. My simple motion detection code is terrible at telling the difference between pedestrians and cars, so given how busy the road is the end result is continuous terribad noise.

However, it does in some sense actually work:

  • it creates an automated browser window on the server and then takes continuous screenshots of the webcam feed (as above I don't have access to the raw RTMP feed, it seems they have obfuscated it somehow)
  • OpenCV is used on the server to detect movement within each polygonal segment of the crossing, discounting overly large movements as probably being a car
  • The server serves a web page to clients which shows the webcam embedded in an iframe (the webcam won't allow embedding the flash directly)
  • The server uses websockets to tell clients which keys are being pressed
  • the client browser uses HTML 5 web audio to play sounds matching the "keys" being pressed

abbeyroad's People

Watchers

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.