Skip to content
Snippets Groups Projects
Commit 4db8bd9c authored by acoromin's avatar acoromin
Browse files

Working version. Filling start and end points to Hough lines. Not yet tested.

parent 65005a8e
No related branches found
No related tags found
No related merge requests found
...@@ -211,11 +211,12 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX ...@@ -211,11 +211,12 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX
double theta, range; double theta, range;
int kr; int kr;
Line line; Line line;
double xmax, xmin, ymax, ymin;
//A 2D array of lists. Each cell is a (r,theta) discretization in the line parameter space. //A 2D array of lists. Each cell is a (r,theta) discretization in the line parameter space.
//Each list keeps the laser point coordinates that support that cell //Each list keeps the laser point coordinates that support that cell
std::vector<std::vector<std::list<std::pair<double,double> > > > hough_grid; std::vector<std::vector<std::list<std::pair<double,double> > > > hough_grid;
std::list<std::pair<double,double>::iterator pt_it; //iterator over the points of a given cell list std::list<std::pair<double,double> >::iterator pt_it; //iterator over the points of a given cell list
//clear line list //clear line list
_line_list.clear(); _line_list.clear();
...@@ -279,8 +280,8 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX ...@@ -279,8 +280,8 @@ unsigned int laserscanutils::extractLinesHough( const std::vector<Eigen::MatrixX
//set the limiting points of the line //set the limiting points of the line
if (ii < hough_grid_rows_half) //first and third quartile if (ii < hough_grid_rows_half) //first and third quartile
{ {
line.point_first_ << ,,1; // line.point_first_ << ,,1;
line.point_last_ << ,,1; // line.point_last_ << ,,1;
} }
else //second and fourth quartile else //second and fourth quartile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment