code wiki / (root) / nx_pc.nx

nx_pc.nx

buildroot/runtime/nx_pc.nx

7790 B259 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_pc.nx -- 2D point cloud + ICP alignment + nearest neighbor. What this unlocks: + register two views of a planar object (paper / floor / map) + align Hough-line endpoints across two photos + match feature points from V8 salience peaks across frames + planar SLAM scaffolding + 2D landmark localization All pure i64 with Q10 trig. Brute-force NN is O(N*M); for larger clouds users can pre-bucket; we keep the substrate primitive simple. genealogy_id: horn_1987_closed_form_rotation + besl_mckay_1992_icp lineage_id: point_cloud_registration + iterative_closest_point

dependencies 2 imports · 1 importers

syscalls.nx nx_math.nx nx_pc.nx nx_pc_test.nx

imports: syscalls.nxnx_math.nx

imported by: nx_pc_test.nx

structs

27struct PointCloud2D

consts

25const NX_PC_Q: i64 = 1024 // Q10

functions

35func nx_pc_alloc(n: i64) -> *PointCloud2D
called by 1: main
43func nx_pc_set(pc: *PointCloud2D, i: i64, x: i64, y: i64) -> i64
called by 1: main
49func nx_pc_get_x(pc: *PointCloud2D, i: i64) -> i64
called by 1: main
53func nx_pc_get_y(pc: *PointCloud2D, i: i64) -> i64
called by 1: main
61func nx_pc_centroid(pc: *PointCloud2D, out_cx: *i64, out_cy: *i64) -> i64
called by 1: main
82func nx_pc_bbox(pc: *PointCloud2D, out_xmin: *i64, out_ymin: *i64,
called by 1: main
112func nx_pc_nearest(cloud: *PointCloud2D, qx: i64, qy: i64) -> i64
136func nx_pc_apply_transform(pc: *PointCloud2D, cos_q10: i64, sin_q10: i64,
called by 2: nx_pc_icp_stepmain
169func nx_pc_icp_step(src: *PointCloud2D, tgt: *PointCloud2D) -> i64
232func nx_pc_icp(src: *PointCloud2D, tgt: *PointCloud2D,
called by 1: main calls 1: nx_pc_icp_step
247func nx_pc_mse(src: *PointCloud2D, tgt: *PointCloud2D) -> i64
called by 1: main calls 1: nx_pc_nearest