Laser Sensing Display for UI interfaces in the real world

Dependencies:   mbed

Fork of skinGames_forktest by Alvaro Cassinelli

Revision:
9:3321170d157c
Parent:
7:0df17f3078bc
Child:
10:6f8e48dca1bd
--- a/classLaserSensingTrajectory.h	Tue Apr 10 10:45:16 2012 +0000
+++ b/classLaserSensingTrajectory.h	Wed Apr 11 13:06:23 2012 +0000
@@ -5,16 +5,16 @@
 using namespace std;
 
 // CONTRAST RATIO to compute autoThreshold:
-#define MIN_CONTRAST_RATIO 1.3//2.4
-#define THRESHOLD_FACTOR 0.5//0.75 // 2/3 or 1/2 are good values
+#define MIN_CONTRAST_RATIO 1.3//2.4 // This is the minimum contrast between max and min intensity necessary to "accept" a black and white zone
+#define THRESHOLD_FACTOR 0.5//0.75 // 2/3 or 1/2 are good values 
 
 struct laserSensingPoint {
     // Position and color (after rendering)
-    int x, y; // position of the point (after rendering - its integer, because it is in "laser projector pixels")
+   unsigned short x, y; // position of the point (after rendering - its integer, because it is in "laser projector pixels")
 //    char color; // laser color of the point (we will use the first three bits to set the RGB colors)
     // Detection:
     float intensity; // detected intensity
-    int lightZone; // the thresholded light zone
+    char lightZone; // the thresholded light zone (allow for negative values for simply computing "negative" forces - although this is not necessarily the best option)
 };