]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
camera: Tune recognition parameters.
authorMichal Vokac <vokac.m@gmail.com>
Fri, 30 Dec 2011 14:40:52 +0000 (15:40 +0100)
committerMichal Vokac <vokac.m@gmail.com>
Fri, 30 Dec 2011 14:40:52 +0000 (15:40 +0100)
src/camera/barcam/barcam.h

index 9a196dcff73ad81bf491fd909ae8b83fa5297a7c..f7680a9c77858a2ee43a6b90513d17bfebec21ed 100644 (file)
@@ -21,9 +21,9 @@
 
 //TODO tune size of region of interest (crop camera view)
 #define ROI_X      0
-#define ROI_Y      280
+#define ROI_Y      0
 #define ROI_WIDTH      WINDOW_WIDTH
-#define ROI_HEIGHT     200
+#define ROI_HEIGHT     WINDOW_HEIGHT
 
 // values of keys
 #define KEY_ESC           0x1B
@@ -65,9 +65,9 @@
 //Barcode detection criteria:
 #define LINES_BY_DISTANCE 5
 #define COLOUR_DIFF 20
-#define VERTICAL_LINES 7
-#define TRANSITIONS 20
-#define MAX_GAP 3
+#define VERTICAL_LINES 4
+#define TRANSITIONS 10
+#define MAX_GAP 15
 #define CONTAINS_WHITE 200
 #define CONTAINS_BLACK 100
 #define AVERAGE_COLOUR_MAX 200 //average colour of a barcode is cca 95