fastgac.GaussianAccumulatorS2¶
-
class
fastgac.
GaussianAccumulatorS2
¶ This GaussianAccumulator can handle the entire sphere by using a space filling curve designed by Google’s S2 Geometry library. It projects a sphere to the faces of a cube and creates six separate hilbert curves for each face. It then stitches these curves together into one continuous thread. This class does not need S2 Geometry Library. We are using a port callsed s2nano that pulls out the essential SFC routine. It basically works by converting a normal to being integrated into a s2_id (SFC unique integer). It performs a faster interpolated and branchless binary search to find the closest cell in buckets. It then performs a local neighborhood search centered around the cell which actually looks at the surface normal.
-
__init__
(self: fastgac_pybind.GaussianAccumulatorS2, level: int = 1, max_phi: float = 180.0) → None¶
-
clear_count
(self: fastgac_pybind.GaussianAccumulatorUI64) → None¶ Clears all the histogram counts for each cell. Useful to call after peak detection to ‘reset’ the mesh.
-
copy_ico_mesh
(self: fastgac_pybind.GaussianAccumulatorUI64, mesh_order: bool = False) → fastgac_pybind.IcoMesh¶ Creates a copy of the ico mesh.
-
get_bucket_normals
(self: fastgac_pybind.GaussianAccumulatorUI64, mesh_order: bool = False) → fastgac_pybind.MatX3d¶ Gets the surface normals of the buckets in the histogram.The order by default is sorted by the space filling curve value attached to each cell.
-
get_bucket_projection
(self: fastgac_pybind.GaussianAccumulatorUI64) → fastgac_pybind.MatX2d¶ Only useful for GaussianAccumulatorOpt. Return the XY projection of each bucket.
-
get_bucket_sfc_values
(self: fastgac_pybind.GaussianAccumulatorUI64) → fastgac_pybind.VectorULongInt¶ Get the space filling curve values of each bucket. Will be sorted low to high.
-
get_normalized_bucket_counts
(self: fastgac_pybind.GaussianAccumulatorUI64, mesh_order: bool = False) → fastgac_pybind.VectorDouble¶ Get the normalized bucket counts in the histogram.The order by default is sorted by the space filling curve value attached to each cell.
-
get_normalized_bucket_counts_by_vertex
(self: fastgac_pybind.GaussianAccumulatorUI64, mesh_order: bool = False) → fastgac_pybind.VectorDouble¶ Average the normalized buckets counts (triangles) into the vertices of the mesh.The order by default is sorted by the space filling curve value attached to each cell.
-
integrate
(self: fastgac_pybind.GaussianAccumulatorS2, normals: fastgac_pybind.MatX3d, num_nbr: int = 12) → fastgac_pybind.VectorULongInt¶ Will intergrate the normals into the S2 Historgram
-
property
bucket_neighbors
¶ Fast lookup matrix to find neighbors of a bucket
-
property
buckets
¶ The buckets in the histogram, corresponding to cells/triangles on the mesh
-
property
mask
¶ A mask which indicates which triangles in the mesh are included in the buckets. By default its every one (mask = ones). This was added because I thought a user might want to limit the histogram to only include triangles a max_phi from the north pole.
-
property
mesh
¶ The underlying sphere-like mesh of the Gaussian Accumulator
-
property
num_buckets
¶ The number of buckets in histogram, size(buckets)
-
property
projected_bbox
¶ Only a valid member for GaussianAccumulatorOpt, ignore for everthing else
-