Does pcsegdist function uses dbscan algorithm

4 Ansichten (letzte 30 Tage)
Farah Saeed
Farah Saeed am 29 Nov. 2021
Hi
I found pcsegdist function segments point cloud based on euclidean distance.
I applied pcsegdist function in matlab and dbscan function in python (https://scikit-learn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html) on same point cloud.
The minPoints parameter was set same in both functions.
Eps parameter in python and minDistance parameter in matlab were set same.
The 'eps parameter' means that if the distance between two points is lower or equal to this value (eps), these points are considered neighbors. (https://towardsdatascience.com/how-dbscan-works-and-why-should-i-use-it-443b4a191c80)
The 'minDistance parameter' is the minimum Euclidean distance between points from two different clusters, specified as a positive scalar.
Hence I set both minDistance and eps parameter same.
But the output number of clusters were different from matlab and python functions.
Any insights on this matter would be appreciated.
Thank you.

Antworten (2)

Shivam Singh
Shivam Singh am 5 Apr. 2022
Hello Farah,
It is my understanding that you are trying to use “pcsegdist” function in MATLAB and DBSCAN function in Python.
However, “eps” parameter in Python and “minDistance” parameter in MATLAB are different from each other. “minDistance” is the Minimum Euclidean distance between points from two different clusters. But “eps” is the maximum distance between two samples for one to be considered as in the neighbourhood of the other. Also, “eps” is not a maximum bound on the distances of points within a cluster.
You may use the following reference to know more about it:

Paola Donis Noriega
Paola Donis Noriega am 14 Jul. 2025
By default, pcsegdist segments the point cloud into clusters based on Euclidean distance using an approximate method. Starting in R2024b, you can set the method to "exhaustive" to use the DBSCAN algorithm. For example:
labels = pcsegdist(ptCloud,minDistance,Method="exhaustive")

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by