what will happen if points with different color in one cell?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

what will happen if points with different color in one cell?

whutph
Hello everyone,

I'm trying to use RTAB-Map to build the map with colorized 3d point cloud, but I have some questions about the mapping process. How does RTAB-Map process the points very close to their neighbors?  

For example, in the first scan, i have one point at (0,0,0), and in the second scan there is a point (0, 0, 0.01). My understanding was, if the two points are within one voxel (or Grid/Cell ?), in the final map there will be only one point in this voxel, which is the center of the pixel. Is that right?  But if the two points have different rgb values, what color will be saved in this voxel?

Thanks in advance!
Reply | Threaded
Open this post in threaded view
|

Re: what will happen if points with different color in one cell?

matlabbe
Administrator
You are referring to 3D OctoMap. The color is averaged between the color channels of the points inside the same voxel.

See https://github.com/introlab/rtabmap/blob/769ace86cedf3ce10ea68bfb7ed85684592930c2/corelib/src/OctoMap.cpp#L191-L206