nx_facefind_lib.nx
buildroot/runtime/nx_facefind_lib.nx
about
nx_facefind_lib.nx -- FACE AND EYE BOXES from a gray plane (aesthetictwin AT30, 2026-09-16): the loaded cascades
(nx_haar_xml) run by the sovereign evaluator (nx_haar_cascade) over integral tables (nx_integral). The face is the
best-voted group over the whole plane at window sizes from min_face_permil of the shorter side; the eyes are the
best-voted groups on each half of the face's eye band. Every count the verdict rests on travels in the result (raw
detections, groups, the cap flag) so a miss can be read, never guessed. The trained data is a beta-only bootstrap arm;
this composite is written against the flat cascade layout, so a cascade the estate trains itself drops in unchanged.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 4 imports · 3 importers
imports: nx_syscalls.nxnx_integral.nxnx_haar_cascade.nxnx_haar_xml.nx
imported by: nx_facefind.nxnx_facefind_gate.nxnx_photomark_lib.nx
structs
| none |
consts
| 13 | const FF_FACE_XML: *u8 = "knowledge/fetched/cmp_aesthetictwin_haar_frontalface_default.xml" |
| 14 | const FF_FACE_XML_PARENT: *u8 = "../knowledge/fetched/cmp_aesthetictwin_haar_frontalface_default.xml" |
| 15 | const FF_EYE_XML: *u8 = "knowledge/fetched/cmp_aesthetictwin_haar_eye.xml" |
| 16 | const FF_EYE_XML_PARENT: *u8 = "../knowledge/fetched/cmp_aesthetictwin_haar_eye.xml" |
| 17 | const FF_MIN_FACE_PERMIL: i64 = 100 |
| 18 | const FF_SCALE_PERMIL: i64 = 1100 |
| 19 | const FF_DET_CAP: i64 = 4096 |
| 20 | const FF_GRP_CAP: i64 = 512 |
| 21 | const FF_MIN_NEIGHBORS: i64 = 3 |
| 22 | const FF_GROUP_EPS_PERMIL: i64 = 200 |
| 23 | const FF_EYE_TOP_PERMIL: i64 = 150 |
| 24 | const FF_EYE_BOT_PERMIL: i64 = 600 |
| 25 | const FF_EYE_MIN_DIV: i64 = 10 |
| 26 | const FF_EYE_MAX_DIV: i64 = 3 |
| 27 | const FF_EYE_MIN_NEIGHBORS: i64 = 2 |
| 28 | const FF_PERMIL: i64 = 1000 |
| 29 | const FF_I64: i64 = 8 |
| 30 | const FF_R_FACE: i64 = 0 |
| 31 | const FF_R_FX: i64 = 1 |
| 32 | const FF_R_FY: i64 = 2 |
| 33 | const FF_R_FW: i64 = 3 |
| 34 | const FF_R_FH: i64 = 4 |
| 35 | const FF_R_FVOTES: i64 = 5 |
| 36 | const FF_R_EYES: i64 = 6 |
| 37 | const FF_R_RX: i64 = 7 |
| 38 | const FF_R_RY: i64 = 8 |
| 39 | const FF_R_RW: i64 = 9 |
| 40 | const FF_R_RH: i64 = 10 |
| 41 | const FF_R_LX: i64 = 11 |
| 42 | const FF_R_LY: i64 = 12 |
| 43 | const FF_R_LW: i64 = 13 |
| 44 | const FF_R_LH: i64 = 14 |
| 45 | const FF_R_GROUPS: i64 = 15 |
| 46 | const FF_R_RAW: i64 = 16 |
| 47 | const FF_R_CAPPED: i64 = 17 |
| 48 | const FF_R_EYE_RAW: i64 = 18 |
| 49 | const FF_R_EYE_GROUPS: i64 = 19 |
| 50 | const FF_R_FACE_RANK: i64 = 20 |
| 51 | const FF_R_RVOTES: i64 = 21 |
| 52 | const FF_R_LVOTES: i64 = 22 |
| 53 | const FF_R_N: i64 = 23 |
| 54 | const FF_FACE_CANDIDATES: i64 = 4 |
| 55 | const FF_JOINT_MIN_PERMIL: i64 = 500 |
| 56 | const FF_E_RAW: i64 = 0 |
| 57 | const FF_E_GROUPS: i64 = 1 |
| 58 | const FF_E_RX: i64 = 2 |
| 59 | const FF_E_RY: i64 = 3 |
| 60 | const FF_E_RW: i64 = 4 |
| 61 | const FF_E_RH: i64 = 5 |
| 62 | const FF_E_RV: i64 = 6 |
| 63 | const FF_E_LX: i64 = 7 |
| 64 | const FF_E_LY: i64 = 8 |
| 65 | const FF_E_LW: i64 = 9 |
| 66 | const FF_E_LH: i64 = 10 |
| 67 | const FF_E_LV: i64 = 11 |
| 68 | const FF_E_VOTE_OFF: i64 = 4 |
| 69 | const FF_EYE_OUT_N: i64 = 12 |
| 70 | const FF_OK: i64 = 0 |
| 71 | const FF_E_NOFACE: i64 = 0 - 1 |
| 72 | const FF_E_NOEYES: i64 = 0 - 2 |
functions
| 74 | func ff_min(a: i64, b: i64) -> i64 { if a < b { return a } return b } called by 1: ff_find |
| 75 | func ff_load_face(rc: *i64) -> *HaarCascade { var c: *HaarCascade = hx_load(FF_FACE_XML, rc); if (c as i64) == 0 { c = hx_load(FF_FACE_XML_PARENT, rc) } return c } |
| 76 | func ff_load_eye(rc: *i64) -> *HaarCascade { var c: *HaarCascade = hx_load(FF_EYE_XML, rc); if (c as i64) == 0 { c = hx_load(FF_EYE_XML_PARENT, rc) } return c } |
| 79 | func ff_find(face_c: *HaarCascade, eye_c: *HaarCascade, gray: *u8, w: i64, h: i64, stride: i64, min_face_permil: i64, res: *i64) -> i64 |
| 148 | func ff_eyes(eye_c: *HaarCascade, ii: *IntegralImage, sq: *IntegralImage, fx: i64, fy: i64, fw: i64, fh: i64, out: *i64) -> i64 |
| 177 | func ff_half_mean(egroups: *i64, neg: i64, mid: i64, side: i64, floor: i64, out: *i64, slot: i64) -> i64 called by 1: ff_eyes |