Friday 28 November 2014

Design Iterations - Face Swap Project

Face Swap Project - 3 


Following on from the previous blog post (see blog post Face Swap - 2), I have found a library and a piece of code that allows for face detection on still images. Using this piece of code I have been attempting to make it work on live images through adding the video processing library. After sometime of attempting to do this I have not been able to do it. This led me to searching for someone that had. This led me to an amazing github repository from Daniel Shiffman. Within this repository there was an example of a live face detection. 

Looking at the code with Daniel Shiffman had done I was able to see were I was going wrong with my attempt. What I was doing incorrectly was not adding the IF statement if(faces != null) and the FOR loop. This is a key piece of code to the face detection because this is what tells the system to actively look for features of peoples faces and detect them. 



Code for the live face detect


Now that I have a piece of code that actively detects faces in real time I have completed the first stage of this project. The next stage that I need to complete is finding a way for the system to save or store the faces that it detects and then after that has been completed find a way that will allow these saved faces to be called upon and swap over. 

Reference List 

Shiffman, D., 2013. Shiffman-FaceIt. GitHub, Available from: https://github.com/shiffman/Face-It [Accessed 28 November 2014].

Wednesday 26 November 2014

Design Iterations - Face Swap Project

Face swap project - 2 


As mentioned in a previous post (see blog post Face Swap - 1) I am creating a face swap installation. Within that blog post I stated that there were three steps that needed to be completed in order to create the installation. The first was creating a live face detection fed. I have begun to start this task and have found an Open CV liabary on github by someone called  atduskgreg. Within this Open CV library there is was an example piece of code named face detection. This piece of code is the bases of my project. This is because the code uses face detection technology to detect faces within a photo. There is however one issue with the face detection and that is because it works on detecting typical features of the face such as the nose, mouth and the eyes if anything obstructs these feature, such as glasses then it does not detect the face. 


The above image shows the face detection working on a picture. 

The code for the face detection 

Although I have stated that I want the installation to detect faces in real time and not in pictures, this is a good start to the project as I have the library and the code in order to detect the faces. This means that I can now move forward with the project and begin to find ways to transfer this code from picture detection to real time camera detection. 

References 

Atduskgreg, 2014. Atduskgreg/OpenCV-Processing. GitHub, Available from: https://github.com/atduskgreg/opencv-processing [Accessed 26 November 2014].

Saturday 22 November 2014

Design Iterations - Face Swap Project

Face swap project - 1


I have decided to create a face swap as my installation for the brief. I have decided to do this because I believe that it is a project that will create an interesting installation at the end as well as it being a project that is attainable with my level of skill within processing. I believe that this project will also show off a number of different media theories such as the idea of a hyper reality and the fact that people are now struggling to distinguish between the real and simulated due to there online lives. This would be shown in this installation because some people are becoming so consumed by their online lives that their online lives are sometimes different to their real life, the idea that they are being someone that they are not. So creating a face swap where the user can essentially become someone else would represent this. 

As I have previously stated that I will be working in a iterative design process I thought that it would wise to create a step by step guide to what will have to be done in order to create this installation. 

1.) The first aspect of this project that will have to be completed is generating a live face detection fed through the camera. 

2.) The second part of this project will be finding a way to store/save the detected faces 

3.) The final part will be finding a way to use the stored faces and swap the faces around. 


Friday 21 November 2014

Processing

Exploding Images 


In the most recent Processing workshop that I have had we learnt how to make a picture burst into many particles on the click of a mouse. The main reason for this workshop was to introduce us to the use of vectors and classes that previously I did not have much experience with. The code itself basically involves setting up a number of variables, loading the image and setting the size of the canvas to the size of the image. The code has been written so that gravity, position and velocity are linked together which means that when velocity is bound to Y, it has use of all of the forces. 



The Code

PImage img;
PVector grav;
ArrayList agents;
int p = 2;
float r,g,b;

void setup(){
  background(255);
  img = loadImage("apple.jpg");
  size(img.width,img.height);
  agents = imageToAgents();
}

void draw(){
  background(255);
  
  
  for (int i = 0; i < agents.size(); i++) {
     Agent tempA = (Agent)agents.get(i);
     if (mousePressed){
       tempA.update();
     }
     tempA.draw(); 
  }
}

ArrayList imageToAgents() {
  ArrayList agents = new ArrayList();
  img.loadPixels();
  for(int x = 0; x < img.width; x += p){
    for (int y = 0; y < img.height; y += p){
      int loc = x + (y * img.width);
      color c = img.pixels[loc];
      Agent pixel = new Agent(x,y,c);
      agents.add(pixel);      
    }
   }
 return agents;
}

class Agent {
    PVector pos,vel,grav,force;
    float x,y;
    color c;

    Agent(int x, int y, color c){
     this.x = x;
     this.y = y;
     this.c = c;
     grav = new PVector (0,random(0.5,1));
     pos = new PVector (x,y);
     force = new PVector();
     vel = new PVector(random(-9,9),random(-9,9));
    }
    
    void update(){
        force.set(grav);
        vel.add(force);
        vel.mult(0.99);
        pos.add(vel);
    }
    
    void draw() {
      fill(c);
      noStroke();
      rect(pos.x,pos.y,p,p); 
    }
}

Monday 3 November 2014

Hyper Reality

Hyper Reality - Media Concept 


Hyper reality is a phase coined by Jean Baudrillard. The idea of a hyper reality is that where the age of information technology has become some awe consuming in western civilisation that new media has forced people in an induced reality called hyper reality (Buardillard 1970). As Hill and Fenner describes it "hyper reality is characterised by the collapse of the distinction between the real and the simulated" (2010 p.75). 

This idea of a hyper reality could be an interesting idea to use for the interative information design project. This is because this idea of a "hyper reality" is the idea that where the rise in new media and social media has become so pivotal to a persons life they are becoming consumed by these platforms and are making people being "no longer distinguish between real life and the online world, according to a major new survey." (Warman 2014). This can be seen in people using social media to create a life that they don't have or want to have, becuase this idea of the hyper reality collapses the boundaries between the real and the simulated so they in creating an online life for some people it becomes a reality. 

Hyper reality can be used a media concept within the installation project in many way. Becuase even a simple installation such as a user manipulating an object on a screen can be seen as a hyper reality because there is a collapse between the real and the simulated. 

Reference List 

Baudrillard, J., 1970. The Consumer Society. London: Sage Publications.

Hill, S. and Fenner, B., 2010. Media and Cultural Theory. Ventus Publishing. Available from: http://bookboon.com/en/media-and-cultural-theory-ebook#download [Accessed 19 December 2014].

Warman, M., 2014. Real world v online world: teens do not distinguis. The Telegraph, 27 April 2014, Available from: http://www.telegraph.co.uk/technology/news/10791922/Real-world-v-online-world-teens-do-not-distinguish.html [Accessed 3 November 2014].