Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ComExample02_Flow/ComExample02_Flow.pde
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import processing.opengl.*; // opengl
import SimpleOpenNI.*; // kinect
import blobDetection.*; // blobs
//importing java utility used in PolygonBlob
import java.util.Collections.*;

// this is a regular java import so we can use and extend the polygon class (see PolygonBlob)
import java.awt.Polygon;
Expand Down Expand Up @@ -43,15 +45,15 @@ void setup() {
size(1280, 720, OPENGL);
// initialize SimpleOpenNI object
context = new SimpleOpenNI(this);
// mirror the image to be more intuitive
context.setMirror(true);
if (!context.enableDepth() || !context.enableUser()) {
// if context.enableScene() returns false
// then the Kinect is not working correctly
// make sure the green light is blinking
println("Kinect not connected!");
exit();
} else {
// mirror the image to be more intuitive
context.setMirror(true);
// calculate the reScale value
// currently it's rescaled to fill the complete width (cuts of top-bottom)
// it's also possible to fill the complete height (leaves empty sides)
Expand All @@ -60,7 +62,7 @@ void setup() {
blobs = createImage(kinectWidth/3, kinectHeight/3, RGB);
// initialize blob detection object to the blob image dimensions
theBlobDetection = new BlobDetection(blobs.width, blobs.height);
theBlobDetection.setThreshold(0.2);
theBlobDetection.setThreshold(0.7);
setupFlowfield();
}
}
Expand Down
4 changes: 1 addition & 3 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ http://forum.processing.org/two/discussion/2625/can-kinect-physics-code-examples

All are examples are based upon Amnon's zip at the root of the forum thread. Respect!

They all build & run but 02 doesn't seem to run correctly.
They all build & run.
The 03 source was copied from Modqhx post in the forum thread so credit to him for getting it running!

This repo will hopefuly save someone else some time if they're tryin to follow the article. Please fork at will.