John Brieger — 13-9-65

by John Brieger @ 8:20 am 24 January 2012

13-9-65

Naive implementation of 13-9-65.  I’m not really happy with it at all.

int width = 400;
int height = 400;
void setup() {
 
  size(width, height);
  smooth();
  background(255);
  frameRate(.2);
  stroke(0);
  noFill();
  noLoop();
  strokeWeight(1.2);
}
 
void draw() {
  background(255);
   rect(0,0,width-1,height-1);
   int spacing = 20;
   int interval = 15;
   int oldx=0;
   int oldy= (int)random(spacing, spacing+5);
   int newx;
   int newy;
 
   //runs through miking wierd lines. really inefficient and dirty
   while (oldy<=height)
   {
     while( oldx < width)
     {
       newx = oldx + (int)random(spacing, spacing+20);
       newy = oldy + (int)random(-5, +5);
       line(oldx, oldy, newx, newy);
       oldx = newx;
       oldy = newy;
       int vertical = (int)random(0,3);
       if(vertical==1){
         line(oldx,oldy, oldx, oldy+(int)random(spacing+5, spacing+ 15));}
     }
     oldy = oldy+(int)random(spacing, spacing+ 5);
     oldx=0;
   }
 
   //makes circles that are always at least half showing
   for (int i=0; i< width/spacing; i++){
    ellipseMode(CENTER);
    float r = random(4,100);
    ellipse(random(0,width-r),random(0,height-r), r, r);
 
  }
 
}
void mouseClicked()
{
  redraw();
}

blase-FaceOSC

by blase @ 8:09 am

I am an opera singer.

Actually, I’m about as far as you can get from an opera singer. Therefore, I used FaceOSC to let myself lipsync to an opera singer. I used a short sample of an opera singer that I took from the Free Music Archive (source: Vialka- Opera Brut) and made a series of files changing the pitch to be the notes of a major arpeggio (root, maj3, 5, 8va). With FaceOSC, I averaged the amount my two eyebrows were raised to control the pitch. Meanwhile, the extent to which my mouth was open dictated the volume. The audio was implemented using the ddf.minim Processing class, using a series of audioplayer objects to play the sound, varying the gain between -20 and 0 db to control the volume. In addition the color of the face turns redder the higher the pitch.

https://www.youtube.com/watch?v=JLS971xh_Gc

Billy Keyes – FaceOSC

by Billy @ 8:00 am

[vimeo https://vimeo.com/35552475 w=550&h=197]

Navigate through panoramic (or other large photos) by looking around: look left, right, up, and down to pan in that direction. Move closer to the screen to zoom in, or farther away to zoom out. When you’re tired of looking at a picture, simply yawn and a new image appears.

This project makes use of the rotation data, scale, and mouth size provided by FaceOSC, but runs up against the limits of the underlying tracker to detect non-frontal faces.  With some practice, you can learn to pan without losing the tracking. If the face is lost, a red dot appears in the lower corner to let you know. With tweaks to the panning thresholds and acceleration, I think it’s actually a reasonably good alternative interface for viewing large images.

The video features images I took of Schenley Park, the dinosaur outside the Carnegie Library, Glacier Point at Yosemite National Park, and the Gates-Hillman Center on CMU’s campus. The panoramas were created several semesters ago as part of a class project.

Xing Xu-13-9-65

by xing @ 7:54 am

void setup() {

size(860, 860);

strokeWeight( 1.2 );
smooth();
background (255);
for (int i = 0; i < 8; i = i+1) {
float radius=random(0,300);
ellipse(random(0,860), random(0,860), radius,radius);
}

float x=0,y=0,a,b;
float[] xarray=new float[1000];
float[] yarray=new float[1000];
int linepoint=0,count=0;
for (int i = 0; i < 8; i = i+1) {
count=0;
y=y+random(0,200);
x=0;
while (x<860){
count=count+1;
a=x+random(0,120);
b=y+random(-10,10);
line(x,y,a,b);
x=a;y=b;
xarray[count]=x;
yarray[count]=y;
if (i>0)
{
if (random(0,3)>2.2)
{
linepoint=int(random(0,19));
line(xarray[linepoint],yarray[linepoint],x,y);
}

if (random(0,3)<1.3)

line(x,yarray[linepoint],x,y);

}
}
}
}

void draw(){

 

}

void mousePressed() {

strokeWeight( 1.2 );
smooth();
background (255);
for (int i = 0; i < 8; i = i+1) {
float radius=random(0,300);
ellipse(random(0,860), random(0,860), radius,radius);
}

float x=0,y=0,a,b;
float[] xarray=new float[1000];
float[] yarray=new float[1000];
int linepoint=0,count=0;
for (int i = 0; i < 8; i = i+1) {
count=0;
y=y+random(0,200);
x=0;
while (x<860){
count=count+1;
a=x+random(0,120);
b=y+random(-10,10);
line(x,y,a,b);
x=a;y=b;
xarray[count]=x;
yarray[count]=y;
if (i>0)
{
if (random(0,3)>2.2)
{
linepoint=int(random(0,19));
line(xarray[linepoint],yarray[linepoint],x,y);
}

if (random(0,3)<1.3)

line(x,yarray[linepoint],x,y);

}
}
}

}

 

 

 

 

Deren Guler- Project1(gauntlet)

by deren @ 7:46 am

DerenGulernake

int[] xvalues= new int[9];
int[] xvalues= new int[9];
int[] yvalues = new int[9];
int[] yoldvalues = new int[9];
float slope1 = 0;
float slope2;
int[] yfixed= new int[8];
float xoff = 0.05;
int numCircles = 8;
Circle[] circles = new Circle[numCircles];
 
void setup() {
  size(600, 600);
 
for (int i=0; i&lt;numCircles; i++) {
    circles[i] = new Circle(random(width),random(height)); // fill the array with circles at random positions
 
  }
 //pick first random y point
  xvalues[0] = 0; //define boundary for first point
  xvalues[1] = int(random(50, 100));
  xvalues[8]=600;// so the last line goes to the end of the box
  yfixed[0] = int(random(50, 100));
 
  //make grid of x and y points, first and last x point are set
  for (int i=2; i&lt; 8; i++) {
    //make each new point within limits of the one before and divison
    xvalues[i] = int(random(xvalues[i-1] + 20, ((600 * i)/7)));
    //pick the next number between the a fraction of the space and the point before, but not too close
 
  }
  //first y point is constrained so that lines dont intersect
    for (int j=1; j&lt; 8; j++) {
        yfixed[j] = int(random(yfixed[j-1] + 50, ((600 * j)/7)) );
 
         }
          for (int j=0; j&lt; 9; j++) {
        yoldvalues[j] =0;
 
         }
 
  }
 
void draw() {
   background(255);
   //draw random circles
      for (int i=0; i&lt;numCircles; i++) {
    circles[i].display(); // display all the circles
  }
 
//cycle through fixed y grid
for (int p=0; p &lt; 8; p++){
        // create array of points that deviate around grid yfixed
        for(int k=0; k&lt;9; k++){
          yvalues[k] = yfixed[p]+ int(random(-10 ,10));
       }  
 
       for (int l=0; l &lt; 8; l++){
          line(xvalues[l], yvalues[l] , xvalues[l+1], yvalues[l+1]); //draw bands row by row
           int tofillornot= int(random(3)); // fill some parts with lines, leave others blank
 
                  if (tofillornot == 1 &amp;&amp; l &lt; 7) { //fill with vertical lines but not the first and last one since the slope of that is fixed
 
                        slope1 = (float((yoldvalues[l+1]- yoldvalues[l]))/ float((xvalues[l+1] - xvalues[l]))); //slope between parts of the segment
                        slope2 = (float((yvalues[l+1]- yvalues[l]))/ float((xvalues[l+1] - xvalues[l]))); //slope between parts of the segment
                        int numvertlines = int(random(20)); //some number of vertical lines
                        float ycepta= yoldvalues[l] - (slope1 * xvalues[l]);
                        float yceptb= yvalues[l+1] - (slope2 * xvalues[l+1]);
 
                      for (int m = 0; m &lt; numvertlines; m ++){
                        //pick some x and y points and find their pairs using the slope of the bands
                             int x1 = int(random(xvalues[l], xvalues[l+1]));
 
                        float ycept1 = ycepta + (slope1 * x1); //y = mx+b
                        float ycept2 =  yceptb + (slope2 * x1);
 
                        line(x1, ycept1,x1, ycept2); //draw vertical lines
                }
 
          }
 
           if (tofillornot == 2) { //fill with diagonal lines
 
                        slope1 = (float((yoldvalues[l+1]- yoldvalues[l]))/ float((xvalues[l+1] - xvalues[l]))); //slope between parts of the segment
                        slope2 = (float((yvalues[l+1]- yvalues[l]))/ float((xvalues[l+1] - xvalues[l]))); //slope between parts of the segment
                        int numvertlines = int(random(20)); //some number of vertical lines
                        float ycepta= yoldvalues[l] - (slope1 * xvalues[l]); //y intercepts for the different slopes
                        float yceptb= yvalues[l+1] - (slope2 * xvalues[l+1]);
 
                      for (int m = 0; m &lt; numvertlines; m ++){
                        //pick some x and y points and find their pairs using the slope of the bands
                             int x1 = int(random(xvalues[l], xvalues[l+1]));
                             int x2 = int(random(xvalues[l], xvalues[l+1]));
 
                        float ycept1 = ycepta + (slope1 * x1); //y = mx+b for top and bottom
                        float ycept2 =  yceptb + (slope2 * x2);
 
                        line(x1, ycept1,x2, ycept2); //draw diagonal line
                }
 
           }
}
 
noLoop(); //don't repeat randoms
 for (int j=0; j&lt; 9; j++) {
        yoldvalues[j] = yvalues[j];
 
         }
} //end of p loop
}
 
//call to draw circles
class Circle {
  float x,y; // location
  float dim; // dimension
 
  Circle(float x, float y) {
    this.x = x;
    this.y = y;
    dim = random(20,90); //not too big, not too small
 
  }
 
  void display() {
    ellipse(x,y,dim,dim); // a circle at position xy
  }
}

VarvaraToulkeridou-FaceOSC

by varvara @ 7:41 am

Navigation camera control with face gestures
The objective of this project was to be able to navigate in 3d model using face gestures. Who doesn’t want to be able to zoom in and out, rotate around, pan etc in a 3d scene without having to use the mouse? To make this happen I brought together the Peasycam library for Processing, the FaceOSC tool created by Kyle Mcdonald and the FaceOSC template for Processing created by Dan Wilcox. Changes in face orientation in x, y, z result to rotating the model around x, y and z axis respectively. Changes in face position result to panning the 3d model on the screen. Changes in scale result to zooming in and out in the scene. At any point, the model can be set at its default position by increasing the mouth width, i.e. strongly smiling. The navigation in the 3d scene is made possible by using the navigation commands provided by the Peasycam library, that is by moving the camera in relation to the model (the actual size, position etc of the model is not being altered).

Sam Lavery – FaceOSC

by sam @ 7:11 am

For this project, I wanted to create a new interface for controlling a map with a face. When the user opens their eyes wide the map zooms in. When the user squints the map zooms out. I used FaceOSC and the Unfolding library to get the desired effect. I think that using the eyes to control zooming is strange at first but perhaps more intuitive then using a mouse.

FaceOSC Mapping from Sam Lavery on Vimeo.

Joe Medwid – FaceOSC

by Joe @ 7:11 am

[youtube=https://www.youtube.com/watch?v=krB4Fhs0HJg&feature=youtu.be]
Ah, puppetry. Perhaps not the most original use of Face OSC, but it was certainly an entertaining one. Given enough time to tweak the values, I definitely could have rigged up quite an expressive marionette. The original plan for this project was to have the puppet change every time the user closed their eyes, so that a new “mask” would greet them every time. Face OSC doesn’t seem to be capable of registering subtle eye movements, however. I then attempted to change puppet states with a sudden head tilt, but this seemed to finicky. In the end, I simply had the program select a random puppet each time the application is launched.

Xing Xu-FaceOSC

by xing @ 6:56 am

The name of the project is “jawbreaker”. It is because for today when I went to the univeristy health service to check my eye problem which is turned to be caused by the overheat of the room. The nurse asked me about what the “ball” is for. I said it is a bomb. He laughed. And then I asked “Do American people get sensitive when I was saying it is a bomb?”. He said “Well, maybe in the big cities like New York, but here it is ok.”….. I could not remember that later part of the conversation. But I do remember that he told me it is better be called “jawbreaker” and because I have no idea what is that, he tried explaining that to me.

This is a project using FaceOSC and Arduino. W

When you open the mouth it will choose a random color and get the light ON.

The Arduino board has a Xbee module which could send and receive data wirelessly from another Xbee module from the computer. There is a RGD LED light attached to the Arduino. Thus the color and the frequency of the flashing of the light will be controled by the Arduino and also be controled by the other Xbee module. The ball is part of my work from round 5 Building Virtual World course in Entertainment Technology Center. My friend Sean McChesney and Maria Tartaglia helped to make the ball from a hamster ball. I finished this project during the night of Monday in week 2 of Spring semester. It seems like there is tons of possiblities in using faceOSC. hahahaha.

[youtube=https://www.youtube.com/watch?v=buvc969VsGQ&feature=youtu.be]

John Brieger — Face OSC

by John Brieger @ 6:49 am

[vimeo=35562537 w=605&h=400]

Uses Face_OSC to do facial recognition, smiling and mouth movement to control an array of LED’s that respond in real time to facial features. Raising your eyebrows flashes the lights on the back of the collar in rapid succession, letting everyone around know if you are surprised or angry.

The dress itself is part of a fashion collaboration between myself and Alanna Fusaro. You can see our full line here.

Sorry for the rendering issues in the video.

Processing Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// John Brieger
// IACD 2012
//
//
//
// Facetracking through:
// Kyle McDonald's FaceOSC https://github.com/kylemcdonald/ofxFaceTracker
//
// this example includes a class to abstract the Face data
//
// 2012 Dan Wilcox danomatika.com
// for the IACD Spring 2012 class at the CMU School of Art
//
// adapted from from Greg Borenstein's 2011 example
// http://www.gregborenstein.com/
// https://gist.github.com/1603230
 
import oscP5.*;
import processing.serial.*;
Serial port = null;
OscP5 oscP5;
 
// our FaceOSC tracked face dat
Face face = new Face();
 
void setup() {
  size(600, 720);
  frameRate(30);
 
  //setup serial connection to Arduino
  println("Available serial ports:");
  String[] serialList =Serial.list();
  println(serialList);
  if(serialList.length != 0)
  {
  port = new Serial(this, serialList[0], 9600);
  }
  else
    println("No Available Serial Ports!");
  oscP5 = new OscP5(this, 8338);
}
 
void draw() {  
  background(255);
  stroke(0);
  if (port == null)
  {
     //check for available serial ports
     String[] serialList =Serial.list();
     if(serialList.length != 0)
      {
       println("Found Serial Port!");
       println(serialList);
       println("\n");
      port = new Serial(this, serialList[0], 9600);
      }
  }
  if (face.found &gt; 0)
  {
   // write data out to port
    if(port != null)
    {
    port.write('Y');
    float browHeightAvg = (face.eyebrowLeft + face.eyebrowRight) /2.0;
    if(browHeightAvg &gt;= 8.0)    {
        print("Brow Raised!");
        port.write('^');
    }
    else   {
      port.write('_');  
    }
    port.write('B');
 
    //mouth is a formula based off sqrt of area
    float mouthArea= face.mouthWidth * face.mouthHeight;
    float sqr = sqrt(mouthArea);
    byte mouthSend = (byte)((int)sqr);
    port.write(mouthSend);
    println("Mouth Sent: "+mouthSend);
    port.write('M');
    }
  print(face.toString());
  }
  else
  {
    //no face
    if(port != null)
    {
    port.write('N');
    }
  }
}
 
// OSC CALLBACK FUNCTIONS
 
void oscEvent(OscMessage m) {
  face.parseOSC(m);
}

Arduino Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
int currentPattern;
const int DEFAULTPATTERN = 0;
const int FACEPATTERN = 1;
int ledArray[14];
int currentLED;      // the number of the LED pin
int index;
int updown= 1;
long previousMillis = 0;        // will store last time LED was updated
long interval = 125;           // interval at which to blink (milliseconds)
 
int noFaceCount = 0;
int noRaiseCount = 0;
 
char buff[]= "0000000000";  //charbuff for serial
boolean browRaise = false;
int mouthPin = 3;
int browPin = 10;
boolean brow = false;
int mouth = 12;
void setup() {
  // set the digital pins as output:
  pinMode(0, OUTPUT);  
  pinMode(1, OUTPUT);  
  pinMode(2, OUTPUT);      
  pinMode(3, OUTPUT);      
  pinMode(4, OUTPUT);      
  pinMode(5, OUTPUT);      
  pinMode(6, OUTPUT);      
  pinMode(7, OUTPUT);      
  pinMode(8, OUTPUT);  
  pinMode(9, OUTPUT);     
  pinMode(10, OUTPUT);   
  pinMode(11, OUTPUT);   
  pinMode(12, OUTPUT);   
  pinMode(13, OUTPUT);
  Serial.begin(9600);
  updown = 1;
  index = 0;
  currentLED =0;
  currentPattern = DEFAULTPATTERN;
}
 
void loop()
{
  unsigned long currentMillis = millis();
 
  if(currentMillis - previousMillis &gt; interval) {
    // save the last time you blinked the LED 
    previousMillis = currentMillis;   
    while( Serial.available() &gt; 0)
    {
      for (int i=0; i= 10)
          {
            browRaise = false; 
          }
        }
        break;
      case 'M':
        mouthPin = (int)(buff[9]);
        if (mouthPin&gt;9){
           mouthPin = 9; 
        }
        break;
      case 'Y':
        if(currentPattern == DEFAULTPATTERN)
        {
          for(int i = 0; i = 40){
          //turn all off;
          if(currentPattern == FACEPATTERN)
          {
            for(int i = 0; i &lt;=13; i++)
            {
              digitalWrite(i, LOW); 
            }
            updown = 1;
            currentLED = 0;
            index = 0;
          }
          currentPattern = DEFAULTPATTERN;
        }
        break;       
      }
 
    }
 
    //HERE BE PATTERNS!
    //PATTERNTASTIC!
    if(currentPattern == DEFAULTPATTERN)
    {
      if(updown == 1)   {
        if(currentLED != 0)     {
          digitalWrite(currentLED-1, LOW);
        }
        index++;
        if(index == 13)     {
          updown = -1;
        }
      }
      else
      {
        if(currentLED != 13)    {
          digitalWrite(currentLED+1, LOW);
        }
        index--;
        if(index == 0)    {
          updown = 1;
        }
      }
      //currentLED= ledArray[index];
      currentLED=index;
      // set the LED with the ledArraytate of the variable:
      digitalWrite(currentLED, HIGH);
      delay(125);
    }
 
    //YAY FACES
    else if(currentPattern == FACEPATTERN){
      for(int i = 0; i&lt;= mouthPin; i++){
        digitalWrite(i, HIGH); 
      }
      for( int i =mouthPin+1; i&lt;10;i++)
      {
       digitalWrite(i,LOW); 
      }
      if(browRaise)     {
        digitalWrite(currentLED, LOW);
        if(updown == 1)   {        
          index++;
          if(index == 13)  {
            updown = -1;
          }
        }
        else      {
          index--;
          if(index == 10) {
            updown = 1;
          }
        }
        currentLED = index;
        digitalWrite(currentLED, HIGH);        
      }
      else{
       digitalWrite(11, LOW);
       digitalWrite(12, LOW);
       digitalWrite(13, LOW);
       digitalWrite(10, HIGH);
      }
    }
  }
}
« Previous PageNext Page »
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2023 Interactive Art and Computational Design, Spring 2012 | powered by WordPress with Barecity