code wiki / (root) / nx_haar.nx

nx_haar.nx

buildroot/runtime/nx_haar.nx

2619 B58 linesdepth 6pulls 7 transitivereach 3 importersview sourcekind librarytopic haar
docsdependenciesstructsconstsfunctions

about

nx_haar.nx -- Haar-like rectangle features (R-FACE-1), evaluated in O(1) on the integral image (nx_integral). These are the weak-feature primitives of a Viola-Jones cascade: a feature value is (sum of "white" rects) - (sum of "black" rects), each rect summed by four integral lookups. EDGE_H : [white | black] left-right contrast (vertical edge) EDGE_V : [white / black] top-bottom contrast (horizontal edge) LINE_H : [white|black|white] a dark vertical bar between light FOUR : 2x2 checker (TL,BR)-(TR,BL) diagonal contrast Raw integer value (no per-window variance normalization yet -- that is a later rung; the cascade adds it). Pure i64 over nx_integral. genealogy_id: viola_jones_2001 + papageorgiou_haar_wavelets_1998 (record-hint) lineage_id: haar_rectangle_feature + integral_image_o1 license_tier: ORIGINAL

dependencies 3 imports · 3 importers

syscalls.nx nx_image.nx nx_integral.nx nx_haar.nx nx_haar_cascade.nx nx_haar_cascade_gate.nx nx_haar_gate.nx

imports: syscalls.nxnx_image.nxnx_integral.nx

imported by: nx_haar_cascade.nxnx_haar_cascade_gate.nxnx_haar_gate.nx

structs

none

consts

21const NX_HAAR_EDGE_H: i64 = 0
22const NX_HAAR_EDGE_V: i64 = 1
23const NX_HAAR_LINE_H: i64 = 2
24const NX_HAAR_FOUR: i64 = 3

functions

28func nx_haar_eval(ii: *IntegralImage, kind: i64, x: i64, y: i64, w: i64, h: i64) -> i64