Moved to Team 9.

Fork of LineScan by Nicholas Gan

Revision:
28:3006d46dcec5
Parent:
20:e9f0d1483ba1
Child:
29:c832523d7d96
Child:
33:cc3810ac5365
--- a/LineScan.cpp	Sat Apr 25 02:42:06 2015 +0000
+++ b/LineScan.cpp	Thu May 21 20:27:53 2015 +0000
@@ -1,7 +1,7 @@
 #include "LineScan.h"
 #include <string.h>
 
-#define THRESH 2000
+#define THRESH 1000
 
 #define MEAN_REF 10000      //ideal mean we should see
 #define CAM_CTRL_GAIN 0.0003 //should be small
@@ -133,9 +133,9 @@
     while(*l_walker != -1 && *h_walker != -1){
         //evaluate out and advance if line is white on black and returns center of smallest white band
         //if interval is black on white, advance the pointer for the peak array
-        //width needs to be larger than 4 pixels wide to be a good read.
+        //width needs to be larger than 2 pixels wide to be a good read.
         
-        if(*h_walker > *l_walker && (*h_walker - *l_walker) < out_width && (*h_walker - *l_walker) > 3){
+        if(*h_walker > *l_walker && (*h_walker - *l_walker) < out_width && (*h_walker - *l_walker) > 2){
             out_width = *h_walker - *l_walker;
             out = ((float)(*h_walker + *l_walker)) / (2.0 * (float)frameLen);    //0.5 is center
             l_walker++;