diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | detect_road_borders.cpp | 5 |
2 files changed, 5 insertions, 3 deletions
@@ -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? |