• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    JavaScript
  • Created over 7 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple yet fast motion revealing algorithm using the live webcam feed

JS-Motion-Detection

A simple, fast, and lightweight (just 531 bytes gzipped when minified using Google Closure compiler) motion revealing algorithm using the live webcam feed. Live demo here: https://codepen.io/jasonmayes/pen/IrwHG

What is this?

I was trying to devise a super sensitive motion revealing algorithm which was fairly robust against small changes in lighting etc which was capable of running in a fast manner on desktop and mobile devices.

A picture is a thousand words, and a GIF is a thousand images, so check this out for what it outputs: motion-detection-javascript

The nice thing about the result is that all non moving pixels converge to a neutral grey colour. Any changes are darker / lighter than that neutral grey colour. Larger shifts leads to greater contrast.

As you may have guessed, this is a visual tool primarilly to show the isolated movement in a visual way. You could of course take this and use that output to highlight the moving segments but that would require a bit more coding (basically mark all "changed" pixels and then "flood fill" those to extract a bounding box.

More Repositories

1

Real-Time-Person-Removal

Removing people from complex backgrounds in real time using TensorFlow.js in the web browser
JavaScript
5,173
star
2

Twitter-Post-Fetcher

Fetch your twitter posts without using the new Twitter 1.1 API. Pure JavaScript! By Jason Mayes
JavaScript
911
star
3

Smart-Content-Placer

A small JavaScript class to programmatically position content with variable widths and heights and minimizing whitespace gaps. Imagine Pinterest on steroids (Pinterest only allows for variable height). By Jason Mayes
JavaScript
189
star
4

Tensor-Flow-on-Google-Compute-Engine

A simple script to set up GCE environment in Google Cloud so it is ready to run TensorFlow - an Open Source Software Library for Machine Intelligence
Shell
82
star
5

mdl-component-design-pattern

A design pattern that elegantly handles the registration of new components such that DOM upgrades are automatically performed on document load, as well as making it super easy to handle upgrades of elements that may be added after initial page load.
JavaScript
63
star
6

headless-chrome-nvidia-t4-gpu-support

Using headless Chrome on server side environments for true client side browser emulation with NVIDIA T4 GPUs for Web AI model testing or graphical workloads
Shell
60
star
7

doesVideoContain

JavaScript
48
star
8

Particle-Engine

A simple efficient configurable particle engine written in JavaScript using HTML5 canvas 2D which works on desktop and mobile by Jason Mayes
JavaScript
33
star
9

MP4-video-to-JPG-batch-converter

Specify a directory, this script will search it to find all MP4 videos, convert them to JPGs at a desired FPS and resize them to a given size. Super easy!
Shell
24
star
10

Retraining-TensorFlow-Classifier-Using-Video

Script to convert all MP4 videos in a zip archive to JPG frames at a desired FPS with unique names. It will then retrain the top layers of a binary image classifier using TensorFlow using these extracted images.
Shell
11
star
11

wsk-component-design-pattern

A design pattern that elegantly handles the registration of new components such that DOM upgrades are automatically performed on document load, as well as making it super easy to handle upgrades of elements that may be added after initial page load.
8
star
12

handlebars-helper

A helper component to make it super easy to use handlebars templates in a re-usable manner. Instead of defining script tags inline in your HTML to define templates you can instead write "template files" which will be bought in using AJAX.
JavaScript
7
star
13

Tessel-Multibox-Pointer

Use your Tessel with Google Compute Engine GPU instance running Darknet YOLO via a Node.js server to perform multibox detection over websockets. We can then point a servo at the object of interest and speak out what we see via the speaker.
C
7
star
14

Creative-Technologist-Toolkit

A small library written in Google Closure to do common things fast, useful for rapid prototyping in JavaScript.
JavaScript
4
star
15

dynamic-pages

HTML
1
star