I've just installed this library
intgralhistogram from the processing.org libraries page and I can't for the life of me to get it to load the library.
I have it in my libraries folder just like all my other libraries that work. Has anyone done anything interesting with this library recently or in the past?
I'd like to recognize predefined images from a video feed and create an application that responds based on those specific objects.
inspired to experiment this weekend after learning from the great Golan at the #eyeo festival this weekend. So this code is hacked from his. Recommendations to clean it up welcome.
Basically, I just want to trigger an event only when something enters a rectangle it formerly wasn't in.
In context, I have a simple camera game where the whitest smile (within a boundary) is rewarded with a shiny star...and points. I only want to print an image when the star enters the rectangle either by being stolen from the other box (player) or anywhere else. Not when the star was already in that rectangle.
Help!
--
/**
* Brightness Tracking
* by Golan Levin.
*
* Tracks the brightest pixel in a live video signal.
*/
import processing.video.*;
Capture video;
float speed = 2.5;
float starSize = 100;
int player1 = 0;
int player2 = 0;
PShape star;
PFont fontA;
int hPadding = 60;
int vPadding = 60;
int hWidth = 200;
int hHeight = 300;
void setup() {
size(640, 480); // Change size to 320 x 240 if too slow at 640 x 480
// Uses the default video input, see the reference if this causes an error
video = new Capture(this, width, height, 30);
star = loadShape("star.svg");
stroke(255);
fill(255, 25);
smooth();
fontA = loadFont("BingoStar-48.vlw");
textAlign(LEFT);
textFont(fontA, 50);
}
void draw() {
if (video.available()) {
video.read();
image(video, 0, 0, width, height); // Draw the webcam video onto the screen