Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
woonteddy
woonteddy's Profile
1
Posts
4
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
urgent help needed to code (error :quicktime.QTSession.InitializeQTML(I)S)
[8 Replies]
23-Jan-2012 07:31 AM
Forum:
Core Library Questions
hi,
i found this set of code from
http://andybest.net/2008/11/3d-webcam-lines-additive-blending/
but I tried the fix and still have some error :quicktime.QTSession.InitializeQTML(I)S
im using processing 1.5.1
quicktime 7
the code as below :
void setup() {
try {
quicktime.QTSession.open();
} catch (quicktime.QTException qte) {
qte.printStackTrace();
}
size(1024, 768, OPENGL);
pgl = (PGraphicsOpenGL) g;
gl = pgl.gl;
frameRate(30);
video = new Capture(this, width, height, 30);
}
void draw() {
noFill();
lights();
strokeWeight(4);
background(0);
if (video.available()) {
video.read();
video.loadPixels();
background(0);
pgl.beginGL();
gl.glDisable(GL.GL_DEPTH_TEST);
gl.glEnable(GL.GL_BLEND);
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
pushMatrix();
translate(width, height, 0);
rotateY(radians(mouseX-(width)));
rotateX(radians(-(mouseY-(height))));
translate(-width, -height, 0);
int index = 0;
for (int y = 0; y < video.height; y+=5) {
beginShape();
for (int x = 0; x < video.width; x++) {
int pixelValue = video.pixels[x+(y*video.width)];
stroke(red(pixelValue), green(pixelValue), blue(pixelValue), 255);
vertex (x*2, y*2, (brightness(pixelValue)*2)-100);
index++;
}
endShape();
}
pgl.endGL();
popMatrix();
}
}
p/s: thank you for helping me out
«Prev
Next »
Moderate user : woonteddy
Forum