Calibrate works?
This commit is contained in:
parent
26e34f7671
commit
cc711c6343
1104 changed files with 636510 additions and 75 deletions
|
|
@ -0,0 +1,36 @@
|
|||
import gab.opencv.*;
|
||||
|
||||
PImage src;
|
||||
OpenCV opencv;
|
||||
|
||||
int roiWidth = 150;
|
||||
int roiHeight = 150;
|
||||
|
||||
boolean useROI = true;
|
||||
|
||||
void setup() {
|
||||
src = loadImage("test.jpg");
|
||||
opencv = new OpenCV(this, src);
|
||||
size(opencv.width, opencv.height);
|
||||
}
|
||||
|
||||
void draw() {
|
||||
opencv.loadImage(src);
|
||||
|
||||
if (useROI) {
|
||||
opencv.setROI(mouseX, mouseY, roiWidth, roiHeight);
|
||||
}
|
||||
|
||||
opencv.findCannyEdges(20,75);
|
||||
image(opencv.getOutput(), 0, 0);
|
||||
}
|
||||
|
||||
// toggle ROI on and off
|
||||
void keyPressed() {
|
||||
useROI = !useROI;
|
||||
|
||||
if (!useROI) {
|
||||
opencv.releaseROI();
|
||||
}
|
||||
}
|
||||
|
||||
BIN
lib/opencv_processing/examples/RegionOfInterest/test.jpg
Normal file
BIN
lib/opencv_processing/examples/RegionOfInterest/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