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

Commit fea1010

Browse files
author
Daniel
authored
Add files via upload
1 parent 1213c4f commit fea1010

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

main.cpp

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@
66

77

88
// Colors to display the generated clusters
9-
float colors[] = { 255,0,0,
10-
0,255,0,
11-
0,0,255,
12-
255,255,0,
13-
0,255,255,
14-
255,0,255,
15-
0,0,255,
16-
0,255,255,
17-
255,255,255
18-
};
9+
float colors[] = { 255,0,0, //red 1
10+
0,255,0, //green 2
11+
0,0,255, //blue 3
12+
255,255,0,//yellow 4
13+
0,255,255,//light blue 5
14+
255,0,255,//magenta 6
15+
255,255,255,//white 7
16+
255,128,0,//orange 8
17+
255,153,255,//pink 9
18+
51,153,255, // 10
19+
153, 102, 51,// 11
20+
128, 51, 153,// 12
21+
153, 153, 51,// 13
22+
163, 38, 51,// 14
23+
204, 153, 102,// 15
24+
204, 224, 255,// 16
25+
128, 179, 255,// 17
26+
206, 255, 0,// 18
27+
255,204,204,// 19
28+
204,255,153,// 20
29+
30+
}; //20x3=60 color elements
1931

2032
void readCloudFromFile(int argc, char** argv, std::vector<htr::Point3D>& points,
2133
pcl::PointCloud<pcl::PointXYZRGB>::Ptr& cloud){
@@ -342,7 +354,7 @@ void init(int argc, char** argv,bool show){
342354
uint8_t g;
343355
uint8_t b;
344356

345-
if(j < 27){
357+
if(j < 60){
346358

347359
r = (uint8_t) colors[j];
348360
g = (uint8_t) colors[j+1];
@@ -352,8 +364,9 @@ void init(int argc, char** argv,bool show){
352364

353365
r = (uint8_t) uniform_0_255(gen);
354366
g = (uint8_t) uniform_0_255(gen);
355-
b = (uint8_t) uniform_0_255(gen);
356-
367+
b = (uint8_t) uniform_0_255(gen);
368+
369+
357370
}
358371

359372

0 commit comments

Comments
 (0)