summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <florian.a.jung@web.de>2012-11-29 01:05:10 +0100
committerFlorian Jung <florian.a.jung@web.de>2012-11-29 01:05:10 +0100
commit0138b99160080b967bd2182e38879df6383a5c0c (patch)
treed172c73da119ed6c87957eb26d4889d83bbf854d
parenteee3e9ab4df6dec997b1c7bbe7b838b219725411 (diff)
dinge
-rw-r--r--Makefile3
-rw-r--r--detect_road_borders.cpp5
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2d36df2..58da5bf 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,9 @@ all: detect_road_borders mariokart01
detect_road_borders: detect_road_borders.cpp
g++ `pkg-config --libs --cflags opencv` $< -o $@
+test_detect: detect_road_borders
+ ./detect_road_borders test.mpg
+
mariokart01: mariokart01.cpp
g++ `pkg-config --libs --cflags opencv` -lxcb -lpthread $< -o $@
diff --git a/detect_road_borders.cpp b/detect_road_borders.cpp
index 81f4ca5..69e739e 100644
--- a/detect_road_borders.cpp
+++ b/detect_road_borders.cpp
@@ -1,5 +1,3 @@
-//frame 275: da hängts!!
-
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
@@ -17,7 +15,8 @@ int find_intersection_index(int x0, int y0, int x1, int y1, int** contour_map, b
int dy = -abs(y1-y0), sy = y0<y1 ? 1 : -1;
int err = dx+dy, e2; /* error value e_xy */
- for(;;){ /* loop */
+ for(;;)
+ {
//setPixel(x0,y0);
if (contour_map[x0][y0]>0) return contour_map[x0][y0]; // found intersection?