Kinect and processing 3 thesis project

Hi! Im attempting to produce a fairly simple art piece for my senior thesis as a visual artist. What I basically want to do is project a video onto the wall, and use the Kinect as a proximity sensor (its all I have available atm), I want the audience’s proximity to alter the speed, and possibly colors of the video. The Kinect I have is V1 1414, and I got it to work on processing well, as well as edit the minimum and maximum threshold.

I was also able to play the video from the laptop, and be able to alter the speed (didn’t get to color yet). but am finding difficulties in connecting the two elements, as in if the Kinect sees the offset depth within the threshold the program would speed up the video, and if there are no objects then the video speed to continue normally.
what is happening now is that the video plays at normal speed when I am closer than the given threshold, otherwise it doesn’t even play
I am a beginner in processing, in fact the only experience in coding I have was with C++ and in middle school (safe to say I don’t remember much)
If anyone can help I would be eternally grateful,
I apologize for the messy code, as I mentioned I have no experience with this and am trying to learn on the job…

(for some reason the < / > function is not working, so here is my code)


import org.openkinect.processing.*;

Movie movie;
Kinect kinect;

float minThresh = 480;
float maxThresh = 830;

PImage img;

void setup() {
size(720, 480);
movie = new Movie(this, “vid.MP4”);

kinect = new Kinect(this);

void draw() {
if (movie.available()) {;

int[] depth = kinect.getRawDepth();

for (int x = 0; x < kinect.width; x++) {
for (int y = 0; y < kinect.height; y++) {
int offset = x + y * kinect.width;
int d = depth[offset];

if (d > minThresh && d < maxThresh) {
} else {
image(movie, 0, 0);

You need to fix the code. You can add three back ticks ``` before and after your code above (you can edit the post, just click on the pencil icon). You should also check previous posts
posted in the Processing Foundation’s forum.

Also, if you cross-post your question, it is better to provide links so to avoid duplicate efforts: