diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..77d06ba --- /dev/null +++ b/README.txt @@ -0,0 +1,30 @@ +## Controls ## + +Arrow up: tilt angle ++ NOT USED +Arrow down: tilt angle -- NOT USED + +y: decrease minDepth +x: increase minDepth +c: decrease maxDepth +v: increase maxDepth + +s: save boxconfig +l: load boxconfig + +u: toggle left view between depth and image +m: toggle mirror +i: toggle IR +k: toggle colordepth +w: switch box modes + + +e: toogle box edit mode +In edit mode: ++: boxedit id++ +-: boxedit id-- +4: decrease box width +6: increase box width +2: decrease box height +8: increase box height +arrow keys: move box +mouse click in richt view: center box at mouse position diff --git a/kinectv1_wuerfel.pde b/kinectv1_wuerfel.pde index bd3e656..0672aa6 100644 --- a/kinectv1_wuerfel.pde +++ b/kinectv1_wuerfel.pde @@ -40,8 +40,9 @@ PVector boxsize[] = new PVector[boxnum]; //size of box (width,height) boolean boxenabled[] = new boolean[boxnum]; float[] depthLookUp = new float[2048]; -static int FRAMERATE=10; -int fadetime=1000/FRAMERATE /10; //fadetime in centiseconds +static int FRAMERATE=20; +//int fadetime=1000/FRAMERATE /10; //fadetime in centiseconds +int fadetime=1000/FRAMERATE /10 *4; //fadetime in centiseconds SMOOOOTH int editbox=0; //num of box boolean editboxpos=false; //editmode @@ -230,7 +231,8 @@ void draw() { int brightness=0; if (cpmax>0){ - brightness=255; + //brightness=255; + brightness=int(255-(cpmax-cpmean)); } if (mode.equals(Mode.DEPTHCOLOR)){ //depth color box[i]=color(map(cpmax,0,255, 0,255),255,brightness); @@ -290,7 +292,7 @@ void keyPressed() { saveBoxConfig(); } else if (key =='l') { //load boxes loadBoxConfig(); - } else if (key =='u') { //switch left view + } else if (key =='u') { //toggle left view leftview_depth=!leftview_depth; } else if (key =='m') { // mirror enable_mirrorImage=!enable_mirrorImage; @@ -298,7 +300,7 @@ void keyPressed() { } else if (key =='i') { // toggle IR enable_IRImage=!enable_IRImage; kinect.enableIR(enable_IRImage); - } else if (key =='k') { // toggle IR + } else if (key =='k') { // toggle color as depth enable_colordepth=!enable_colordepth; kinect.enableColorDepth(enable_colordepth); } else if (key =='w') { // switch mode