Skip to content

Lightweight, header-only implementation of DBSCAN algo

Notifications You must be signed in to change notification settings

smarttowel/dbscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Usage

//Suppose, we have set of points from OpenCV
std::vector<cv::Point2f> points;
//Define distance function as simple Euclidean distance between two points
auto distance = [](auto p1, auto p2){
    return std::hypot(p2.x - p1.x, p2.y - p1.y);
};
//Declare Dbscan instance
Dbscan<cv::Point2f> dbscan;
//Run algo with eps=50, minPts=10 and our distance function. 
//std::vector<std::vector<cv::Point2f>> returned as result
auto clusters = dbscan.run(points, 50, 10, distance);

About

Lightweight, header-only implementation of DBSCAN algo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages