Skip to content

Commit

Permalink
added more visibility to measurment in test
Browse files Browse the repository at this point in the history
  • Loading branch information
cansik committed Feb 1, 2020
1 parent 05301c7 commit 70c25dc
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import ch.bildspur.realsense.RealSenseCamera;
import ch.bildspur.realsense.type.ColorScheme;
import processing.core.PApplet;
import processing.opengl.PJOGL;

Expand Down Expand Up @@ -43,7 +44,7 @@ public void setup() {
camera.enableDepthStream();
camera.enableColorStream();

camera.enableColorizer();
camera.enableColorizer(ColorScheme.Cold);

camera.start();
}
Expand All @@ -62,11 +63,13 @@ public void draw() {
if(mouseX < VIEW_WIDTH && mouseY < VIEW_HEIGHT)
{
// show depth info
fill(0, 255, 0);
text("Depth: " + camera.getDistance(mouseX, mouseY), mouseX, mouseY + 10);
fill(255, 255, 0);
textSize(20);
text("Depth: " + nfp(camera.getDistance(mouseX, mouseY), 0, 2) + "m", mouseX, mouseY + 10);
}

fill(255, 255, 255);
textSize(12);
textAlign(LEFT, CENTER);
text("Depth Stream", 20, VIEW_HEIGHT + 8);
text("Color Stream", VIEW_WIDTH + 20, VIEW_HEIGHT + 8);
Expand Down

0 comments on commit 70c25dc

Please sign in to comment.