Permalink
Browse files

stuff

  • Loading branch information...
1 parent d2bdf6d commit 08fbaa95599f6969b8118556e2c2b0cf859a367a @CorpusCallosum CorpusCallosum committed Dec 20, 2012
Showing with 11 additions and 2,640 deletions.
  1. +2 −2 processing/StyleBlasterGrabber/OpticalFlow.pde
  2. +9 −7 processing/StyleBlasterGrabber/StyleBlasterGrabber.pde
  3. BIN processing/StyleBlasterGrabber_Mexico.zip
  4. +0 −4 processing/StyleBlasterGrabber_Mexico/application.linux32/StyleBlasterGrabber_Mexico
  5. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/StyleBlasterGrabber_Mexico.jar
  6. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/core.jar
  7. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/gifAnimation.jar
  8. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/gluegen-rt.jar
  9. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/jogl.jar
  10. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/opengl.jar
  11. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/postToWeb.jar
  12. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/lib/video.jar
  13. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/libgluegen-rt.so
  14. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/libjogl.so
  15. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/libjogl_awt.so
  16. BIN processing/StyleBlasterGrabber_Mexico/application.linux32/libjogl_cg.so
  17. +0 −89 processing/StyleBlasterGrabber_Mexico/application.linux32/source/MotionSensor.pde
  18. +0 −423 processing/StyleBlasterGrabber_Mexico/application.linux32/source/OpticalFlow.pde
  19. +0 −308 processing/StyleBlasterGrabber_Mexico/application.linux32/source/StyleBlasterGrabber_Mexico.pde
  20. +0 −29 processing/StyleBlasterGrabber_Mexico/application.linux32/source/timer.pde
  21. +0 −4 processing/StyleBlasterGrabber_Mexico/application.linux64/StyleBlasterGrabber_Mexico
  22. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/StyleBlasterGrabber_Mexico.jar
  23. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/core.jar
  24. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/gifAnimation.jar
  25. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/gluegen-rt.jar
  26. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/jogl.jar
  27. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/opengl.jar
  28. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/postToWeb.jar
  29. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/lib/video.jar
  30. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/libgluegen-rt.so
  31. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/libjogl.so
  32. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/libjogl_awt.so
  33. BIN processing/StyleBlasterGrabber_Mexico/application.linux64/libjogl_cg.so
  34. +0 −89 processing/StyleBlasterGrabber_Mexico/application.linux64/source/MotionSensor.pde
  35. +0 −423 processing/StyleBlasterGrabber_Mexico/application.linux64/source/OpticalFlow.pde
  36. +0 −308 processing/StyleBlasterGrabber_Mexico/application.linux64/source/StyleBlasterGrabber_Mexico.pde
  37. +0 −29 processing/StyleBlasterGrabber_Mexico/application.linux64/source/timer.pde
  38. +0 −75 .../StyleBlasterGrabber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Info.plist
  39. BIN ...abber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/MacOS/JavaApplicationStub
  40. BIN ...ber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/MacOS/JavaApplicationStub64
  41. +0 −1 ...ing/StyleBlasterGrabber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/PkgInfo
  42. BIN ...tion.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/StyleBlasterGrabber_Mexico.jar
  43. BIN ...Grabber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/core.jar
  44. BIN ...Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/gifAnimation.jar
  45. BIN ...r_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/gluegen-rt.jar
  46. BIN ...Grabber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/jogl.jar
  47. BIN ...co/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/libgluegen-rt.jnilib
  48. BIN ...r_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/libjogl.jnilib
  49. BIN ...xico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/libjogl_awt.jnilib
  50. BIN ...exico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/libjogl_cg.jnilib
  51. BIN ...abber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/opengl.jar
  52. BIN ...er_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/postToWeb.jar
  53. BIN ...rabber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/Java/video.jar
  54. BIN ...erGrabber_Mexico/application.macosx/StyleBlasterGrabber_Mexico.app/Contents/Resources/sketch.icns
  55. +0 −89 processing/StyleBlasterGrabber_Mexico/application.macosx/source/MotionSensor.pde
  56. +0 −423 processing/StyleBlasterGrabber_Mexico/application.macosx/source/OpticalFlow.pde
  57. +0 −308 processing/StyleBlasterGrabber_Mexico/application.macosx/source/StyleBlasterGrabber_Mexico.pde
  58. +0 −29 processing/StyleBlasterGrabber_Mexico/application.macosx/source/timer.pde
@@ -20,7 +20,7 @@ class OpticalFlow {
PFont font;
color[] vline;
- MovieMaker movie;
+ // MovieMaker movie;
// capture parameters
int fps=30;
@@ -389,7 +389,7 @@ class OpticalFlow {
///////////////////////////////////////////////////
// recording movie
- if (flagmovie) movie.addFrame();
+ // if (flagmovie) movie.addFrame();
// print information (not shown in the movie)
fill(255, 0, 0);
@@ -26,7 +26,7 @@ PImage grabImage;
MotionSensor motionSensor;
//SETUP VARS
-String version = "1.5";
+String version = "2";
int startHour = 7; //am
int endHour = 16; //3:59pm
int endMinute = 25;
@@ -64,8 +64,10 @@ public void setup() {
fill(255, 50, 50);
noFill();
String[] cameras = Capture.list();
- if (version == "2.0") {
- cam = new Capture(this, 1280, 960, "Logitech Camera");
+ if (version == "2") {
+ // cam = new Capture(this, 1280, 960, "Logitech Camera");
+ cam = new Capture(this, 1280, 960);
+
}
else {
// cam = new Capture(this, 2592,1944);
@@ -76,13 +78,13 @@ public void setup() {
// cam = new Capture(this, 1280, 720);
}
- if (version == "2.0") {
- // cam.start();
+ if (version == "2") {
+ cam.start();
}
//set global framerate
int f = 25;
frameRate(f);
- cam.frameRate(f);
+ //cam.frameRate(f);
cameraTimer = new Timer(1000);
sensorTimer = new Timer(1000);
@@ -285,7 +287,7 @@ void keyPressed() {
}
else if (key == 'c') {
//open camera settings
- cam.settings();
+ // cam.settings();
ignoreSensor = true;
}
else if (key == '.') {
Binary file not shown.
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-APPDIR=$(dirname "$0")
-java -Djava.library.path="$APPDIR" -cp "$APPDIR/lib/StyleBlasterGrabber_mexico.jar:$APPDIR/lib/core.jar:$APPDIR/lib/gluegen-rt.jar:$APPDIR/lib/jogl.jar:$APPDIR/lib/opengl.jar:$APPDIR/lib/video.jar:$APPDIR/lib/postToWeb.jar" StyleBlasterGrabber_mexico
@@ -1,89 +0,0 @@
-import java.awt.Rectangle;
-import processing.video.*;
-
-
-class MotionSensor {
- Rectangle _r = new Rectangle(0, 0, 0, 0);
- int _thresh = 13;
- float _sensorRes = 1;
- float _lastTestAreaBrightness, _bDiff;
- int _numPixels;
- PImage _image;
- // Capture _cam;
-
- MotionSensor() {
-
- }
-
- boolean checkHitArea() {
- // _cam = cam;
- float testAreaBrightness = getTestAreaBrightness();
- //find teh absolute diff of the current brightness and the last brightness
- //println("testAreaBrightness: "+testAreaBrightness);
- // println("_lastTestAreaBrightness: "+_lastTestAreaBrightness);
- _bDiff = abs(testAreaBrightness - _lastTestAreaBrightness);
-
- _lastTestAreaBrightness = testAreaBrightness;
-
- if (_bDiff > _thresh) {
- return true;
- }
- return false;
- }
-
- //returns the average brightness of the test area defined by the test area rectangle
- float getTestAreaBrightness() {
- _image.loadPixels();
- float testAreaBrightness = 0;
-
- // For each pixel in the test area
- for (int x = _r.x; x < _r.x+_r.width; x+=_sensorRes) {
- for (int y = _r.y; y < _r.y+_r.height; y+=_sensorRes) {
- // println("_cam.get(x, y): "+ _cam.get(x, y));
- testAreaBrightness += brightness(_image.get(x, y));
- // println("brightness(_cam.get(x, y): "+ brightness(_cam.get(x, y)));
- }
- }
-
- testAreaBrightness /= _numPixels;
- testAreaBrightness *= _sensorRes;
-
- return testAreaBrightness;
- }
-
- void draw() {
- // println("MotionSensor.draw");
- rect(_r.x, _r.y, _r.width, _r.height);
- text(_bDiff, _r.x, _r.y - 5);
- }
-
- void update() {
- _numPixels = _r.width*_r.height;
- }
-
- void reset(){
- float testAreaBrightness = getTestAreaBrightness();
- _bDiff = abs(testAreaBrightness - _lastTestAreaBrightness);
- _lastTestAreaBrightness = testAreaBrightness;
- }
-
- //GETTERS AND SETTERS
- void setWidth(int n) {
- _r.width = n;
- }
-
-
-
- void setHeight(int n) {
- _r.height = n;
- }
-
- void setX(int n) {
- _r.x = n;
- }
-
- void setY(int n) {
- _r.y = n;
- }
-}
-
Oops, something went wrong.

0 comments on commit 08fbaa9

Please sign in to comment.