Show HN: 3D to 2D, point clouds flattening (geometry images) github.com · 2 poin...

@show

Show HN: 3D to 2D, point clouds flattening (geometry images) github.com · 2 points · 1 comments · HN thread

TL;DR flatpoints is a Python package that takes a raw 3D point cloud sampled from an unknown surface and arranges its points onto a square pixel grid, so neighbouring pixels hold neighbouring points on the surface. Each point's xyz, normals, colours or features then become an image that standard 2D tools (convolutions, SVD, interpolation) can process. The package also offers resampling and compression built on those images.

  • One pixel per point: the mapping idx -> (row, column) keeps nearby pixels on nearby points of the surface, based on the geometry images idea of Gu, Gortler and Hoppe (2002).
  • Closed surfaces are cut into two hemispheres (single_face=False) and open surfaces are flattened onto one image (single_face=True); torus-like residual closedness is removed by shearing.
  • Flattening uses a rectangular conformal map adapted from Choi's rectangular-conformal-map code, which the README attributes to the TEMPO paper (Meng, Choi, Lui, 2016).
  • Resampling works by sampling the unit square with a hyperuniform blue-noise seed and transporting points onto the surface via bilinear interpolation of the xyz image; an optional Optimal Transport step refines it.
  • The author admits that farthest point sampling is about as uniform for simply choosing a subset of input points; the resampling is mainly a demonstration of transporting properties through the image.
  • Compression of the xyz images (SVD, DCT or wavelet) exploits their smoothness, with a factor giving the fraction of storage saved relative to float32 points.

Discussion The single comment is from the author, who explains the motivation: placing irregular point clouds on regular grids so that grids can serve as a data structure that is easier to plug into ML pipelines. They started with multi-indexing, then looked at mesh flattening and geometry images, and concluded that flattening point clouds helps keep parts such as legs, ears and other features from being lost in the grid. The tone is informal and exploratory, and no outside replies were posted.

  • Flattening point clouds to grids aids ML and indexing (a few): The only commenter, the author, argues that regular grids are easier to integrate into ML pipelines than trees and that flattened points can be sorted and indexed more effectively. They say the approach keeps features like legs and ears on the bunny, dragon and elephant examples.

Links from the comments

#pointClouds #geometryImages #meshFlattening #pythonLibrary #3dGeometry