Skip to content
Snippets Groups Projects
Commit 18d074a8 authored by Andreu Corominas-Murtra's avatar Andreu Corominas-Murtra
Browse files

Removing old commented code

parent 062059b2
No related branches found
No related tags found
No related merge requests found
......@@ -69,42 +69,6 @@ void LineFinder::fitLineRansac(const Eigen::MatrixXs & _points, LineSegment & _l
}
// void LineFinder::pointProjectionToLine(const Eigen::Vector3s & _line, const Eigen::Vector3s & _in_pt, Eigen::Vector3s & _out_pt) const
// {
// ScalarT a,b,c,qx,qy,dd;
//
// //inits
// a = _line(0);
// b = _line(1);
// c = _line(2);
// qx = _in_pt(0)/_in_pt(2);
// qy = _in_pt(1)/_in_pt(2);
//
// //compute point projection to line. The formula comes from frocing:
// // 1) _out_pt to lie on _lines, and f
// // 2) lines l2 through _in_pt and _out_pt perpendicular to _line -> normal vectors perpendicular
//
// if (a == 0. ) //case a=0 -> vertical line (parallel to y axis)
// {
// _out_pt(0) = _in_pt(0);
// _out_pt(1) = -c/b;
// return;
// }
//
// if ( b == 0. ) //case b=0 -> vertical line (parallel to y axis)
// {
// _out_pt(0) = -c/a;
// _out_pt(1) = _in_pt(1);
// return;
// }
//
// //general case
// dd = -(a*a + b*b); //denominator. Can't be 0 because either a or b have to be non-zero
// _out_pt(1) = (b*c + a*b*qx - a*a*qy) / dd;
// _out_pt(0) = -( c + b*_out_pt(1) ) / a;
//
// }
// unsigned int laserscanutils::LineFinder::mergeLines(std::list<LineSegment> & _line_list)
// {
// //TODO
......
......@@ -63,15 +63,6 @@ class LineFinder
**/
void fitLineRansac(const Eigen::MatrixXs & _points, LineSegment & _line, ScalarT _error = 0.1) const;
/** \brief Computes projection of point to line
*
* Computes the projection of _in_pt to _line. Result at _out_pt
* Everything in homogeneous coordinates
* TODO: To be moved elsewhere. No reason why this methos has to be member of LineFinder
*
**/
//void pointProjectionToLine(const Eigen::Vector3s & _line, const Eigen::Vector3s & _in_pt, Eigen::Vector3s & _out_pt) const;
/** \brief Merges lines of a list
*
* Updates the input list with the merged lines
......
......@@ -159,22 +159,18 @@ unsigned int LineFinderHough::findLines( const Eigen::MatrixXs & _points,
if (ii_max_value < hough_grid_rows_half) //theta in [0,PI/2]
{
q_pt << xmin,ymax,1;
//pointProjectionToLine(line.abc_, q_pt, p_pt);
line.pointProjectionToLine(q_pt, p_pt);
line.point_first_ << p_pt;
q_pt << xmax,ymin,1;
//pointProjectionToLine(line.abc_, q_pt, p_pt);
line.pointProjectionToLine(q_pt, p_pt);
line.point_last_ << p_pt;
}
else //theta in [PI/2,PI]
{
q_pt << xmin,ymin,1;
//pointProjectionToLine(line.abc_, q_pt, p_pt);
line.pointProjectionToLine(q_pt, p_pt);
line.point_first_ << p_pt;
q_pt << xmax,ymax,1;
//pointProjectionToLine(line.abc_, q_pt, p_pt);
line.pointProjectionToLine(q_pt, p_pt);
line.point_last_ << p_pt;
}
......
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