MCPcopy Create free account
hub / github.com/GDUT-Kyle/faster_lio_sam / RGBpointAssociateToMap

Method RGBpointAssociateToMap

src/ImageProjection.cpp:439–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437 }
438
439 void RGBpointAssociateToMap(PointType const *const pi,
440 pcl::PointXYZRGB *const po) {
441 Eigen::Vector3d point_curr(pi->x, pi->y, pi->z);
442 po->x = point_curr.x();
443 po->y = point_curr.y();
444 po->z = point_curr.z();
445 int reflection_map = (int)pi->intensity;
446 if (reflection_map < 30) {
447 int green = (reflection_map * 255 / 30);
448 po->r = 0;
449 po->g = green & 0xff;
450 po->b = 0xff;
451 } else if (reflection_map < 90) {
452 int blue = (((90 - reflection_map) * 255) / 60);
453 po->r = 0x0;
454 po->g = 0xff;
455 po->b = blue & 0xff;
456 } else if (reflection_map < 150) {
457 int red = ((reflection_map - 90) * 255 / 60);
458 po->r = red & 0xff;
459 po->g = 0xff;
460 po->b = 0x0;
461 } else {
462 int green = (((255 - reflection_map) * 255) / (255 - 150));
463 po->r = 0xff;
464 po->g = green & 0xff;
465 po->b = 0;
466 }
467 }
468
469 // 将点云封装成cloud_info并发布
470 void publishClouds()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected