Moshe Ladanga

Archive for May 2008

Ira Greenberg’s Negative to Positive: Adaptation for Video

leave a comment »

I’ve been studying several programs for video feeds, such as Golan Levin’s FrameDifferencing, JMMyron’s library, etc. They are basic (supposedly, but to me it looked daunting enough just to read) programs that do simple things: detect motion, detect and isolate brightest points in the frame, detect and draw around illuminated figures- all of these for capturing particular kinds of data from video that can trigger programs to do something.

But what I wanted for my side of the installation was something subtle, and I wanted to interfere in how the computer captures the image, not necessarily using the pictorial data as just data. For me an image is more than just an image, and maybe I wouldn’t need to go about this whole interactive thing through a roundabout way. I wanted to learn how the computer reads video data, and in the processing books, almost all of the video capture programs dealt with operations at the level of pixel arrays. Since video is such a rich data stream, programmers deal with video data intrinsically, meaning working at the level of the bits to facilitate fast calculations for real-time rendering of video.

What I did to adapt Greenberg’s original code was to toy a bit with the inversion factor; it was really just changing it a bit, trying to see how the code reacts to video feed.

*Copy the code into a Processing sketch, make sure you have a webcam or video cam connected, and run it to see how it really is- and apologies, my code I think is still messy.

**Please click on the images to see them in full

import processing.video.*;

Capture video;

void setup() {
size(640, 480);
video = new Capture(this, 640, 480, 30);
}

void draw() {
if (video.available()) {
video.read();
image(video, 0, 0, 640,480);
loadPixels();

float invertFactor = 255.0;
for (int i=0; i<pixels.length; i++){
float r= abs(red(pixels[i])-invertFactor);
float g= abs(green(pixels[i])-invertFactor);
float b= abs(blue(pixels[i])-invertFactor);
float a= abs(alpha(pixels[i])-invertFactor);
pixels[i]=color(r,g,b);
if(i>0 && i% width==0){
float wave = b+r+g+a;
invertFactor-=(255.0/wave);
}

}
}
updatePixels();
}

Negative to Positive with Ghosting 01:

There are two main differences in this code from the previous one. I discovered the alpha factor can be integrated in how the video feed is displayed. Since the computer reads color values as A, R, G, and B, the translucency of each color can be factored in into the array, hence producing a ghosting effect.

The second point of difference is the modulus operator that I added to the invertFactor which breaks down the its value to finer increments, which I think produced the pale palette of the image (but honestly I’m not so sure, maybe it’s the one responsible for the ghosting).


import processing.video.*;

Capture video;

void setup() {
size(640, 480); // Change size to 320 x 240 if too slow at 640 x 480
// Uses the default video input, see the reference if this causes an error
video = new Capture(this, 640, 480, 30);
}

void draw() {
if (video.available()) {
video.read();
image(video, 0, 0, 640,480);
loadPixels();

float invertFactor = 255.0;
for (int i=0; i<pixels.length; i++){
float r= abs(red(pixels[i])-invertFactor);
float g= abs(green(pixels[i])-invertFactor);
float b= abs(blue(pixels[i])-invertFactor);
float a= abs(alpha(pixels[i])-invertFactor);
pixels[i]=color(r,g,b,a);
if(i>0 && i% width==0){
float wave = r+b+g+a;
invertFactor-=(255.0/width%wave);
}
}
}
updatePixels();
}

Negative to Positive with Ghosting 05:

This experiment captured the aesthetic that I wanted for the video feed; the image is at the point of erasure, and coupled with the ghosting, the image becomes more of a trace, rather than a direct representation of what the camera captures.

I simplified the wave value that affects the invertFactor by multiplying it with the sine of the pixel sum, and I made the pixel sum monochrome by only having one value plus the alpha value.

import processing.video.*;

Capture video;

void setup() {
size(640, 480); // Change size to 320 x 240 if too slow at 640 x 480
// Uses the default video input, see the reference if this causes an error
video = new Capture(this, 640, 480, 30);
}

void draw() {
if (video.available()) {
video.read();
image(video, 0, 0, 640,480);
loadPixels();
float invertFactor = 255.0;
for (int i=0; i<pixels.length; i++){
float redsum= abs(red(pixels[i]));
float bluesum= abs(blue(pixels[i]));
float greensum= abs(green(pixels[i]));
float r= abs(red(pixels[i])-invertFactor);
float g= abs(green(pixels[i])-invertFactor);
float b= abs(blue(pixels[i])-invertFactor);
float a= abs(alpha(pixels[i])-invertFactor);
r=redsum;
b=bluesum;
g=greensum;
//pixels[i]=color(r,g,b,a);
pixels[i]=color(redsum*r,a);
if (i>0 && i% width==0) {

float wave =sin(pixels[i]);
invertFactor-=(255.0/width*wave);
//invertFactor-=255/width;
// pixels[i]=color(r,g,b,a);
}
}
}
updatePixels();

}

– Learning how to read arrays almost made me snap, but it was a necessary step in understanding how pixel arrays work in capturing and displaying video in the Processing Environment. What I got excited about was the effect of the slight manipulation of code on the way the moving image is displayed.

The last experiment, the one in black&white, gave me confidence in pushing it further. The black&white image looks more like a photograph rather than a video image, and there is this resulting tension between the experience of seeing yourself move in what looks like a photograph.

Written by mosheladanga

May 29, 2008 at 7:59 PM

Posted in Reflections

Initial Play: Ellipses in Code

leave a comment »

After burning my neurons on trying to learn coding by reading Ira Greenberg’s book on one hand and Reas’ & Fry’s book on the other, I decided to just play around with a piece of code to get the hang of the syntax of Processing.

So here are sketches that I modified from an example in one of the books and turned it into something that harks back to the strange 70’s experiments with optical phenomena (that sounds quite serious, but I assure you, these things are really just for fun:)) The original was a basic program for creating animated squares, and it does it by using arrays. I wanted to understand how an array works, because in the books, the video manipulation programs work with pixel arrays to manipulate and utilise video feeds. So here’s to all the pleasures of being a beginner- Cheers!

*(to see how it really is, just copy and paste the code into a Processing sketch and run it)

Simple expanding ellipse:

int num = 1;
int[] ex = new int[num];
int[] ey = new int[num];

void setup() {
size(1000,1000);
noFill();
}
void draw() {
background(0);
stroke(255);
noFill();
smooth();
strokeWeight(1);
for (int i=0; i<num; i++) {
ex[i] = ex[i]+1;
ey[i] = ey[i]+1;
if (ex[i]+ey[i]>1999) {
ex[i] = 0;
ey[i] = 0;
}
ellipse(500,500,ex[i],ey[i]);
}
}

Ellipse Pulse:

int num = 1;
int[] ex = new int[num];
int[] ey = new int[num];

void setup() {
size(1000,1000);
noFill();
}
void draw() {
background(0);
stroke(255);
noFill();
smooth();
for (int i=0; i<num; i++) {
ex[i] = ex[i]+1;
ey[i] = ey[i]+1;
if (ex[i]+ey[i]>1999) {
ex[i] = 0;
ey[i] = 0;
}
strokeWeight(ex[i]%9);
ellipse(500,500,ex[i],ey[i]);
}
}

Ellipse Pulse 02:

int num = 1;
int[] ex = new int[num];
int[] ey = new int[num];

void setup() {
size(1000,1000);
noFill();
}
void draw() {
background(0);
stroke(255);
noFill();
smooth();
for (int i=0; i<num; i++) {
ex[i] = ex[i]+1;
ey[i] = ey[i]+1;
if (ex[i]+ey[i]>1999) {
ex[i] = 0;
ey[i] = 0;
}
strokeWeight(ex[i]%9);
ellipse(500,500,ex[i],ey[i]);
strokeWeight(ex[i]%11);
ellipse(200,200,ex[i],ey[i]);
strokeWeight(ex[i]%13);
ellipse(700,800,ex[i],ey[i]);
strokeWeight(ex[i]%7);
ellipse(400,30,ex[i],ey[i]);
}
}

Ellipse Pulse 03: (This one got my groove on, hehe)

int num = 1;
int[] ex = new int[num];
int[] ey = new int[num];

void setup() {
size(1000,1000);
noFill();
}
void draw() {
background(0);
stroke(255);
noFill();
smooth();
for (int i=0; i<num; i++) {
ex[i] = ex[i]+1;
ey[i] = ey[i]+1;
if (ex[i]+ey[i]>1999) {
ex[i] = 0;
ey[i] = 0;
}
strokeWeight(ex[i]%9);
ellipse(500,500,ex[i],ey[i]);
strokeWeight(ex[i]%11);
ellipse(500,500,ex[i]-100,ey[i]-100);
strokeWeight(ex[i]%13);
ellipse(500,500,ex[i]-200,ey[i]-200);
strokeWeight(ex[i]%7);
ellipse(500,500,ex[i]-300,ey[i]-300);
strokeWeight(ex[i]%11);
ellipse(500,500,ex[i]-400,ey[i]-400);
strokeWeight(ex[i]%13);
ellipse(500,500,ex[i]-500,ey[i]-500);
strokeWeight(ex[i]%7);
ellipse(500,500,ex[i]-600,ey[i]-600);
strokeWeight(ex[i]%11);
ellipse(500,500,ex[i]-700,ey[i]-700);
strokeWeight(ex[i]%13);
ellipse(500,500,ex[i]-800,ey[i]-800);
strokeWeight(ex[i]%7);
ellipse(500,500,ex[i]-900,ey[i]-900);
}
}

Ellipse Pulse 04:

int num = 1;
int[] ex = new int[num];
int[] ey = new int[num];

void setup() {
size(screen.width,screen.height);
noFill();
}
void draw() {
background(0);
stroke(255);
noFill();
smooth();
for (int i=0; i<num; i++) {
ex[i] = ex[i]+1;
ey[i] = ey[i]+1;
if (ex[i]+ey[i]>1999) {
ex[i] = 0;
ey[i] = 0;
}
strokeWeight(ex[i]%9);
ellipse(screen.width/2,500,ex[i],ey[i]);
strokeWeight(ex[i]%11);
ellipse(screen.width/2,500,ex[i]-100,ey[i]-100);
strokeWeight(ex[i]%13);
ellipse(screen.width/2,500,ex[i]-200,ey[i]-200);
strokeWeight(ex[i]%7);
ellipse(screen.width/2,500,ex[i]-300,ey[i]-300);
strokeWeight(ex[i]%11);
ellipse(screen.width/2,500,ex[i]-400,ey[i]-400);
strokeWeight(ex[i]%13);
ellipse(screen.width/2,500,ex[i]-500,ey[i]-500);
strokeWeight(ex[i]%7);
ellipse(screen.width/2,500,ex[i]-600,ey[i]-600);
strokeWeight(ex[i]%11);
ellipse(screen.width/2,500,ex[i]-700,ey[i]-700);
strokeWeight(ex[i]%13);
ellipse(screen.width/2,500,ex[i]-800,ey[i]-800);
strokeWeight(ex[i]%7);
ellipse(screen.width/2,500,ex[i]-900,ey[i]-900);
strokeWeight(ex[i]%11);
ellipse(screen.width/2,500,ex[i]-150,ey[i]-150);
strokeWeight(ex[i]%13);
ellipse(screen.width/2,500,ex[i]-250,ey[i]-250);
strokeWeight(ex[i]%7);
ellipse(screen.width/2,500,ex[i]-350,ey[i]-350);
strokeWeight(ex[i]%11);
ellipse(screen.width/2,500,ex[i]-450,ey[i]-450);
strokeWeight(ex[i]%13);
ellipse(screen.width/2,500,ex[i]-550,ey[i]-550);
strokeWeight(ex[i]%7);
ellipse(screen.width/2,500,ex[i]-650,ey[i]-650);
strokeWeight(ex[i]%11);
ellipse(screen.width/2,500,ex[i]-750,ey[i]-750);
strokeWeight(ex[i]%13);
ellipse(screen.width/2,500,ex[i]-850,ey[i]-850);
strokeWeight(ex[i]%7);
ellipse(screen.width/2,500,ex[i]-950,ey[i]-950);
}
}

Then I wanted something more simple, so I returned to the initial sketch I made, incorporating floats for the factors that would affect the size of the ellipses. Maybe using the sin() is a long-winded way compared to using random(), but I think the resulting rhythm is more interesting.

Ripple 03:

int num = 1;
int[] ex = new int[num];
int[] ey = new int[num];

void setup() {
size(screen.width,screen.height);
noFill();
}
void draw() {
background(0);
stroke(255);
noFill();
smooth();
for (int i=0; i<num; i++) {
ex[i] = ex[i]+1;
ey[i] = ey[i]+1;
if (ex[i]>screen.height) {
ex[i] = -ex[i];
ey[i] = -ey[i];
}
strokeWeight(.50);
ellipse(screen.width/2,screen.height/2,ex[i],ey[i]);
float e1 = sin(ex[i])/.001;
float e2 = sin(ey[i])/.001;
ellipse(screen.width/2,screen.height/2,e1+ex[i],e2+ey[i]);

}
}

Eclipse:

I wanted to experiment with tying in some lines into the sketch, but still follow the overall aesthetic. I know it’s quite gloomy and gothic, but hey, we’re in London baby:)

*please click on the images to see in full, they’re barely seen in my equally gothic black page background

int num = 1;
int[] ex = new int[num];
int[] ey = new int[num];

void setup() {
size(screen.width,screen.height);
noFill();
}
void draw() {
background(0);
stroke(255);
noFill();
smooth();
for (int i=0; i<num; i++) {
ex[i] = ex[i]+1;
ey[i] = ey[i]+1;
if (ex[i]>screen.height) {
ex[i] = -ex[i];
ey[i] = -ey[i];
}
float e1 = sin(ex[i])/.009;
float e2 = sin(ey[i])/.0001;
if (e1+e2>screen.width+screen.height) {
e1 = -e1;
e2 = -e2;
}
strokeWeight(random(.1,100)%.3);
ellipse(screen.width/2,screen.height/2,ex[i],ey[i]);
strokeWeight(random(.1,100)%.3);
ellipse(screen.width/2,screen.height/2,e1+ex[i],e2+ey[i]);
line(random(1,1650),random(1,1050),e1,e2);

}
}

What struck me about thinking in math is that you go into this state where you have to to think conceptually, in the purest sense of the word. Since the processing sketch is like a perpetual machine, the data you feed in is not really data per se, but instructions. I know for the programmers out there this is a so what moment, but for a beginner like me, it is the point where I got it.

Written by mosheladanga

May 20, 2008 at 9:27 PM

Posted in Reflections

Colloquium

leave a comment »

Making the colloquium video was hard; we couldn’t agree on what to say, how we should present our ideas, our own rationales, and the shared vision we had. So the only way we could do it is by taping a series of conversations where we talk about our research and rely on the spontaneity of thought.

The video reflects this; but I think I could have said more- or maybe it is really like this in a collaborative project, where voices have to meet at some point and let go of individual agendas to try something new.

There was an interesting question raised during the colloquium regarding the presentation of our work. Somebody asked if we weren’t bothered by how we presented our work, with all the computer brands popping up on the screen. Honestly, I wasn’t bothered at all with it, just taken it for granted since I work on with computer everyday.

But I thought about it, and after a couple of days, I admit they have a point. Presenting your work well is important, especially when all you have is a glance as the only opportunity to say something to somebody. Will keep it in mind for the final show.

Written by mosheladanga

May 12, 2008 at 10:11 PM

Posted in Reflections

Of Schisms and Skirmishes

leave a comment »

The seemingly incorrigible combination; Peter Campus, one of the the pioneers of video art, and Douglas Gordon, a leading practitioner of the moving image, had a talk in the Tate Modern a week ago.

https://i2.wp.com/www.fotos.org/galeria/data/551/Peter-Campus-Three-Transitions-1973.jpg https://i0.wp.com/images.artnet.com/artwork_images_414_41697_douglas-gordon.jpg

The talk was mediated by David A. Ross, the curator of the Whitney Museum in New York. It was a tension-filled event, with the auditorium crawling with gallery types, a smattering of artists and art students. The reason for the tension I think is due to several factors; one being the very rare public appearances of Gordon, who hasn’t given interviews in the last five years or so. Also, which I think is the pivotal reason, is the frankness and sincerity of Peter Campus.

It was quite fun actually; Douglas Gordon is such a personality, relentless in his jokes and jabs at all the edified talk about art. Peter Campus however, was easygoing and friendly, and I liken him to a grand old guru, still passionate about art, but more at peace with himself, clearly happy with what he does. But it was Mr. Ross’s questions that ticked off the tension in the auditorium. It was so banal and art-speaky that the two artists looked at each other and raised their eyebrows. Here’s the link (they got it in MP3!):

http://www.tate.org.uk/onlineevents/podcast/mp3/2008_04_17DouglasGordon.mp3

There were several issues raised, one being the difference between the generation of artists who grew up in New York among the heady milieu of the 60’s and the postmodern YBA’s here in the UK. Douglas Gordon dissented when Campus talked about art’s ability to help people transcend the glaze of modern life- Gordon said that art cannot be made to elevate something, but rather art should break with tradition and transform itself into something else. But then Gordon talked about his experience at the Slade, in which he lost the pleasure of watching films because he studied it constantly. He talked about the postmodernist phenomenon, in which he felt surrounded by it, and that was the language that he learned, the art-making practice that he had to work with.

I was thinking about this a lot and looking at Gordon’s work, it explains the vicarious nature of his image-making- I liken it to a fetishism of the moving image, in which the pleasure we derive from cinema is subverted into Gordon’s vision, which I think is a personal one. There is a distinct language he uses, and especially evident with the self-portraits he has done with the blown-up polaroids (image above). There is a frankness and immediacy that I find moving and even heartfelt.

In contrast, Peter Campus’s approach is more calm and (in my opinion), confident. In the short film he did with the pieces of glass (can’t find a jpeg of it, sorry), the mood is also frank, even cold, but in the way he directed the actor and the placement of the camera he manages to eliminate “the frame” (the 4th wall in cinema-speak) and simply reveal the image, his message.

The difference is that Gordon’s work still aims to put the moving image into a pedestal (quite ironically), and Campus’ work subdues the art “frame” with the clarity and subtlety of a master.

On a ‘sociological’ note, it was fun to see and observe how the art world is; there was this curator who had the temerity to ask Gordon if he was being hypocritical by selling his work in galleries but at the same time proclaim he cannot stand it- she even called him “bourgeois” (cue hushed tones and turning heads!). Gordon retorted, saying that he treats his career as a job, as a way to earn money, and that he has a function as an artist. Then he ends it with a jab (cue slight smattering of nervous laughter and sharp intakes of breath…) by telling her that he’ll sell her something cheap. My, my, this was juicy stuff-haha!

But the great thing was that it was clear that both artists are passionate about what they do. Campus kept trying to invite Gordon to teach in the States, and Gordon invited Campus for a series of dinners to continue their talk. Oh, and that was one important point that Campus made: what was lacking today’s very competitive art world was dialogue. He said as artists we should engage in it with fellow artists, away from all the art-speak, all the theory, and foster a camaraderie. He sees it as an antidote to the problem we have today, perhaps not only in the art-world, but to the larger sphere of society as well. Wow (for the lack of a better word), what a great man. A Kurosawa in my book:)