We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm having trouble controlling the .mov file's tint with rawdepth from kinect
import org.openkinect.processing.*;
import processing.video.*;
Movie video;
Kinect2 kinect2;
int minDepth=0;
int maxDepth=4500; //4.5m
void setup() {
size(1920,1080);
video = new Movie(this, "final-02.mov");
video.loop();
kinect2 = new Kinect2(this);
kinect2.initDepth();
kinect2.initDevice();
}
void movieEvent(Movie video){
video.read();
}
void draw() {
image(video, 0, 0);
video.loadPixels();
int[] depth = kinect2.getRawDepth();
for (int x = 0; x < kinect2.depthWidth; x++){
for (int y = 0; y < kinect2.depthHeight; y++){
int offset = x + y * kinect2.depthWidth;
int d = depth[offset];
if (d > 10 && d < 400){
//video.pixels[offset] = color(255, 100, 15);
tint(10,255);
} else {
//video.pixels[offset] = color(150, 250, 180);
tint(250,10);
}
}
println(x);
}
video.updatePixels();
image(video,0,0);
}
Answers
Can you explain what exactly you want to happen, and what isn't working?
For example are you these the tint settings you want?
...dark and opaque, vs. bright but almost entirely transparent?