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
| var matrixStream = new cv.VideoCapture(0).toStream() | |
| , faceRecognitionStream = new cv.ObjectDetectionStream(cv.FACE_CASCADE) | |
| faceRecognitionStream.on('data', function(faces){ | |
| console.log("I spy", faces.length, "faces...") | |
| }) | |
| matrixStream.pipe(faceRecognitionStream) | |
| matrixStream.read() |
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
| var s = new cv.VideoCapture(0) | |
| var detect = function(){ | |
| s.read(function(im){ | |
| im.detectObject(cv.FACE_CASCADE, {}, function(err, faces){ | |
| console.log("I spy", faces.length, "faces...") | |
| detect(); | |
| }) | |
| }) | |
| } |
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
| var matrixStream = new cv.ImageStream() | |
| , faceRecognitionStream = new cv.ObjectDetectionStream(cv.FACES_CASCADE) | |
| faceRecognitionStream.on('data', function(faces){ | |
| console.log("FACES!", faces); | |
| }) | |
| matrixStream.pipe(faceRecognitionStream); |
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
| 0 * * * * ps aux | grep "Google Drive" | grep -v grep | awk '{ print $2 }' | xargs kill -9 && open /Applications/Google\ Drive.app |
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
| var cv = require('opencv') | |
| new cv.VideoCapture(0).read(function(mat){ | |
| mat.resize(200,100) | |
| mat.detectObject("./data/haarcascade_frontalface_alt.xml", {min : [30,30]}, function(err, faces){ | |
| for (var i=0;i<faces.length; i++){ | |
| var x = faces[i] | |
| mat.ellipse(x.x + x.width/2, x.y + x.height/2, x.width/2, x.height/2); |
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
| var s = new cv.ImageStream(); | |
| fs.createReadStream('./examples/mona.jpg').pipe(s); | |
| // --- | |
| cv.ImageStream = function(){ | |
| this.data = Buffers([]) | |
| } |
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
| var cv = require('opencv') | |
| var im = new cv.Image("./examples/test.jpg") | |
| , face_cascade = new cv.CascadeClassifier("./examples/haarcascade_frontalface_alt.xml") | |
| var faces = face_cascade.detectMultiScale(im, function(err, faces){ | |
| for (var i=0;i<faces.length; i++){ | |
| var x = faces[i] | |
| im.ellipse(x.x + x.width/2, x.y + x.height/2, x.width/2, x.height/2); | |
| } |
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
| // ==UserScript== | |
| // @name pb-fb | |
| // @namespace fb | |
| // @description fb | |
| // @include https://www.facebook.com/ | |
| // ==/UserScript== | |
| document.getElementById("blueBar").style.setProperty("position", "absolute", "important"); | |
| var _findByVal = function(tag, val, cb){ |
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
| var sys = require('sys') | |
| var tests = [] | |
| exports.runTest= function(t, browser, cb){ | |
| var err = function(e){ | |
| sys.print('E') | |
| console.log("\n Error: ", t[1], ">>> ", e.name, e.message, '\n', e.stack) | |
| cb() |
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
| int incomingByte = 0; | |
| int prev = 0; | |
| int RED = 13; | |
| int ORANGE = 12; | |
| int GREEN = 11; | |
| void setup() { | |
| pinMode(RED, OUTPUT); | |
| pinMode(ORANGE, OUTPUT); |