Skip to content

Commit

Permalink
range image projection minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TixiaoShan authored Dec 3, 2018
1 parent 5555f93 commit 1d09538
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions LeGO-LOAM/src/imageProjection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,9 @@ class ImageProjection{

horizonAngle = atan2(thisPoint.x, thisPoint.y) * 180 / M_PI;

if (horizonAngle <= -90)
columnIdn = -int(horizonAngle / ang_res_x) - int(Horizon_SCAN/4);
else if (horizonAngle >= 0)
columnIdn = -int(horizonAngle / ang_res_x) + int(Horizon_SCAN/4*3);
else
columnIdn = int(Horizon_SCAN/4*3) - int(horizonAngle / ang_res_x);
columnIdn = -round((horizonAngle-90.0)/ang_res_x) + Horizon_SCAN/2;
if (columnIdn >= Horizon_SCAN)
columnIdn -= Horizon_SCAN;

if (columnIdn < 0 || columnIdn >= Horizon_SCAN)
continue;
Expand Down

0 comments on commit 1d09538

Please sign in to comment.