Skip to content

Commit 70c25dc

Browse files
committed
added more visibility to measurment in test
1 parent 05301c7 commit 70c25dc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/test/java/ch/bildspur/realsense/test/DepthMeasureTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
import ch.bildspur.realsense.RealSenseCamera;
5+
import ch.bildspur.realsense.type.ColorScheme;
56
import processing.core.PApplet;
67
import processing.opengl.PJOGL;
78

@@ -43,7 +44,7 @@ public void setup() {
4344
camera.enableDepthStream();
4445
camera.enableColorStream();
4546

46-
camera.enableColorizer();
47+
camera.enableColorizer(ColorScheme.Cold);
4748

4849
camera.start();
4950
}
@@ -62,11 +63,13 @@ public void draw() {
6263
if(mouseX < VIEW_WIDTH && mouseY < VIEW_HEIGHT)
6364
{
6465
// show depth info
65-
fill(0, 255, 0);
66-
text("Depth: " + camera.getDistance(mouseX, mouseY), mouseX, mouseY + 10);
66+
fill(255, 255, 0);
67+
textSize(20);
68+
text("Depth: " + nfp(camera.getDistance(mouseX, mouseY), 0, 2) + "m", mouseX, mouseY + 10);
6769
}
6870

6971
fill(255, 255, 255);
72+
textSize(12);
7073
textAlign(LEFT, CENTER);
7174
text("Depth Stream", 20, VIEW_HEIGHT + 8);
7275
text("Color Stream", VIEW_WIDTH + 20, VIEW_HEIGHT + 8);

0 commit comments

Comments
 (0)