Skip to content

Commit

Permalink
Final Worked code
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-99 committed Jun 19, 2018
1 parent f5cb4bf commit 8e58088
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 289 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,17 @@ cuda_add_library(gSLICr_lib
target_link_libraries(gSLICr_lib ${CUDA_LIBRARY})

add_executable(lanes src/lanes_way.cpp)
<<<<<<< f5cb4bf155597ceab254227a1ef8c474b31c7587
=======

>>>>>>> Final Worked code

target_link_libraries(lanes
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
gSLICr_lib
)
<<<<<<< f5cb4bf155597ceab254227a1ef8c474b31c7587

=======
>>>>>>> Final Worked code
15 changes: 11 additions & 4 deletions include/lane_detector/lanes_way.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,18 @@
#define SHOW 0
#define W 400
#define SUBSTRACTION_CONSTANT 30
#define INTENSITY_TH 160
#define INTENSITY_TH 140
#define PI 3.14159265

<<<<<<< f5cb4bf155597ceab254227a1ef8c474b31c7587
#define TH_REM_GRASS 190
#define TH_DOT 170 //130
#define TH_SMALL_SUPERPIXEL 20
=======
#define TH_REM_GRASS 140
#define TH_DOT 150 //130
#define TH_SMALL_SUPERPIXEL 10
>>>>>>> Final Worked code
#define TH_MIN_WHITE_REGION 0.5
#define NUM_ITER 1000
#define PPM 150
Expand All @@ -49,7 +55,11 @@
#define JUMP_OF_WAYPOINT 15
#define extrapolation_factor 5
#define frames_to_skip_when_obstacle_detected 4
<<<<<<< f5cb4bf155597ceab254227a1ef8c474b31c7587
#define degree_for_horizontal 30
=======
#define degree_for_horizontal 40
>>>>>>> Final Worked code

#define THRESHOLD_FOR_ANY_LANE 70
#define LANE_THRESHOLD 70
Expand Down Expand Up @@ -84,7 +94,6 @@ vector<int> obstacle_coords (Mat img, vector<double> old_way);
vector<double> gen_new_way(Mat top_view_rgb,double a_gl,double lam_gl,double lam2_gl,double w_gl, vector<double>);
bool waypoint_on_obstacle(Mat img, vector<double>);
bool is_lane_horizontal (Mat img, float a, float lam1);
Mat checkPothole(Mat);
MatrixXd homo(3,3);
sensor_msgs::LaserScan imageConvert(cv::Mat image);

Expand Down Expand Up @@ -136,8 +145,6 @@ class Lanes
int frameHeight;
quadratic left_fy,right_gy;
quadratic array_l[5],array_r[5];
double width_lanes;
int flag_width;
double gamma_,v,sigma;
double THRESH;

Expand Down
5 changes: 3 additions & 2 deletions src/lanes_chalne_wala.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,8 @@ void Lanes::parabola()
// cvtColor(top_view_rgb, top_view, CV_BGR2GRAY);
Mat temp(top_view.rows, top_view.cols, CV_8UC3, Scalar(0,0,0));
Mat mario(top_view.rows, top_view.cols, CV_8UC1, Scalar(0));
imshow("temp", temp);
waitKey(5);

for(int i = 0; i < top_view.rows; i++)
for(int j = 0; j < top_view.cols; j++)
Expand All @@ -568,8 +570,7 @@ void Lanes::parabola()
Point(1,1 ));
dilate(temp, temp, element);

imshow("temp", temp);
waitKey(5);

int w = temp.rows, h = temp.cols;
int nr_superpixels = 600;
int nc = 100;
Expand Down
Loading

0 comments on commit 8e58088

Please sign in to comment.