euglena/lib/opencv_processing/examples/BrightnessContrast/BrightnessContrast.pde

18 lines
299 B
Plaintext
Raw Permalink Normal View History

2016-07-10 00:36:44 -07:00
import gab.opencv.*;
PImage img;
OpenCV opencv;
void setup(){
img = loadImage("test.jpg");
size(img.width, img.height);
opencv = new OpenCV(this, img);
}
void draw(){
opencv.loadImage(img);
opencv.brightness((int)map(mouseX, 0, width, -255, 255));
image(opencv.getOutput(),0,0);
}