import moviemaker.*;import JMyron.*;JMyron m;//a camera objectMovieMaker mm;float theta = 0;void setup() { size(320,240); m = new JMyron();//make a new instance of the object m.start(width,height);//start a capture at 320x240 m.findGlobs(0);//disable the intelligence to speed up frame rate println("Myron " + m.version()); rectMode(CENTER); noStroke(); mm = new MovieMaker(this,width,height,"p5test.mov", MovieMaker.VIDEO, MovieMaker.BEST,30);}void draw(){ background(127); //background(sin(theta)*127+127,255,cos(theta)*127+127); theta += 0.05; loadPixels(); //mm.addFrame(pixels,width,height); m.update();//update the camera view int[] img = m.image(); //get the normal image of the camera@@ mm.addFrame(img,width,height); //fonction qui enregistre la vidéo //aprés c la boucle qui appliqe l'effet sur la cam et c dans ce bordel //que je capte rien float r,g,b; for(int y=0;y<height;y+=8){ //loop through all the pixels for(int x=0;x<width;x+=8){ //loop through all the pixels float av = (red(img[y*width+x])+green(img[y*width+x])+blue(img[y*width+x]))/3.0; fill(red(img[y*width+x]),green(img[y*width+x]),blue(img[y*width+x])); fill(255); //mm.addFrame(img,width,height); pushMatrix(); translate(x,y); rotate(av/32.0); rect(0,0,av/16.0,av/16.0); popMatrix(); } }}public void mousePressed() { mm.finishMovie();}//public void stop(){// m.stop();//stop the object// super.stop();//}