hku-mars / loam_livox

A robust LiDAR Odometry and Mapping (LOAM) package for Livox-LiDAR
GNU General Public License v2.0
1.48k stars 439 forks source link

Ask about e_label_corner selection #123

Open LilyGinger opened 1 year ago

LilyGinger commented 1 year ago

Thanks for your great work. I'm wondering about the selection of corner point. In stead of directly using the curvature value for judgement, there are other conditions for setting a corner points. I'm confused about the other conditions and I would be grateful if someone can explain why these conditions are needed (condition 1 and condition 2 below). Thanks for your time!

  if ( m_pts_info_vec[ idx ].curvature > thr_corner_curvature ) // large curvature point
  {
      if ( m_pts_info_vec[ idx ].depth_sq2 <= m_pts_info_vec[ idx - curvature_ssd_size ].depth_sq2 &&
           m_pts_info_vec[ idx ].depth_sq2 <= m_pts_info_vec[ idx + curvature_ssd_size ].depth_sq2 )   // condition 1
      // current point (middle point) depth smaller than the point's depth in the two sides 
      {
          if ( abs( m_pts_info_vec[ idx ].depth_sq2 - m_pts_info_vec[ idx - curvature_ssd_size ].depth_sq2 ) < sq2_diff * m_pts_info_vec[ idx ].depth_sq2 ||
               abs( m_pts_info_vec[ idx ].depth_sq2 - m_pts_info_vec[ idx + curvature_ssd_size ].depth_sq2 ) < sq2_diff * m_pts_info_vec[ idx ].depth_sq2 )    // condition 2
              m_pts_info_vec[ idx ].pt_label |= e_label_corner;   // set current point as corner point
      }
  }