This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let cv = require('opencv'); | |
let fs = require('fs'); | |
let Jimp = require('jimp'); | |
const imageWidth = 640; | |
const imageHeight = 480; | |
const movementPadding = 10; | |
const pixelDiffThreshold = 50; | |
var diff = new cv.Matrix(imageWidth, imageHeight); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Motion detection with nodeJS | |
* | |
* You'll need node-canvas: https://github.com/Automattic/node-canvas | |
*/ | |
var Canvas = require('canvas'), | |
Image = Canvas.Image, | |
canvas = new Canvas(640, 480), | |
diffCanvas = new Canvas(640, 480), |
NewerOlder