Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

committing from styleblaster machine

  • Loading branch information...
commit 3a5d69d93d1e82c064ecd51993d697f4cde6f1b5 2 parents 60f725c + bd59ede
Jack Kalish authored January 12, 2013
4  processing/StyleBlasterGrabber/OpticalFlow.pde
@@ -20,7 +20,7 @@ class OpticalFlow {
20 20
 
21 21
   PFont font;
22 22
   color[] vline;
23  
-  MovieMaker movie;
  23
+ // MovieMaker movie;
24 24
 
25 25
   // capture parameters
26 26
   int fps=30;
@@ -389,7 +389,7 @@ class OpticalFlow {
389 389
 
390 390
     ///////////////////////////////////////////////////
391 391
     // recording movie 
392  
-    if (flagmovie) movie.addFrame();
  392
+  //  if (flagmovie) movie.addFrame();
393 393
 
394 394
     //  print information (not shown in the movie)
395 395
     fill(255, 0, 0);
7  processing/StyleBlasterGrabber/StyleBlasterGrabber.pde
@@ -30,7 +30,12 @@ String version = "1.5";
30 30
 int startHour = 8; //am
31 31
 int endHour = 15;  //3pm
32 32
 int endMinute = 25; 
  33
+<<<<<<< HEAD
33 34
 boolean production = true;
  35
+=======
  36
+
  37
+boolean production = false;
  38
+>>>>>>> bd59ede9b8ae62f2b4a6f3564609c63ea5eb8f1f
34 39
 
35 40
 String nycUploadURL = "http://styleblaster.herokuapp.com/upload/nyc";
36 41
 String gdlUploadURL = "http://styleblaster.herokuapp.com/upload/gdl";
@@ -298,5 +303,7 @@ void keyPressed() {
298 303
   else if (key=='f') of.flagflow=!of.flagflow; // show opticalflow on/off
299 304
   else if (key=='v') production=!production; // send to production endpoint
300 305
   else if (key=='d') disable=!disable; // disable/enable
  306
+    else if (key=='=') disable=!disable; // zoom in
  307
+
301 308
 }
302 309
 
24  processing/StyleBlasterGrabber2_0/StyleBlasterGrabber2_0.pde
@@ -2,7 +2,7 @@ import processing.opengl.*;
2 2
 import processing.video.*;
3 3
 import org.seltar.Bytes2Web.*;
4 4
 import java.awt.Rectangle;
5  
-import gifAnimation.*;
  5
+//import gifAnimation.*;
6 6
 
7 7
 OpticalFlow of;
8 8
 Capture cam;
@@ -16,12 +16,12 @@ boolean uploading = false;
16 16
 boolean checkRight = false;
17 17
 boolean grab = false;
18 18
 boolean disable = false;
19  
-boolean recordGif = false;
20  
-boolean doGifs = false;
  19
+//boolean recordGif = false;
  20
+//boolean doGifs = false;
21 21
 ImageToWeb img;
22 22
 byte[] imgBytes;
23 23
 PImage grabImage;
24  
-GifMaker gifExport;
  24
+//GifMaker gifExport;
25 25
 
26 26
 MotionSensor leftSensor, rightSensor;
27 27
 
@@ -46,7 +46,7 @@ public void setup() {
46 46
   int sketchWidth = 666;
47 47
   float m = .7;
48 48
 
49  
-  size(round(sketchWidth*m), round(sketchHeight*m));
  49
+  size(round(sketchWidth*m), round(sketchHeight*m), P2D);
50 50
   //   size(1280, 720);
51 51
 
52 52
   String[] devices = Capture.list();
@@ -57,7 +57,11 @@ public void setup() {
57 57
   String[] cameras = Capture.list();
58 58
   if (version == "2.0") {
59 59
     //Microsoft Studio
60  
-    cam = new Capture(this, 1920, 1080, "Microsoft® LifeCam Studio(TM)");
  60
+  //  cam = new Capture(this, 1920, 1080, "Microsoft® LifeCam Studio(TM)");
  61
+    //  cam = new Capture(this, 1920, 1080);
  62
+
  63
+      cam = new Capture(this, cameras[0]);
  64
+
61 65
   }
62 66
   else {
63 67
 
@@ -112,8 +116,12 @@ void draw() {
112 116
 
113 117
   if (! uploading) {
114 118
     cam.read();
  119
+    println("cam.width: "+cam.width);
  120
+    
115 121
     grabImage = cam.get(cam.width/2-width/2, cam.height/2-height/2, width, height);
116 122
     image(grabImage, 0, 0);
  123
+   
  124
+  //  image(cam, 0, 0);
117 125
 
118 126
     of.updateImage(grabImage);
119 127
     of.draw();
@@ -156,7 +164,7 @@ void draw() {
156 164
     grab = false;
157 165
     //update the reference image on the sensors
158 166
     leftSensor._image = grabImage;
159  
-    if (doGifs) {
  167
+    /*if (doGifs) {
160 168
       if (of.xFlowSum < flowThreshold) {
161 169
         if (!recordGif) {
162 170
           gifExport = new GifMaker(this, getTimestamp()+".gif");
@@ -173,7 +181,7 @@ void draw() {
173 181
         recordGif = false;
174 182
         //  gifExport = new GifMaker(this, "export.gif");
175 183
       }
176  
-    }
  184
+    }*/
177 185
 
178 186
     hit = leftSensor.checkHitArea();     
179 187
     if (hit) {
BIN  processing/StyleBlasterGrabber_Mexico.zip
Binary file not shown
20  processing/StyleBlasterGrabber_Mexico/StyleBlasterGrabber_Mexico.pde
@@ -28,7 +28,7 @@ MotionSensor motionSensor;
28 28
 //SETUP VARS
29 29
 String version = "1.5";
30 30
 int startHour = 7; //am
31  
-int endHour = 16;  //3:59pm
  31
+int endHour = 19;  //3:59pm
32 32
 int endMinute = 25; 
33 33
 boolean production = true;
34 34
 
@@ -40,16 +40,12 @@ String devUploadURL = "http://styleblaster.herokuapp.com/upload/dev";
40 40
 String uploadURL = gdlUploadURL;
41 41
 String tag = "nyc";
42 42
 
43  
-int camWidth;
44  
-int camHeight = 720;
45 43
 int sensorThreshold = 13;
46 44
 int flowDirection = 1; //-1 = right to left, 1 = left to right
47 45
 int flowThreshold = 220;
48 46
 float sensorRes = 1;
49 47
 
50 48
 public void setup() {
51  
-  int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
52  
-  //camHeight = 2;
53 49
   int sketchHeight = 1000;
54 50
   int sketchWidth = 666;
55 51
   float m = .7;
@@ -63,21 +59,14 @@ public void setup() {
63 59
   fill(255, 50, 50);
64 60
   noFill();
65 61
   String[] cameras = Capture.list();
66  
-  if (version == "2.0") {
67  
-    cam = new Capture(this, 1280, 960, "Logitech Camera");
68  
-  }
69  
-  else {
  62
+ 
70 63
     //   cam = new Capture(this, 2592,1944);
71 64
     //Logitech 910c
72 65
     //cam = new Capture(this, 1280, 960);
73 66
     //Microsoft Studio
74  
-    cam = new Capture(this, 1920, 1080);
75  
-    // cam = new Capture(this, 1280, 720);
76  
-  }
  67
+   // cam = new Capture(this, 1920, 1080);
  68
+     cam = new Capture(this, 1280, 720);
77 69
 
78  
-  if (version == "2.0") {
79  
-    //   cam.start();
80  
-  }
81 70
   //set global framerate
82 71
   int f = 25;
83 72
   frameRate(f);
@@ -97,7 +86,6 @@ public void setup() {
97 86
 
98 87
   of = new OpticalFlow(cam);
99 88
 
100  
-
101 89
 }
102 90
 
103 91
 void draw() {
6  processing/StyleBlasterGrabber_Mexico/application.windows32/lib/args.txt
... ...
@@ -1,3 +1,3 @@
1  
-
2  
-StyleBlasterGrabber_mexico
3  
-StyleBlasterGrabber_mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
  1
+ -Xms64m -Xmx1500m
  2
+StyleBlasterGrabber_Mexico
  3
+StyleBlasterGrabber_Mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
24  processing/StyleBlasterGrabber_Mexico/application.windows32/source/StyleBlasterGrabber_Mexico.java
@@ -23,7 +23,7 @@
23 23
 import java.util.zip.*; 
24 24
 import java.util.regex.*; 
25 25
 
26  
-public class StyleBlasterGrabber_mexico extends PApplet {
  26
+public class StyleBlasterGrabber_Mexico extends PApplet {
27 27
 
28 28
 
29 29
 
@@ -55,7 +55,7 @@
55 55
 //SETUP VARS
56 56
 String version = "1.5";
57 57
 int startHour = 7; //am
58  
-int endHour = 16;  //3:59pm
  58
+int endHour = 19;  //3:59pm
59 59
 int endMinute = 25; 
60 60
 boolean production = true;
61 61
 
@@ -67,16 +67,12 @@
67 67
 String uploadURL = gdlUploadURL;
68 68
 String tag = "nyc";
69 69
 
70  
-int camWidth;
71  
-int camHeight = 720;
72 70
 int sensorThreshold = 13;
73 71
 int flowDirection = 1; //-1 = right to left, 1 = left to right
74 72
 int flowThreshold = 220;
75 73
 float sensorRes = 1;
76 74
 
77 75
 public void setup() {
78  
-  int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
79  
-  //camHeight = 2;
80 76
   int sketchHeight = 1000;
81 77
   int sketchWidth = 666;
82 78
   float m = .7f;
@@ -90,21 +86,14 @@ public void setup() {
90 86
   fill(255, 50, 50);
91 87
   noFill();
92 88
   String[] cameras = Capture.list();
93  
-  if (version == "2.0") {
94  
-    cam = new Capture(this, 1280, 960, "Logitech Camera");
95  
-  }
96  
-  else {
  89
+ 
97 90
     //   cam = new Capture(this, 2592,1944);
98 91
     //Logitech 910c
99 92
     //cam = new Capture(this, 1280, 960);
100 93
     //Microsoft Studio
101  
-    cam = new Capture(this, 1920, 1080);
102  
-    // cam = new Capture(this, 1280, 720);
103  
-  }
  94
+   // cam = new Capture(this, 1920, 1080);
  95
+     cam = new Capture(this, 1280, 720);
104 96
 
105  
-  if (version == "2.0") {
106  
-    //   cam.start();
107  
-  }
108 97
   //set global framerate
109 98
   int f = 25;
110 99
   frameRate(f);
@@ -124,7 +113,6 @@ public void setup() {
124 113
 
125 114
   of = new OpticalFlow(cam);
126 115
 
127  
-
128 116
 }
129 117
 
130 118
 public void draw() {
@@ -875,6 +863,6 @@ public boolean isFinished() {
875 863
 }
876 864
 
877 865
   static public void main(String args[]) {
878  
-    PApplet.main(new String[] { "--bgcolor=#c0c0c0", "StyleBlasterGrabber_mexico" });
  866
+    PApplet.main(new String[] { "--bgcolor=#FFFFFF", "StyleBlasterGrabber_Mexico" });
879 867
   }
880 868
 }
20  processing/StyleBlasterGrabber_Mexico/application.windows32/source/StyleBlasterGrabber_Mexico.pde
@@ -28,7 +28,7 @@ MotionSensor motionSensor;
28 28
 //SETUP VARS
29 29
 String version = "1.5";
30 30
 int startHour = 7; //am
31  
-int endHour = 16;  //3:59pm
  31
+int endHour = 19;  //3:59pm
32 32
 int endMinute = 25; 
33 33
 boolean production = true;
34 34
 
@@ -40,16 +40,12 @@ String devUploadURL = "http://styleblaster.herokuapp.com/upload/dev";
40 40
 String uploadURL = gdlUploadURL;
41 41
 String tag = "nyc";
42 42
 
43  
-int camWidth;
44  
-int camHeight = 720;
45 43
 int sensorThreshold = 13;
46 44
 int flowDirection = 1; //-1 = right to left, 1 = left to right
47 45
 int flowThreshold = 220;
48 46
 float sensorRes = 1;
49 47
 
50 48
 public void setup() {
51  
-  int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
52  
-  //camHeight = 2;
53 49
   int sketchHeight = 1000;
54 50
   int sketchWidth = 666;
55 51
   float m = .7;
@@ -63,21 +59,14 @@ public void setup() {
63 59
   fill(255, 50, 50);
64 60
   noFill();
65 61
   String[] cameras = Capture.list();
66  
-  if (version == "2.0") {
67  
-    cam = new Capture(this, 1280, 960, "Logitech Camera");
68  
-  }
69  
-  else {
  62
+ 
70 63
     //   cam = new Capture(this, 2592,1944);
71 64
     //Logitech 910c
72 65
     //cam = new Capture(this, 1280, 960);
73 66
     //Microsoft Studio
74  
-    cam = new Capture(this, 1920, 1080);
75  
-    // cam = new Capture(this, 1280, 720);
76  
-  }
  67
+   // cam = new Capture(this, 1920, 1080);
  68
+     cam = new Capture(this, 1280, 720);
77 69
 
78  
-  if (version == "2.0") {
79  
-    //   cam.start();
80  
-  }
81 70
   //set global framerate
82 71
   int f = 25;
83 72
   frameRate(f);
@@ -97,7 +86,6 @@ public void setup() {
97 86
 
98 87
   of = new OpticalFlow(cam);
99 88
 
100  
-
101 89
 }
102 90
 
103 91
 void draw() {
6  processing/StyleBlasterGrabber_Mexico/application.windows64/lib/args.txt
... ...
@@ -1,3 +1,3 @@
1  
-
2  
-StyleBlasterGrabber_mexico
3  
-StyleBlasterGrabber_mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
  1
+ -Xms64m -Xmx1500m
  2
+StyleBlasterGrabber_Mexico
  3
+StyleBlasterGrabber_Mexico.jar,core.jar,gluegen-rt.jar,jogl.jar,opengl.jar,video.jar,postToWeb.jar
20  processing/StyleBlasterGrabber_Mexico/application.windows64/source/StyleBlasterGrabber_Mexico.pde
@@ -28,7 +28,7 @@ MotionSensor motionSensor;
28 28
 //SETUP VARS
29 29
 String version = "1.5";
30 30
 int startHour = 7; //am
31  
-int endHour = 16;  //3:59pm
  31
+int endHour = 19;  //3:59pm
32 32
 int endMinute = 25; 
33 33
 boolean production = true;
34 34
 
@@ -40,16 +40,12 @@ String devUploadURL = "http://styleblaster.herokuapp.com/upload/dev";
40 40
 String uploadURL = gdlUploadURL;
41 41
 String tag = "nyc";
42 42
 
43  
-int camWidth;
44  
-int camHeight = 720;
45 43
 int sensorThreshold = 13;
46 44
 int flowDirection = 1; //-1 = right to left, 1 = left to right
47 45
 int flowThreshold = 220;
48 46
 float sensorRes = 1;
49 47
 
50 48
 public void setup() {
51  
-  int camWidth = 1280;//(16*camHeight)/9; //get correct aspect ratio for width
52  
-  //camHeight = 2;
53 49
   int sketchHeight = 1000;
54 50
   int sketchWidth = 666;
55 51
   float m = .7;
@@ -63,21 +59,14 @@ public void setup() {
63 59
   fill(255, 50, 50);
64 60
   noFill();
65 61
   String[] cameras = Capture.list();
66  
-  if (version == "2.0") {
67  
-    cam = new Capture(this, 1280, 960, "Logitech Camera");
68  
-  }
69  
-  else {
  62
+ 
70 63
     //   cam = new Capture(this, 2592,1944);
71 64
     //Logitech 910c
72 65
     //cam = new Capture(this, 1280, 960);
73 66
     //Microsoft Studio
74  
-    cam = new Capture(this, 1920, 1080);
75  
-    // cam = new Capture(this, 1280, 720);
76  
-  }
  67
+   // cam = new Capture(this, 1920, 1080);
  68
+     cam = new Capture(this, 1280, 720);
77 69
 
78  
-  if (version == "2.0") {
79  
-    //   cam.start();
80  
-  }
81 70
   //set global framerate
82 71
   int f = 25;
83 72
   frameRate(f);
@@ -97,7 +86,6 @@ public void setup() {
97 86
 
98 87
   of = new OpticalFlow(cam);
99 88
 
100  
-
101 89
 }
102 90
 
103 91
 void draw() {

0 notes on commit 3a5d69d

Please sign in to comment.
Something went wrong with that request. Please try again.