Moved to Team 9.
Fork of LineScan by
Diff: LineScan.cpp
- Revision:
- 36:ad1f3321ec84
- Parent:
- 35:ac9f45bd5352
diff -r ac9f45bd5352 -r ad1f3321ec84 LineScan.cpp --- a/LineScan.cpp Mon Nov 16 21:53:01 2015 +0000 +++ b/LineScan.cpp Mon Nov 16 22:32:50 2015 +0000 @@ -1,10 +1,10 @@ #include "LineScan.h" #include <string.h> -#define THRESH 2000 +#define THRESH 1500 -#define MEAN_REF 20000 //ideal mean we should see -#define CAM_CTRL_GAIN 0.0003 //should be small +#define MEAN_REF 30000 //ideal mean we should see +#define CAM_CTRL_GAIN 0.0001 //should be small #define NEUTRAL 0 #define FIND_PEAK 1 @@ -140,7 +140,7 @@ //if interval is black on white, advance the pointer for the peak array //width needs to be larger than 2 pixels wide to be a good read. - if(*h_walker > *l_walker && (*h_walker - *l_walker) < 10 && (*h_walker - *l_walker) > 2){ + if(*h_walker > *l_walker && (*h_walker - *l_walker) < 10 && (*h_walker - *l_walker) > 3){ out = ((float)(*h_walker + *l_walker)) / (2.0 * (float)frameLen); //0.5 is center *numLines++; h_walker++; @@ -157,7 +157,7 @@ //if interval is black on white, advance the pointer for the peak array //width needs to be larger than 2 pixels wide to be a good read. - if(*h_walker > *l_walker && (*h_walker - *l_walker) < 15 && (*h_walker - *l_walker) > 2){ + if(*h_walker > *l_walker && (*h_walker - *l_walker) < 10 && (*h_walker - *l_walker) > 3){ out = ((float)(*h_walker + *l_walker)) / (2.0 * (float)frameLen); //0.5 is center *numLines++; l_walker--;