Closed riyadamr closed 3 years ago
Thanks for your interest in the library.
With regards to minimumPointsPerCluster, the code is correct as written. Please see the algorithm document here, where it notes that minimumPointsPerCluster is used to identify the initial points. The DBSCAN would not identify any clusters in your image unless you used minimumPointsPerCluster = 2 or epsilon = 29 (20 * √2).
With regards to epsilon, when dealing w/ floating point numbers, equality is rarely something that's worth checking. For your case, I would generally recommend using 20.01 or similar to address. However, if you wish to change it to <=
, then please submit a PR and I will be happy to pull it in.
Thank you for the clarification !
I think I will end up using my own algorithm, it takes 1 second for 3000 points, but I don't think I will have to go over the 10000 points use case.
Great! Glad to be of assistance.
Hi,
While using your library to find points cluster on an image I might have found two problems:
if (candidates.Count >= minimumPointsPerCluster)
while the cluster might not be complete already.For example on this image i have 30 points spaced by 20px : With
espsilon = 21
andminimumPointsPerCluster = 10
I find 0 clusters. When I should be finding my cluster with 30 points.<=
because on my example i wont find any points with epsilon = 20 while my points spacing is 20. So i endedup using epsilon = 21.