Calibrate works?
This commit is contained in:
parent
26e34f7671
commit
cc711c6343
1104 changed files with 636510 additions and 75 deletions
|
|
@ -0,0 +1,47 @@
|
|||
import gab.opencv.*;
|
||||
|
||||
OpenCV opencv;
|
||||
Histogram grayHist, rHist, gHist, bHist;
|
||||
|
||||
PImage img;
|
||||
|
||||
void setup() {
|
||||
size(640, 400);
|
||||
img = loadImage("test.jpg");
|
||||
opencv = new OpenCV(this, img);
|
||||
|
||||
grayHist = opencv.findHistogram(opencv.getGray(), 256);
|
||||
rHist = opencv.findHistogram(opencv.getR(), 256);
|
||||
gHist = opencv.findHistogram(opencv.getG(), 256);
|
||||
bHist = opencv.findHistogram(opencv.getB(), 256);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
background(0);
|
||||
image(img, 10, 0, 300, 200);
|
||||
|
||||
stroke(125); noFill();
|
||||
rect(320, 10, 310, 180);
|
||||
|
||||
fill(125); noStroke();
|
||||
grayHist.draw(320, 10, 310, 180);
|
||||
|
||||
stroke(255, 0, 0); noFill();
|
||||
rect(10, height - 190, 200, 180);
|
||||
|
||||
fill(255, 0, 0); noStroke();
|
||||
rHist.draw(10, height - 190, 200, 180);
|
||||
|
||||
stroke(0, 255, 0); noFill();
|
||||
rect(220, height - 190, 200, 180);
|
||||
|
||||
fill(0, 255, 0); noStroke();
|
||||
gHist.draw(220, height - 190, 200, 180);
|
||||
|
||||
stroke(0, 0, 255); noFill();
|
||||
rect(430, height - 190, 200, 180);
|
||||
|
||||
fill(0, 0, 255); noStroke();
|
||||
bHist.draw(430, height - 190, 200, 180);
|
||||
}
|
||||
|
||||
BIN
lib/opencv_processing/examples/FindHistogram/test.jpg
Normal file
BIN
lib/opencv_processing/examples/FindHistogram/test.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Loading…
Add table
Add a link
Reference in a new issue