OpenCV
index
 
Name brightness ( )
Examples
import hypermedia.video.*;

OpenCV opencv;

void setup() {

  size( 320, 240 );

  opencv = new OpenCV(this);
  opencv.capture( width, height );
}

void draw() {


  int c = (int) map(mouseX, 0, width, -128, 128);
  int b = (int) map(mouseY, 0, height, -128, 128);

  opencv.read();
  opencv.convert( GRAY );
  opencv.ROI( 10, 10, 300, 220 );
  opencv.brightness( b );
  opencv.contrast( c );

  image( opencv.image(), 0, 0 );
}

//
Description Adjust the image brightness with the specified value (in range of -128 to 128).
Syntax
brightness(value);
Parameters
brightness   int : the new brightness value
Returns None
Usage Application
Related