code wiki / (root) / nx_geom.nx

nx_geom.nx

buildroot/runtime/nx_geom.nx

13114 B405 linesdepth 5pulls 7 transitivereach 4 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

syscalls.nx nx_axioms.nx nx_image.nx nx_math.nx nx_geom.nx nx_eye_detect.nx nx_eye_detect_test.nx nx_geom_test.nx nx_vision_pipeline_test.nx

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

134struct HoughLines
255struct HoughCircles

consts

34const NX_GEOM_NTHETAS: i64 = 36
35const NX_GEOM_Q: i64 = 1024

functions

47func nx_geom_fill_trig(cos_t: *i64, sin_t: *i64) -> i64
141func nx_geom_hough_line(edge_mask: *Image, min_votes: i64,
263func nx_geom_hough_circle_r(edge: *Image, gx: *ImageS64, gy: *ImageS64,
387func nx_geom_line_orientation_hist(lines: *HoughLines, hist: *i64) -> i64
called by 2: mainmain