Class JumpDistanceSegmentation
- Defined in File jump_distance.hpp 
Inheritance Relationships
Base Type
- public laser_segmentation::Segmentation(Class Segmentation)
Derived Type
- public laser_segmentation::JumpDistanceSegmentationMerge(Class JumpDistanceSegmentationMerge)
Class Documentation
- 
class JumpDistanceSegmentation : public laser_segmentation::Segmentation
- Classic jump distance segmentation algorithm. - Subclassed by laser_segmentation::JumpDistanceSegmentationMerge - Public Functions - 
JumpDistanceSegmentation() = default
- Construct a new Jump Distance Segmentation object. 
 - 
~JumpDistanceSegmentation() override = default
- Destroy the Jump Distance Segmentation object. 
 - 
virtual void initialize_segmentation(double distance, double angle_resolution, double noise_reduction, std::string method = "") override
- Initialize the segmentation algorithm. - Parameters:
- distance – The maximum distance between two consecutive points to be considered part of the same segment. 
- angle_resolution – The minimum angle between two consecutive points. 
- noise_reduction – Parameter for noise reduction (if applicable). 
- method – The method to be used for segmentation. 
 
 
 - 
virtual void perform_segmentation(const std::vector<slg::Point2D> points, std::vector<slg::Segment2D> &segments) override
- Perform the segmentation of the given list of points into a list of segments using Jump Distance Clustering. - Parameters:
- points – The list of points to be segmented. 
- segments – The resulting list of segments. 
 
 
 - Protected Functions - 
bool is_jump_between(const slg::Point2D point1, const slg::Point2D point2)
- Checks if two adjacent points are close to each other. - Parameters:
- point1 – First point 
- point2 – Second point 
 
- Returns:
- true If the points are close to each other 
- Returns:
- false If the points are not close to each other 
 
 - 
bool is_jump_between(const slg::Segment2D segment1, const slg::Segment2D segment2)
- Checks if two adjacent segments are close to each other. The order is important. - Parameters:
- segment1 – First segment 
- segment2 – Second segment 
 
- Returns:
- true If the segments are close to each other 
- Returns:
- false If the segments are not close to each other 
 
 - 
double calculate_lee_threshold(const slg::Point2D point1, const slg::Point2D point2)
- Calculate jump distance using Lee method (Lee, 2001). - Parameters:
- point1 – First point 
- point2 – Second point 
 
- Returns:
- double The jump distance 
 
 - 
double calculate_diet_threshold(const slg::Point2D point1, const slg::Point2D point2)
- Calculate jump distance using Dietmayer method (Dietmayer, et al., 2001). - Parameters:
- point1 – First point 
- point2 – Second point 
 
- Returns:
- double The jump distance 
 
 - 
double calculate_santos_threshold(const slg::Point2D point1, const slg::Point2D point2)
- Calculate jump distance using Santos method (Santos, et al., 2003). - Parameters:
- point1 – First point 
- point2 – Second point 
 
- Returns:
- double The jump distance 
 
 - Protected Attributes - 
double jump_distance_
- The jump distance above which a new segment is created. 
 - 
double angle_resolution_
- The angle resolution of the lidar. 
 - 
double noise_reduction_
- Parameter for noise reduction. 
 - 
std::string threshold_method_
- Method to calculate a dynamic jump distance threshold. 
 
- 
JumpDistanceSegmentation() = default