summaryrefslogtreecommitdiff
path: root/detect_road_borders.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2016-02-03 01:40:08 +0100
committerFlorian Jung <flo@windfisch.org>2016-02-03 01:40:08 +0100
commite4350d0413dc26786072face6fd2e0a345eb6309 (patch)
tree996b42c2d2ea58a086f422f3e10e5f62436da360 /detect_road_borders.cpp
parent307b290590a170d0b8c88618598486e705492222 (diff)
stuff? dunnoHEADmaster
Diffstat (limited to 'detect_road_borders.cpp')
-rw-r--r--detect_road_borders.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/detect_road_borders.cpp b/detect_road_borders.cpp
index d3ab3f7..7e4868d 100644
--- a/detect_road_borders.cpp
+++ b/detect_road_borders.cpp
@@ -23,6 +23,7 @@
#include <iostream>
#include <math.h>
#include <opencv2/opencv.hpp>
+#include <assert.h>
using namespace std;
using namespace cv;
@@ -580,7 +581,7 @@ int find_steering_point(Mat orig_img, Point origin_point, int** contour_map, Mat
vector<vector<Point> > contours;
vector<Vec4i> hierarchy;
- findContours(img, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_NONE, Point(0, 0));
+ findContours(img, contours, hierarchy, RETR_TREE, CHAIN_APPROX_NONE, Point(0, 0));
int low_y, low_idx, high_y, first_nonbottom_idx;
vector<Point>& contour = prepare_and_get_contour(img.cols, img.rows, contours, hierarchy,
@@ -660,7 +661,7 @@ int main(int argc, char* argv[])
continue;
}
- cvtColor(frame, tmp, CV_RGB2GRAY);
+ cvtColor(frame, tmp, COLOR_RGB2GRAY);
threshold(tmp, thres, 132, 255, THRESH_BINARY);
dilate(thres,tmp,Mat());
erode(tmp,thres,Mat());