multiple video with OpenCV library
in
Contributed Library Questions
•
2 years ago
Hi everybody,
First, sorry for non perfect english...
I'm working on an interactive installation using TUIO for manipulate video with reactivision tags, i use OpenCV lib for playing video, but i don't understand why i can't play differents videos. I read this little test for explain my problem :
import hypermedia.video.*;
OpenCV opencv1;
OpenCV opencv2;
OpenCV opencv3;
int x = 160;
int y = 90;
void setup() {
size( 320, 200 );
frameRate(25);
background(10); // fond noir
opencv1 = new OpenCV(this);
opencv1.movie("T01.mov", x, y);
opencv2 = new OpenCV(this);
opencv2.movie("T02.mov", x, y);
opencv3 = new OpenCV(this);
opencv3.movie("T03.mov", x, y);
}
void draw() {
}
void keyPressed() {
if ( key == 'a' ) // laisser la touche pressée
opencv1.read();
image( opencv1.image(), width/4, height/4);
if ( key == 'z' ) // laisser la touche pressée
opencv2.read();
image( opencv2.image(), width/4, height/4);
if ( key == 'e' ) // laisser la touche pressée
opencv3.read();
image( opencv3.image(), width/4, height/4);
}
pracessing play the third video if we press on "a", "z" or "e", how can we play different vids?
First, sorry for non perfect english...
I'm working on an interactive installation using TUIO for manipulate video with reactivision tags, i use OpenCV lib for playing video, but i don't understand why i can't play differents videos. I read this little test for explain my problem :
import hypermedia.video.*;
OpenCV opencv1;
OpenCV opencv2;
OpenCV opencv3;
int x = 160;
int y = 90;
void setup() {
size( 320, 200 );
frameRate(25);
background(10); // fond noir
opencv1 = new OpenCV(this);
opencv1.movie("T01.mov", x, y);
opencv2 = new OpenCV(this);
opencv2.movie("T02.mov", x, y);
opencv3 = new OpenCV(this);
opencv3.movie("T03.mov", x, y);
}
void draw() {
}
void keyPressed() {
if ( key == 'a' ) // laisser la touche pressée
opencv1.read();
image( opencv1.image(), width/4, height/4);
if ( key == 'z' ) // laisser la touche pressée
opencv2.read();
image( opencv2.image(), width/4, height/4);
if ( key == 'e' ) // laisser la touche pressée
opencv3.read();
image( opencv3.image(), width/4, height/4);
}
pracessing play the third video if we press on "a", "z" or "e", how can we play different vids?
1