PCL Developers blog

Gregory Long

This is my personal page

email:gregory.g.long at gmail dot com
project:Surface Reconstruction methods in PCL
mentor:Suat Gedikli (Radu B. Rusu [Zoltan-Csaba Marton, Vincent Rabaud, Michael Dixon])

About me

I’m a student at UC San Diego.

My hobbies include:

  • Bass Guitar
  • Surfing
  • Coding
  • Debugging
  • Writing documentation

Roadmap

Here is a brief outline of my GSoC project milestones:

  • Design a common interface (API) for all surface reconstruction methods in PCL
  • Extend PCL’s libpcl_surface to include the Marching Cubes and Poisson algorithms
  • Connect PCL to VTK’s surface smoothing algorithms
  • Learn what new methods we need to implement by looking at Meshlab (code is GPL - do not take anything from it, just look at the performance of certain algorithms which we can afterwards reimplement from the original papers)
  • Unit test, document, provide code samples for each method implemented

Click here for a detailed roadmap

Recent status updates

Pencils Down
Monday, August 22, 2011
../../_images/gsoc4.png

Today is the official “pencils down” date for GSoC 2011. My project is now officially “over,” and I’m writing this blog post as a final summary of my work this summer, and as a look into the future of surface reconstruction for PCL.

This summer, I’ve completed a large majority of what I’ve set out to do. I’ve reviewed the surface reconstruction API, implemented Marching Cubes, ported over Poisson Reconstruction, connected our surface reconstruction algorithms to VTK’s surface smoothing techniques, and did a lot of further research into the world of surface reconstruction. All in all, I’m pretty satisfied with the amount of progress that has been made over these past couple months.

That said, I feel there’s still a lot more work to be done. Some tutorials should be written for these surface reconstructions, as well as unit tests and more detailed documentation. The Poisson reconstruction code is basically a copy of Misha’s, so this should be ported further, to utilize our own in house Octree and Marching Cubes code. The Marching Cubes code should also be further extended to handle octree based voxel grids. Finally, there are many other surface reconstruction algorithms out there that should be added to the library.

I’ve had a great time this summer working on PCL. Having come in with very little experience in professional or open source software development, it’s been a great learning experience for me, teaching me a lot about efficient C++ coding as well as code management and design. I’ve also found the topic of surface reconstruction very interesting, and will be continuing to work on improving PCL’s surface reconstruction library in the future. Thanks to all the PCL developers, and see you on the mailing list!

Poisson Reconstruciton Results
Wednesday, August 17, 2011
../../_images/gsoc4.png

I’ve successfully ported over Misha’s Poisson reconstruciton code, and here are the results:

../../_images/poisson_horse1.png ../../_images/poisson_horse2.png

This model was generated with the sample data on Misha’s site, which provides both points and normals. In an ideal case, the results look extremely good. When the points alone are ported in without any normal information, the image quality is a bit worse:

../../_images/poisson_horse_nonorm.png

These norms were generated in PCL, with a K-NN value of 10. This is a great illustration of how important a good set of surface normals are for accurate reconstruction using implicit surface algorithms like Poisson reconstruction.

Misha’s Poisson Reconstruction
Thursday, August 11, 2011
../../_images/gsoc4.png

I’ve successfully ported over Misha’s Poisson reconstruction code into PCL. As of now, the interface is still rough, and needs refinement, however the reconstruction algorithm does run. Unfortunately, I was unable to code my own version of Poisson reconstruction, due to summer of code ending soon, but I think that an in-house implementation would be the best in the long term, since marching cubes is already implemented, and a more complex, octree based marching cubes algorithm could be then used in tandem with any manner of implicit surface algorithm. This would allow future implementations of implicit surface reconstructions to reuse this code and make life that much easier for developers. The way that the Poisson code is structured now, it is a standalone algorithm with its own implementation of marching cubes, matrices, etc.

More details, along with pictures, coming soon!

VTK Smoothing Integration
Monday, August 01, 2011
../../_images/gsoc4.png

I’ve finished integrating VTK smoothing algorithms into PCL. There is now an object VtkSmoother, that takes in a PolygonMesh, and outputs a new PolygonMesh that is smoothed. The actual algorithm first optionally subdivides the polygons into smaller triangles, using either a linear, loop, or butterfly subdivision filter. It then runs either VTK’s LaPlacian or WindowedSinc smoothing algorithm, and outputs it into another PolygonMesh. To read more on these algorithms, the VTK documentation gives good information on them: http://www.vtk.org/doc/release/5.6/html/.

I’ve spent most of my time analyzing the WindowedSinc smoothing algorithm, and the different parameters such as the number of iterations, and the size of the window. Also, I’ve taken a look at the different subdivision methods.

On the Bunny dataset, there aren’t many differences between the Linear, Loop, and Butterfly subdivision methods:

../../_images/bunny_smooth_linear.png ../../_images/bunny_smooth_loop.png ../../_images/bunny_smooth_butterfly.png

The difference is very slight between them all, in both results and in computational time.

The number of iterations affects how much smoothing is performed. In general, the Windowed Sinc algorithm converges quickly, so the number of iterations doesn’t affect the results much. In general, 20 iterations is sufficient. Here are the results after 5, 10, and 15 iterations:

../../_images/bunny_smooth_5.png ../../_images/bunny_smooth_10.png ../../_images/bunny_smooth_15.png

The window size also affects the amount of smoothing, and is the most effective way of changing the results. In general, values between 0.01 and 0.001 work well. Here are results with 0.1, 0.01, and 0.001 window size:

../../_images/bunny_smooth_0p1.png ../../_images/bunny_smooth_0p01.png ../../_images/bunny_smooth_0p001.png

One improvement is to include hole filling for the mesh. Other work integrating more polygon mesh algorithms from VTK is also possible, and should be straightforward in the future.

VTK Smoothing Results
Wednesday, July 20, 2011
../../_images/gsoc4.png

This week I’ve been working on integrating the VTK surface smoothing algorithms in to the surface reconstruction code. I’ve successfully converted a pcl PolygonMesh into VTK format, and run the subdivision and surface smoothing algorithms on it. I’ve been using vtkLinearSubdivisionFilter and vtkWindowedSincPolyDataFilter for these tasks. The results for the gp3 bunny are very nice:

../../_images/bunny_gp3_nosmooth.png ../../_images/bunny_gp3_smooth_0p001.png

There are also parameters that you can tweak for the surface smoothing filter. Here I am changing the pass band from 0.001 to 0.1:

../../_images/bunny_gp3_smooth_0p1.png

More updates to come as I implement more smoothing features.