Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import processing.video.*;
- Capture athena;
- int nbPix;
- void setup() {
- size(640, 480);
- athena = new Capture(this, 320, 240);
- nbPix = athena.width * athena.height;
- athena.start();
- frameRate(10);
- }
- void draw() {
- if (athena.available() == true) {
- athena.read();
- }
- println(frameCount);
- for (int i = 0; i < nbPix; i++) {
- color youplala = athena.pixels[i];
- athena.pixels[i] = color(255, saturation(youplala), blue(youplala));
- }
- image(athena, 0, 0, width, height);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement