nx_geom.nx
buildroot/runtime/nx_geom.nx
about
nx_geom.nx -- geometric primitives (V4 of vision rollout).
Hough transform line detection (Hough 1962, Duda+Hart 1972) and
circle detection (Ballard 1981 gradient method). Pure i64.
What this unlocks:
+ room geometry (walls, doors, window frames as line peaks)
+ architectural analysis (vanishing points via line intersection)
+ vehicle/animal anatomy (wheels, eyes as circles)
+ table-top objects (plates, cups, bottles as circles)
+ rule-of-thirds + leading-line aesthetics (line-angle histogram)
All trig is Q10 fixed-point. cos/sin tables hardcoded for 36 angles
(5 degree resolution) -- sufficient for major-line detection;
finer-grained vision would interpolate or use larger tables.
genealogy_id: hough_1962_patent + duda_hart_1972_generalized
+ ballard_1981_generalized_circle
lineage_id: voting_accumulator + gradient_direction_voting
axioms: NX_AX_GEOM_LINE_HOMOGENEOUS (rho = x cos t + y sin t)
dependencies 4 imports · 4 importers
imports: syscalls.nxnx_axioms.nxnx_image.nxnx_math.nx
imported by: nx_eye_detect.nxnx_eye_detect_test.nxnx_geom_test.nxnx_vision_pipeline_test.nx
structs
| 134 | struct HoughLines |
| 255 | struct HoughCircles |
consts
| 34 | const NX_GEOM_NTHETAS: i64 = 36 |
| 35 | const NX_GEOM_Q: i64 = 1024 |
functions
| 47 | func nx_geom_fill_trig(cos_t: *i64, sin_t: *i64) -> i64 |
| 141 | func nx_geom_hough_line(edge_mask: *Image, min_votes: i64, |
| 263 | func nx_geom_hough_circle_r(edge: *Image, gx: *ImageS64, gy: *ImageS64, |
| 387 | func nx_geom_line_orientation_hist(lines: *HoughLines, hist: *i64) -> i64 |