nx_haar.nx
buildroot/runtime/nx_haar.nx
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
imports: syscalls.nxnx_image.nxnx_integral.nx
imported by: nx_haar_cascade.nxnx_haar_cascade_gate.nxnx_haar_gate.nx
structs
| none |
consts
| 21 | const NX_HAAR_EDGE_H: i64 = 0 |
| 22 | const NX_HAAR_EDGE_V: i64 = 1 |
| 23 | const NX_HAAR_LINE_H: i64 = 2 |
| 24 | const NX_HAAR_FOUR: i64 = 3 |
functions
| 28 | func nx_haar_eval(ii: *IntegralImage, kind: i64, x: i64, y: i64, w: i64, h: i64) -> i64 |