170 likes | 307 Views
CS 175 – Week 1 Point Cloud Basics A cquisition and Data Structures. Data Sources. point clouds generated by measurements 3D scan, meteorology, geology experiments numerical simulation evaluation. Point Properties. dimension 1.5D – function values along a line
E N D
CS 175 – Week 1Point Cloud BasicsAcquisition and Data Structures
Data Sources • point clouds generated by • measurements • 3D scan, meteorology, geology • experiments • numerical simulation • evaluation
Point Properties • dimension • 1.5D – function values along a line • 2D – positions in the plane • 2.5D – function values in the plane • 3D – positions in 3D • nD – multi-modal data • measurement error
Data Structures • Requirements • access point values (coordinates) • find neighbours • within a certain radius “r” • the “k” nearest neighbours
Storing Values • vector of values • values per element • unique index for every point • convenient access: v[i].{x,y,z} • but: hard to find neighbours
Octrees • Hierarchical spatial data structure • divide-and-conquer • binary subdivision
Octrees • each node contains • dimensions [xmin,xmax] x [ymin,ymax] x [zmin,zmax] • pointers to eight children • empty for leaf-nodes • unique label e.g., p-adic number, p=2d+1
0000 0000 0001 0002 0001 0002 0011 0021 0012 0022 0021 0022 0012 0121 0221 0112 0212 0121 0212 0221 0112 1121 2121 1121 2121 Octrees • 1D example 0011
Points and Octrees • store points in an octree • points: reference to node (label) • leaf nodes: list of points (indices) • subdivision criterion • maximum number of points
Creating the Octree • loop over all points • find leaf that contains it • O(l), l = octree depth • add point to this leaf-node
Creating the Octree • add point to leaf-node • add point-index to list • store node-label in point • if list-size exceeds maximum • split this node
Creating the Octree • split node • create sub-nodes • assign points in list to sub-nodes • update node-references for points
Algorithms • finding neighbours of a point • within certain radius “r” • the “k” nearest • two-step process • create queue of candidate nodes • consider points contained therein
Neighbours within Radius • queue q of nodes • traverse octree, e.g. depth first • add leaf-node to q if dmin< r • for all nodes in q • for all points in the node • if d < r then add as neighbour
k Nearest Neighbours • priority queue q1(dmin) of nodes • priority queue q2(d) of points • add root-node to q1 • while q1 not empty, get front • if not leaf-node, add children to q1, continue • if node close enough ( dmin< q2[k] ) • add all points in node to q2 • take first k elements of q2 as neighbours
Beyond Octrees • non-standard octrees • not axis-aligned • no uniform subdivision • binary space-partioning (BSP) trees • recursive subdivision witharbitrary planes
What’s Next? • Thursday • 3D scanning presentation • field trip – scan Tech spots • Homework • scout suitable sites • make (digital) photos