Robotics StackExchange | Archived questions

Extracting the visible mesh surface

Hi,
I'm trying to get the intersection surface between RGBD camera FOV and mesh model.. this intersection surface is the visible mesh surface from the RGBD camera point of view. I tried to use PCL::RangeImage since it simulates the sensor FOV, position and orientation and performs z buffering to extract the visible surface but I get the mesh part that is inside the FOV frustum regardless of its visibility to the camera as it is shown in the following image link : image

Here is the github link of the code ( I preformed frustum culling then range image and I also used the loaded mesh points directly but I get the same result ): code link

does the pcl::RangeImage is supposed to do that although it is applying z buffer? does PCL include another function to extract the visible surface?

Thanks

Asked by Randa on 2015-10-11 08:53:01 UTC

Comments

Answers

RangeImagePlanar is generating a range image view of a point cloud, not a mesh. As such, it does not use the concept of faces between vertices/points. For every pixel of the RangeImage, the closest point found in the cloud is taken. So if your cloud is somewhat sparse, you'll get RangeImage points that would be hidden by surfaces on a mesh model of the same scene.

A quick fix for this would be upsampling your input cloud so it is more dense or rendering your RangeImage with a lower resolution. Both approaches ideally lead to a "close point" always being found for a RangeImage pixel, reducing the issue you're observing.

As mentioned previously in a earlier Q/A, I'm not aware of a ready-made solution in ROS that otherwise extracts visible mesh surfaces, but given this is a core functionality of GPUs since 20 years it certainly should be doable. The main difficulty appears to be deciding on the libraries/approach for doing it.

Asked by Stefan Kohlbrecher on 2015-10-11 11:12:43 UTC

Comments

I tried to upsample the mesh but I'm still getting the same result ... I'll try to check other options ... Thanks for your suggestions.

Asked by Randa on 2015-10-15 02:22:53 UTC