Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

LightPainting

$
0
0
Hello all,

I tried to code a LightPainting sketch for educational use. I don't need a superb result but something basic and, if possible, fun.

My current code display some "splash" during the record. It's very ugly but I don't know how to reduce this.

Here is a example of what I called "splash" :



And here is the code :

  1. cam.loadPixels();
  2. screen.loadPixels();
  3. for (int i = 0; i < cam.pixels.length; i++) {
  4.       if ((brightness(cam.pixels[i]) > brightLimit) && (brightness(cam.pixels[i]) > brightness(screen.pixels[i]))) {
  5.             screen.pixels[i] = cam.pixels[i];
  6.       }
  7. }

Entire code is on GitHub if you want to help a newbie.

Thanks for your help.


Viewing all articles
Browse latest Browse all 1768

Trending Articles