Skip to content

Instantly share code, notes, and snippets.

@TheVisualG
Created February 5, 2018 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheVisualG/f2887c7cff2cc4ab7369bd55112496a7 to your computer and use it in GitHub Desktop.
Save TheVisualG/f2887c7cff2cc4ab7369bd55112496a7 to your computer and use it in GitHub Desktop.
import gab.opencv.*;
OpenCV opencv;
void setup() {
PImage src = loadImage("test2.JPG");
src.resize(800, 0);
size(800, 533);
opencv = new OpenCV(this, src);
}
void draw() {
image(opencv.getOutput(), 0, 0);
PVector loc = opencv.max();
stroke(255, 0, 0);
strokeWeight(4);
noFill();
ellipse(loc.x, loc.y, 30, 30);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment