mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #23388 from simonlynen:patch-2
Make LineSegmentDetector deterministic by using stable_sort
This commit is contained in:
@@ -592,8 +592,8 @@ void LineSegmentDetectorImpl::ll_angle(const double& threshold,
|
||||
}
|
||||
}
|
||||
|
||||
// Sort
|
||||
std::sort(ordered_points.begin(), ordered_points.end(), compare_norm);
|
||||
// Use stable sort to ensure deterministic region growing and thus overall LSD result determinism.
|
||||
std::stable_sort(ordered_points.begin(), ordered_points.end(), compare_norm);
|
||||
}
|
||||
|
||||
void LineSegmentDetectorImpl::region_grow(const Point2i& s, std::vector<RegionPoint>& reg,
|
||||
|
||||
Reference in New Issue
Block a user