motion-detector-client

0.1.4 • Public • Published

To include motion detection this is a generic component on NPM Registry . You will also need a server which is on docker hub along with this client This detects the motion on client web cam( React app) and uses server in Python based on open CV so Client just captures webcam images and server analyses these images using OPENCV to determine if there is a motion or not client can specify a call back function which server calls each time there is a motion Server is just a docker image which you can pull and run and specify its URL to client

NPM Registry(Client)

Command

npm install motion-detector-client

Docker Image (Server)

Command

docker pull kunalpimparkhede/motiondetectorwebcam

Usage: You just need to write following code to have motion detection

import MotionDetectingClient from './MotionDetectingClient';

<MotionDetectingClient server="http://0.0.0.0:8080" callback={handleMovement}/>

function handleMovement(pixels) 
{
console.log("Movement By Pixel="+pixels)
}

On server side : just start the docker server on port 8080:

docker run --name motion-detector-server-app -P 8080:5000 motion-detector-server-app

Dependencies (16)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i motion-detector-client

    Weekly Downloads

    3

    Version

    0.1.4

    License

    none

    Unpacked Size

    52.8 kB

    Total Files

    24

    Last publish

    Collaborators

    • kunalpimparkhede