I have this code (which is probably not very well writtern, but works). The code is changing the appearance of an image based on a Light Dependant Resistor that has Serial Data coming through from Arduino. The potentiometer is just changing the effect.
I want it so when the LDR value (ldreffect) is less than 10, it moves onto the next image, but continues to decrement the blur that you can see in the if () {} statement below.
The problem that I am having is that when I want to increment the photo integer by 1, it keeps looping. I still want the blur to loop though.
Any suggestions??
boolean sketchFullScreen() {
return true;
}
import processing.serial.*;
Serial myPort;
String sensorReading="";
PImage img;
int blur = 40;
int poster = 40;
int effect = 0;
int photo = 0;
void setup() {
myPort = new Serial(this, "/dev/tty.usbmodem1411", 9600);
myPort.bufferUntil('\n');
size(1024, 768);
img = loadImage("image1.jpg"); // Load the original image
I have the code below that reads out the X and Y location of the dot. I am a complete newbie to Processing and Kinect. How can I read out the Z (depth) location co-ordinate?
Help will be much appreciated!
AveragePointTracking.pde:
// Daniel Shiffman
// Tracking the average location beyond a given depth threshold