nx_haar_cascade.nx
buildroot/runtime/nx_haar_cascade.nx
about
nx_haar_cascade.nx -- Viola-Jones attentional cascade EVALUATOR (R-FACE-2).
The detector engine: a weak classifier is a Haar feature + threshold +
polarity; a stage sums weighted weak votes vs a stage threshold; the cascade
runs stages in order and EARLY-REJECTS the moment any stage fails (so the
vast non-object majority is discarded after 1-2 cheap stages).
This evaluates a GIVEN cascade. The cascade PARAMETERS (thresholds/polarities/
alphas/stage thresholds) come from TRAINING (AdaBoost over a labeled face /
non-face set) -- a separate data-dependent rung. This rung is the machinery,
validated with a hand-built toy cascade.
Layout (caller-supplied flat i64 arrays):
weak row (8 i64): [kind, x, y, w, h, threshold, polarity(+1/-1), alpha]
stage row (3 i64): [weak_offset(in rows), weak_count, stage_threshold]
genealogy_id: viola_jones_2001_attentional_cascade + freund_schapire_adaboost_1997
lineage_id: weak_classifier + boosted_stage + early_reject_cascade
license_tier: ORIGINAL
dependencies 4 imports · 1 importers
imports: syscalls.nxnx_image.nxnx_integral.nxnx_haar.nx
imported by: nx_haar_cascade_gate.nx
structs
| none |
consts
| 24 | const NX_WEAK_FIELDS: i64 = 8 |
| 25 | const NX_STAGE_FIELDS: i64 = 3 |
functions
| 29 | func nx_weak_eval(ii: *IntegralImage, weak: *i64) -> i64 |
| 37 | func nx_stage_eval(ii: *IntegralImage, weaks: *i64, n: i64, stage_thresh: i64) -> i64 |
| 50 | func nx_haar_cascade_eval(ii: *IntegralImage, stages: *i64, n_stages: i64, weaks: *i64) -> i64 |