Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 69714ee

Browse files
author
Daniel
authored
Update main.cpp
1 parent 35ee39d commit 69714ee

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

main.cpp

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ void init(int argc, char** argv,bool show){
214214
cluster; minPtsAux and minPts >=3 , which specifies how many neighbors a point should have to be included into a
215215
cluster.
216216
*/
217-
217+
//groupA.size()*0.001 -> eps
218218
//----------------------------------------------------------------
219219
dbscan.init(groupA, octreeResolution, eps, minPtsAux_, minPts); /*RUN DBSCAN*/
220220
//----------------------------------------------------------------
@@ -337,6 +337,34 @@ void init(int argc, char** argv,bool show){
337337
uint8_t r = (uint8_t) uniform_0_255(gen);
338338
uint8_t g = (uint8_t) uniform_0_255(gen);
339339
uint8_t b = (uint8_t) uniform_0_255(gen);
340+
/*
341+
342+
// Colors to display the generated clusters
343+
float colors[] = { 1,0,0,
344+
0,1,0,
345+
0,0,1,
346+
0.5,0,0,
347+
0,0.5,0,
348+
0,0,0.5,
349+
1,1,0,
350+
0,1,1,
351+
1,0,1,
352+
0,0,1,
353+
0,1,1,
354+
1,1,1
355+
};
356+
357+
358+
int j = 0;
359+
for(dbScanSpace::cluster cluster:dbscan2.getClusters()){
360+
for(auto& point:cluster.clusterPoints){
361+
glColor3f(colors[j], colors[j+1], colors[j+2]);
362+
}
363+
364+
j+=3;
365+
if(j > 36) j = 0;
366+
}
367+
*/
340368

341369
for(auto& pointCluster:cluster.clusterPoints){
342370

0 commit comments

Comments
 (0)