Permalink
Browse files

committing from styleblaster machine

  • Loading branch information...
2 parents 60f725c + bd59ede commit 3a5d69d93d1e82c064ecd51993d697f4cde6f1b5 @CorpusCallosum CorpusCallosum committed Jan 12, 2013
@@ -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);
@@ -30,7 +30,12 @@ String version = "1.5";
int startHour = 8; //am
int endHour = 15; //3pm
int endMinute = 25;
+<<<<<<< HEAD
boolean production = true;
+=======
+
+boolean production = false;
+>>>>>>> bd59ede9b8ae62f2b4a6f3564609c63ea5eb8f1f
String nycUploadURL = "http://styleblaster.herokuapp.com/upload/nyc";
String gdlUploadURL = "http://styleblaster.herokuapp.com/upload/gdl";
@@ -298,5 +303,7 @@ void keyPressed() {
else if (key=='f') of.flagflow=!of.flagflow; // show opticalflow on/off
else if (key=='v') production=!production; // send to production endpoint
else if (key=='d') disable=!disable; // disable/enable
+ else if (key=='=') disable=!disable; // zoom in
+
}
@@ -2,7 +2,7 @@ import processing.opengl.*;
import processing.video.*;
import org.seltar.Bytes2Web.*;
import java.awt.Rectangle;
-import gifAnimation.*;
+//import gifAnimation.*;
OpticalFlow of;
Capture cam;
@@ -16,12 +16,12 @@ boolean uploading = false;
boolean checkRight = false;
boolean grab = false;
boolean disable = false;
-boolean recordGif = false;
-boolean doGifs = false;
+//boolean recordGif = false;
+//boolean doGifs = false;
ImageToWeb img;
byte[] imgBytes;
PImage grabImage;
-GifMaker gifExport;
+//GifMaker gifExport;
MotionSensor leftSensor, rightSensor;
@@ -46,7 +46,7 @@ public void setup() {
int sketchWidth = 666;
float m = .7;
- size(round(sketchWidth*m), round(sketchHeight*m));
+ size(round(sketchWidth*m), round(sketchHeight*m), P2D);
// size(1280, 720);
String[] devices = Capture.list();
@@ -57,7 +57,11 @@ public void setup() {
String[] cameras = Capture.list();
if (version == "2.0") {
//Microsoft Studio
- cam = new Capture(this, 1920, 1080, "Microsoft® LifeCam Studio(TM)");
+ // cam = new Capture(this, 1920, 1080, "Microsoft® LifeCam Studio(TM)");
+ // cam = new Capture(this, 1920, 1080);
+
+ cam = new Capture(this, cameras[0]);
+
}
else {
@@ -112,8 +116,12 @@ void draw() {
if (! uploading) {
cam.read();
+ println("cam.width: "+cam.width);
+
grabImage = cam.get(cam.width/2-width/2, cam.height/2-height/2, width, height);
image(grabImage, 0, 0);
+
+ // image(cam, 0, 0);
of.updateImage(grabImage);
of.draw();
@@ -156,7 +164,7 @@ void draw() {
grab = false;
//update the reference image on the sensors
leftSensor._image = grabImage;
- if (doGifs) {
+ /*if (doGifs) {
if (of.xFlowSum < flowThreshold) {
if (!recordGif) {
gifExport = new GifMaker(this, getTimestamp()+".gif");
@@ -173,7 +181,7 @@ void draw() {
recordGif = false;
// gifExport = new GifMaker(this, "export.gif");
}
- }
+ }*/
hit = leftSensor.checkHitArea();
if (hit) {
Binary file not shown.
@@ -28,7 +28,7 @@ MotionSensor motionSensor;
//SETUP VARS
String version = "1.5";
int startHour = 7; //am
-int endHour = 16; //3:59pm
+int endHour = 19; //3:59pm
int endMinute = 25;
boolean production = true;
@@ -40,16 +40,12 @@ String devUploadURL = "http://styleblaster.herokuapp.com/upload/dev";
String uploadURL = gdlUploadURL;
String tag = "nyc";
-int camWidth;
-int camHeight = 720;
int sensorThreshold = 13;
int flowDirection = 1; //-1 = right to left, 1 = left to right
int flowThreshold = 220;
float sensorRes = 1;
public void setup() {
- int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
- //camHeight = 2;
int sketchHeight = 1000;
int sketchWidth = 666;
float m = .7;
@@ -63,21 +59,14 @@ public void setup() {
fill(255, 50, 50);
noFill();
String[] cameras = Capture.list();
- if (version == "2.0") {
- cam = new Capture(this, 1280, 960, "Logitech Camera");
- }
- else {
+
// cam = new Capture(this, 2592,1944);
//Logitech 910c
//cam = new Capture(this, 1280, 960);
//Microsoft Studio
- cam = new Capture(this, 1920, 1080);
- // cam = new Capture(this, 1280, 720);
- }
+ // cam = new Capture(this, 1920, 1080);
+ cam = new Capture(this, 1280, 720);
- if (version == "2.0") {
- // cam.start();
- }
//set global framerate
int f = 25;
frameRate(f);
@@ -97,7 +86,6 @@ public void setup() {
of = new OpticalFlow(cam);
-
}
void draw() {
@@ -1,3 +1,3 @@
-
-StyleBlasterGrabber_mexico
-StyleBlasterGrabber_mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
+ -Xms64m -Xmx1500m
+StyleBlasterGrabber_Mexico
+StyleBlasterGrabber_Mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
@@ -23,7 +23,7 @@
import java.util.zip.*;
import java.util.regex.*;
-public class StyleBlasterGrabber_mexico extends PApplet {
+public class StyleBlasterGrabber_Mexico extends PApplet {
@@ -55,7 +55,7 @@
//SETUP VARS
String version = "1.5";
int startHour = 7; //am
-int endHour = 16; //3:59pm
+int endHour = 19; //3:59pm
int endMinute = 25;
boolean production = true;
@@ -67,16 +67,12 @@
String uploadURL = gdlUploadURL;
String tag = "nyc";
-int camWidth;
-int camHeight = 720;
int sensorThreshold = 13;
int flowDirection = 1; //-1 = right to left, 1 = left to right
int flowThreshold = 220;
float sensorRes = 1;
public void setup() {
- int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
- //camHeight = 2;
int sketchHeight = 1000;
int sketchWidth = 666;
float m = .7f;
@@ -90,21 +86,14 @@ public void setup() {
fill(255, 50, 50);
noFill();
String[] cameras = Capture.list();
- if (version == "2.0") {
- cam = new Capture(this, 1280, 960, "Logitech Camera");
- }
- else {
+
// cam = new Capture(this, 2592,1944);
//Logitech 910c
//cam = new Capture(this, 1280, 960);
//Microsoft Studio
- cam = new Capture(this, 1920, 1080);
- // cam = new Capture(this, 1280, 720);
- }
+ // cam = new Capture(this, 1920, 1080);
+ cam = new Capture(this, 1280, 720);
- if (version == "2.0") {
- // cam.start();
- }
//set global framerate
int f = 25;
frameRate(f);
@@ -124,7 +113,6 @@ public void setup() {
of = new OpticalFlow(cam);
-
}
public void draw() {
@@ -875,6 +863,6 @@ public boolean isFinished() {
}
static public void main(String args[]) {
- PApplet.main(new String[] { "--bgcolor=#c0c0c0", "StyleBlasterGrabber_mexico" });
+ PApplet.main(new String[] { "--bgcolor=#FFFFFF", "StyleBlasterGrabber_Mexico" });
}
}
@@ -28,7 +28,7 @@ MotionSensor motionSensor;
//SETUP VARS
String version = "1.5";
int startHour = 7; //am
-int endHour = 16; //3:59pm
+int endHour = 19; //3:59pm
int endMinute = 25;
boolean production = true;
@@ -40,16 +40,12 @@ String devUploadURL = "http://styleblaster.herokuapp.com/upload/dev";
String uploadURL = gdlUploadURL;
String tag = "nyc";
-int camWidth;
-int camHeight = 720;
int sensorThreshold = 13;
int flowDirection = 1; //-1 = right to left, 1 = left to right
int flowThreshold = 220;
float sensorRes = 1;
public void setup() {
- int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
- //camHeight = 2;
int sketchHeight = 1000;
int sketchWidth = 666;
float m = .7;
@@ -63,21 +59,14 @@ public void setup() {
fill(255, 50, 50);
noFill();
String[] cameras = Capture.list();
- if (version == "2.0") {
- cam = new Capture(this, 1280, 960, "Logitech Camera");
- }
- else {
+
// cam = new Capture(this, 2592,1944);
//Logitech 910c
//cam = new Capture(this, 1280, 960);
//Microsoft Studio
- cam = new Capture(this, 1920, 1080);
- // cam = new Capture(this, 1280, 720);
- }
+ // cam = new Capture(this, 1920, 1080);
+ cam = new Capture(this, 1280, 720);
- if (version == "2.0") {
- // cam.start();
- }
//set global framerate
int f = 25;
frameRate(f);
@@ -97,7 +86,6 @@ public void setup() {
of = new OpticalFlow(cam);
-
}
void draw() {
@@ -1,3 +1,3 @@
-
-StyleBlasterGrabber_mexico
-StyleBlasterGrabber_mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
+ -Xms64m -Xmx1500m
+StyleBlasterGrabber_Mexico
+StyleBlasterGrabber_Mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
@@ -28,7 +28,7 @@ MotionSensor motionSensor;
//SETUP VARS
String version = "1.5";
int startHour = 7; //am
-int endHour = 16; //3:59pm
+int endHour = 19; //3:59pm
int endMinute = 25;
boolean production = true;
@@ -40,16 +40,12 @@ String devUploadURL = "http://styleblaster.herokuapp.com/upload/dev";
String uploadURL = gdlUploadURL;
String tag = "nyc";
-int camWidth;
-int camHeight = 720;
int sensorThreshold = 13;
int flowDirection = 1; //-1 = right to left, 1 = left to right
int flowThreshold = 220;
float sensorRes = 1;
public void setup() {
- int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
- //camHeight = 2;
int sketchHeight = 1000;
int sketchWidth = 666;
float m = .7;
@@ -63,21 +59,14 @@ public void setup() {
fill(255, 50, 50);
noFill();
String[] cameras = Capture.list();
- if (version == "2.0") {
- cam = new Capture(this, 1280, 960, "Logitech Camera");
- }
- else {
+
// cam = new Capture(this, 2592,1944);
//Logitech 910c
//cam = new Capture(this, 1280, 960);
//Microsoft Studio
- cam = new Capture(this, 1920, 1080);
- // cam = new Capture(this, 1280, 720);
- }
+ // cam = new Capture(this, 1920, 1080);
+ cam = new Capture(this, 1280, 720);
- if (version == "2.0") {
- // cam.start();
- }
//set global framerate
int f = 25;
frameRate(f);
@@ -97,7 +86,6 @@ public void setup() {
of = new OpticalFlow(cam);
-
}
void draw() {

0 comments on commit 3a5d69d

Please sign in to comment.