code wiki / (root) / nx_photomark_lib.nx

nx_photomark_lib.nx

buildroot/runtime/nx_photomark_lib.nx

104806 B1927 linesdepth 10pulls 48 transitivereach 17 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_photomark_lib.nx -- THE 2D PHOTO LANDMARKER, FIRST BYTE (aesthetictwin AT4 pm_canthal_tilt, AT23 rulers pm_landmarks pm_eyes pm_lips, AT30 cascade route, AT31 pm_referee; 2026-09-16). The estate's real input is a photograph, not a scan: this ruler places the canon landmarks a frontal still can carry -- both canthi of each eye and the vermilion split of the mouth -- and measures the axes that need NO absolute scale: canthal tilt per side (deg10, lateral canthus above the medial is positive, corrected for the head's roll read off the medial canthi), intercanthal_index (endocanthion span over exocanthion span, permil), intercanthal_eq_fissure (endocanthion span over the mean fissure width, permil) and upper_over_lower_lip (permil). Every value is MEASURED: it comes with the counts it rests on printed beside it, and a face the ruler cannot find, an eye pair it cannot pair or a mouth it cannot see is UNMEASURED by name, never a default. TWO ROUTES, one ruler. The CASCADE route (nx_facefind_lib over the loaded cascade data, beta-only bootstrap arm, AT30) gives the face box and an eye box per side; the SKIN route (a coarse skin grid, the largest skin component, a head box, enclosed dark blobs paired by consistency) stands when no cascade is loaded or no face is found; on real stills it read blonde hair and sand as skin and light irises as not dark, which is why the cascade route is primary. Either route only SEEDS each eye: since AT44 (2026-09-18) the canthi are the extremes of the fissure GROWN from the seed's pupil by local darkness out to the face's side and the other eye (pm_eye_fissure), and a fissure that reaches that window's side is refused by name (PM_PF_PINNED) -- the first ruler's canthi were a band's edges on every render. Sides follow the IMAGE: the eye on the image left is the subject's RIGHT eye; a mirrored still swaps them (gate-proven). THE MOUTH (AT44) is five landmarks -- labrale superius, stomion, labrale inferius, both cheilions -- found from the SEAM (a walk from the midline's deepest valley and the window's strongest valley path, each verified by the vermilion's hue on both sides) with every refusal named (PM_MW_*); pm_mouth_anchored runs it on canthi supplied from outside. THE REFEREE (AT31): pm_referee reads the OUTSIDE oracle rows (knowledge/refintake/<slug>.oracle: MediaPipe run outside the estate over the mirrored bytes, pixels x10) and scores every measured canthus as permil of the oracle's outer-canthal span (the field's NME shape), printing per still FOUND | PLACED-OFF | UNMEASURED | UNJUDGED with a partition that sums; since AT44 it scores the mouth too, both as the ruler places it and anchored on the oracle's canthi, each with its partition. LIB, no main. Composes nx_skinsample_lib (decoder, skin mask, colour helpers, fixed-point angle), nx_facefind_lib (boxes), nx_twincard_lib (card). license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 6 importers

nx_syscalls.nx nx_skinsample_lib.nx nx_facefind_lib.nx nx_png_decoder.nx nx_photomark_lib.nx nx_likeness_lib.nx nx_mediajudge_lib.nx nx_photomark.nx nx_photomark_gate.nx nx_skullskin_gate.nx nx_twinfit_lib.nx

imports: nx_syscalls.nxnx_skinsample_lib.nxnx_facefind_lib.nxnx_png_decoder.nx

imported by: nx_likeness_lib.nxnx_mediajudge_lib.nxnx_photomark.nxnx_photomark_gate.nxnx_skullskin_gate.nxnx_twinfit_lib.nx

structs

none

consts

31const PM_GRID: i64 = 96
32const PM_MIN_CELL: i64 = 2
33const PM_EYE_FINE_DIV: i64 = 3
34const PM_EYE_ZONE_TOP_PERMIL: i64 = 180
35const PM_EYE_ZONE_BOT_PERMIL: i64 = 580
36const PM_PAIR_TRIES: i64 = 4
37const PM_FISSURE_ASYM_PERMIL: i64 = 350
38const PM_TILT_MAX_RISE_PERMIL: i64 = 450
39const PM_ENDO_MIN_PERMIL: i64 = 600
40const PM_ENDO_MAX_X10: i64 = 25
41const PM_HEAD_TOP_PERMIL: i64 = 200
42const PM_HEAD_HEIGHT_X10: i64 = 15
43const PM_HEAD_HALFW_PERMIL: i64 = 750
44const PM_TOP_BLOBS: i64 = 6
45const PM_TB_FIELDS: i64 = 5
46const PM_PERMIL: i64 = 1000
47const PM_SKIN_CELL_PERMIL: i64 = 500
48const PM_MIN_FACE_CELLS: i64 = 16
49const PM_DARK_PERMIL: i64 = 600
50const PM_EYE_ZONE_PERMIL: i64 = 620
51const PM_PAIR_DY_PERMIL: i64 = 150
52const PM_PAIR_DX_LO_PERMIL: i64 = 180
53const PM_PAIR_DX_HI_PERMIL: i64 = 700
54const PM_EYE_MAXW_PERMIL: i64 = 450
55const PM_BROW_ASPECT_X10: i64 = 32
56const PM_SIZE_RATIO_MAX: i64 = 4
57const PM_MOUTH_Y_LO_PERMIL: i64 = 900
58const PM_MOUTH_Y_HI_PERMIL: i64 = 2000
59const PM_MOUTH_X_PAD_PERMIL: i64 = 400
64const PM_SEAM_PROBE_PERMIL: i64 = 32
65const PM_LIP_REACH_PERMIL: i64 = 300
69const PM_LIP_REACH_LOWER_PERMIL: i64 = 400
72const PM_SEAM_MIN_PERMIL: i64 = 300
73const PM_ROUND: i64 = 500
74const PM_DP_FROM_UP: i64 = 1 // the seam path's predecessor: the row above, the same row, the row below; 0 = the path starts here
75const PM_DP_FROM_SAME: i64 = 2
76const PM_DP_FROM_DOWN: i64 = 3
78const PM_SEAM_SEED_PERMIL: i64 = 125
81const PM_BIC_PARAMS_2: i64 = 3
82const PM_BIC_PARAMS_3: i64 = 5
83const PM_CHI1_MEDIAN_PERMIL: i64 = 455
84const PM_LN2_PERMIL: i64 = 693
85const PM_MAX_BLOBS: i64 = 64
86const PM_BLOB_FIELDS: i64 = 8
87const PM_B_CELLS: i64 = 0
88const PM_B_X0: i64 = 1
89const PM_B_Y0: i64 = 2
90const PM_B_X1: i64 = 3
91const PM_B_Y1: i64 = 4
92const PM_B_SUMX: i64 = 5
93const PM_B_SUMY: i64 = 6
94const PM_B_TOUCH: i64 = 7
95const PM_TEN: i64 = 10
96const PM_I64: i64 = 8
97const PM_BPP: i64 = 3
98const PM_BYTE: i64 = 255
99const PM_E5: i64 = 100000
100const PM_DP_UNREACHED: i64 = 0 - PM_E5 * PM_E5 // a seam path sum no pixel can reach: its depth per column is at most one byte
103const PM_EYE_WIDEN_PERMIL: i64 = 500
104const PM_EYE_BAND_TOP_PERMIL: i64 = 300
105const PM_EYE_BAND_BOT_PERMIL: i64 = 850
106const PM_ROUTE_NONE: i64 = 0
107const PM_ROUTE_SKIN: i64 = 1
108const PM_ROUTE_CASCADE: i64 = 2
109const PM_NME_FOUND_PERMIL: i64 = 100
112const PM_RS_ROWS: i64 = 0
113const PM_RS_JUDGED: i64 = 1
114const PM_RS_UNJUDGED: i64 = 2
115const PM_RS_FOUND: i64 = 3
116const PM_RS_PLACED_OFF: i64 = 4
117const PM_RS_UNMEASURED: i64 = 5
118const PM_RS_UNREADABLE: i64 = 6
119const PM_RS_NME_MEAN_FOUND: i64 = 7
120const PM_RS_TILT_HITS: i64 = 8
121const PM_RS_LAST_NME_MAX: i64 = 9
122const PM_RS_LAST_NME_MEAN: i64 = 10
125const PM_RS_LIP_FOUND: i64 = 11
126const PM_RS_LIP_PLACED_OFF: i64 = 12
127const PM_RS_LIP_UNMEASURED: i64 = 13
128const PM_RS_LIP_NME_MEAN_MEASURED: i64 = 14
129const PM_RS_LAST_LIP_NME_MAX: i64 = 15
130const PM_RS_NME_RLAT_MEASURED: i64 = 16
131const PM_RS_NME_RMED_MEASURED: i64 = 17
132const PM_RS_NME_LMED_MEASURED: i64 = 18
133const PM_RS_NME_LLAT_MEASURED: i64 = 19
134const PM_RS_MEASURED: i64 = 20
135const PM_RS_LIP_MEASURED: i64 = 21
136const PM_RS_LIP_RATIO_ERR_MEAN: i64 = 22
137const PM_RS_LAST_LIP_RATIO: i64 = 23
139const PM_RS_ANCH_FOUND: i64 = 24
140const PM_RS_ANCH_OFF: i64 = 25
141const PM_RS_ANCH_UNMEASURED: i64 = 26
142const PM_RS_ANCH_NME_MEAN: i64 = 27
143const PM_RS_ANCH_RATIO_ERR: i64 = 28
144const PM_RS_LAST_ANCH_NME_MAX: i64 = 29
145const PM_RS_N: i64 = 30
147const PM_LA_NME_SUM: i64 = 0
148const PM_LA_RATIO_ERR_SUM: i64 = 1
149const PM_LA_FOUND: i64 = 2
150const PM_LA_OFF: i64 = 3
151const PM_LA_UNMEASURED: i64 = 4
152const PM_LA_N: i64 = 5
153const PM_LIPV_UNMEASURED: i64 = 0
154const PM_LIPV_FOUND: i64 = 1
155const PM_LIPV_OFF: i64 = 2
156const PM_TILT_TOL_DEG10: i64 = 20
159const PM_Y_ERR_PX: i64 = 2
160const PM_TILT_ERR_MAX_DEG10: i64 = 30
161const PM_ORACLE_X10: i64 = 10
162const PM_ORACLE_FIELDS: i64 = 27
163const PM_OF_FILE: i64 = 1
164const PM_OF_FACES: i64 = 5
165const PM_OF_RLAT: i64 = 6
166const PM_OF_RMED: i64 = 7
167const PM_OF_LMED: i64 = 8
168const PM_OF_LLAT: i64 = 9
169const PM_OF_ULIP_TOP: i64 = 10
170const PM_OF_ULIP_IN: i64 = 11
171const PM_OF_LLIP_IN: i64 = 12
172const PM_OF_LLIP_BOT: i64 = 13
173const PM_OF_MOUTH_R: i64 = 14 // the image-left commissure
174const PM_OF_MOUTH_L: i64 = 15
175const PM_OF_LIP: i64 = 25 // lip_permil: (ulip_in - ulip_top) over (llip_bot - llip_in), each vermilion to its OWN inner edge
176const PM_OF_EXO: i64 = 26 // exo_px; 25 is lip_permil -- the referee normalised every NME by the LIP RATIO until 2026-09-17
177const PM_PIPE: i64 = 124
178const PM_COMMA: i64 = 44
179const PM_NL: i64 = 10
180const PM_HASH: i64 = 35
181const PM_MINUS: i64 = 45
182const PM_D0: i64 = 48
183const PM_D9: i64 = 57
184const PM_PATHB: i64 = 1024
185const PM_ROWB: i64 = 4096
186const PM_DEFAULT_DIR: *u8 = "knowledge/fetched/"
188const PM_R_FACE: i64 = 0
189const PM_R_FX0: i64 = 1
190const PM_R_FY0: i64 = 2
191const PM_R_FX1: i64 = 3
192const PM_R_FY1: i64 = 4
193const PM_R_FACE_CELLS: i64 = 5
194const PM_R_EYES: i64 = 6
195const PM_R_RLAT_X: i64 = 7
196const PM_R_RLAT_Y: i64 = 8
197const PM_R_RMED_X: i64 = 9
198const PM_R_RMED_Y: i64 = 10
199const PM_R_LMED_X: i64 = 11
200const PM_R_LMED_Y: i64 = 12
201const PM_R_LLAT_X: i64 = 13
202const PM_R_LLAT_Y: i64 = 14
203const PM_R_TILT_R: i64 = 15
204const PM_R_TILT_L: i64 = 16
205const PM_R_ICI: i64 = 17
206const PM_R_ICF: i64 = 18
207const PM_R_EYE_PIX_R: i64 = 19
208const PM_R_EYE_PIX_L: i64 = 20
209const PM_R_MOUTH: i64 = 21
210const PM_R_MX0: i64 = 22
211const PM_R_MY0: i64 = 23
212const PM_R_MX1: i64 = 24
213const PM_R_MY1: i64 = 25
214const PM_R_STOMION_Y: i64 = 26
215const PM_R_LIP: i64 = 27
216const PM_R_MOUTH_PIX: i64 = 28
217const PM_R_CELL: i64 = 29
218const PM_R_BLOBS: i64 = 30
219const PM_R_BLOBS_CAPPED: i64 = 31
220const PM_R_W: i64 = 32
221const PM_R_H: i64 = 33
222const PM_R_HX0: i64 = 34
223const PM_R_HY0: i64 = 35
224const PM_R_HX1: i64 = 36
225const PM_R_HY1: i64 = 37
226const PM_R_TB: i64 = 38
227const PM_R_ROUTE: i64 = 68
228const PM_R_FVOTES: i64 = 69
229const PM_R_ROLL: i64 = 70
230const PM_R_TILT_R_RAW: i64 = 71
231const PM_R_TILT_L_RAW: i64 = 72
232const PM_R_PAIR_FAIL: i64 = 73
233const PM_R_EYE_VOTES_R: i64 = 74
234const PM_R_EYE_VOTES_L: i64 = 75
235const PM_R_EX0: i64 = 76
236const PM_R_EY0: i64 = 77
237const PM_R_EX1: i64 = 78
238const PM_R_EY1: i64 = 79
239const PM_R_LX0: i64 = 80
240const PM_R_LY0: i64 = 81
241const PM_R_LX1: i64 = 82
242const PM_R_LY1: i64 = 83
243const PM_R_FISSURE_R: i64 = 84
244const PM_R_FISSURE_L: i64 = 85
245const PM_R_TILT_ERR: i64 = 86
246const PM_R_TILT_OK: i64 = 87
247const PM_R_CODEC: i64 = 88
250const PM_R_LS_X: i64 = 89
251const PM_R_LS_Y: i64 = 90
252const PM_R_STO_X: i64 = 91
253const PM_R_STO_Y: i64 = 92
254const PM_R_LI_X: i64 = 93
255const PM_R_LI_Y: i64 = 94
256const PM_R_CHR_X: i64 = 95
257const PM_R_CHR_Y: i64 = 96
258const PM_R_CHL_X: i64 = 97
259const PM_R_CHL_Y: i64 = 98
260const PM_R_MOUTH_WHY: i64 = 99 // why the mouth is (not) measured: PM_MW_* by name
261const PM_R_SEAM_PROBE: i64 = 100 // the seam probe's reach in pixels, derived from the eye span
262const PM_R_SEAM_STRENGTH: i64 = 101 // the seam path's summed valley depth
263const PM_R_LIP_REACH: i64 = 102 // the vermilion search's reach from the seam, pixels
264const PM_R_SEAM_FLOOR: i64 = 103 // the valley depth a column beside the mouth offers: the seam path counts only depth above it
265const PM_R_SEAM_HYP: i64 = 104 // which seam finder the mouth rests on: PM_SEAM_HYP_WALK or PM_SEAM_HYP_GLOBAL
266const PM_R_PINNED: i64 = 105 // the canthi whose fissure ran onto its window's side (PM_PIN_* bits); any makes the pair PM_PF_PINNED
267const PM_R_EYE_WX0: i64 = 106 // the fissure windows: image-left eye x0..x1, image-right eye x0..x1 (the rows are the eye bands)
268const PM_R_EYE_WX1: i64 = 107
269const PM_R_EYE_LWX0: i64 = 108
270const PM_R_EYE_LWX1: i64 = 109
271const PM_R_LIP_REACH_LO: i64 = 110 // the lower vermilion search's reach from the seam, pixels
272const PM_R_N: i64 = 111
273const PM_SEAM_HYP_WALK: i64 = 1
274const PM_SEAM_HYP_GLOBAL: i64 = 2
275const PM_VALLEY_SPAN: i64 = PM_BYTE + PM_BYTE // a valley depth is a luma difference, -255..255: the histogram's bins
277const PM_MW_OK: i64 = 0
278const PM_MW_NO_WINDOW: i64 = 1 // the window below the eyes has no rows or no columns inside the frame
279const PM_MW_NO_SEAM: i64 = 2 // no horizontal valley line inside the window
280const PM_MW_SEAM_PINNED: i64 = 3 // the seam runs onto the window's side: its end is the window, not a commissure
281const PM_MW_BORDER_PINNED: i64 = 4 // a vermilion change lands on its search's far end: the reach, not a border
282const PM_MW_NO_LIP: i64 = 5 // no colour change between the seam and one lip height on a side
283const PM_MW_SEAM_SHORT: i64 = 6 // the valley line is no longer than one lip reach: too short to be a mouth
286const PM_CODEC_NONE: i64 = 0
287const PM_CODEC_JPEG: i64 = 1
288const PM_CODEC_PNG: i64 = 2
289const PM_PNG_SIG0: i64 = 137
290const PM_PNG_DEPTH: i64 = 8
291const PM_CH_GRAY: i64 = 1
292const PM_CH_RGB: i64 = 3
293const PM_CH_RGBA: i64 = 4
294const PM_RGB_BPP: i64 = 3
295const PM_OK: i64 = 0
296const PM_E_READ: i64 = 0 - 1
297const PM_E_DECODE: i64 = 0 - 2
298const PM_E_NOFACE: i64 = 0 - 3
299const PM_E_NOEYES: i64 = 0 - 4
300const PM_E_EXISTS: i64 = 0 - 5
301const PM_PF_NONE: i64 = 0
302const PM_PF_EMPTY: i64 = 1
303const PM_PF_NARROW: i64 = 2
304const PM_PF_ASYM: i64 = 3
305const PM_PF_TILT: i64 = 4
306const PM_PF_ENDO: i64 = 5
307const PM_PF_ORDER: i64 = 6
308const PM_PF_PINNED: i64 = 7 // a fissure runs onto its window's side: that canthus is the window, not a landmark
309const PM_EYE_ROWS_PAD: i64 = 3 // the skin route's fissure rows: the blob's rows plus one fine cell above and two below
310const PM_CANTHI_XY: i64 = 8 // four canthi, x and y each, in the result's order (PM_R_RLAT_X .. PM_R_LLAT_Y)
314const PM_FIS_REACH: i64 = 2
316const PM_FIS_LX: i64 = 0
317const PM_FIS_LY: i64 = 1
318const PM_FIS_RX: i64 = 2
319const PM_FIS_RY: i64 = 3
320const PM_FIS_COUNT: i64 = 4
321const PM_FIS_PIN_L: i64 = 5
322const PM_FIS_PIN_R: i64 = 6
323const PM_FIS_N: i64 = 7
325const PM_PIN_RLAT: i64 = 1
326const PM_PIN_RMED: i64 = 2
327const PM_PIN_LMED: i64 = 4
328const PM_PIN_LLAT: i64 = 8
329const PM_SIDE_L: *u8 = "L"
330const PM_SIDE_R: *u8 = "R"
331const PM_SIDE_C: *u8 = "C"
332const PM_METHOD: *u8 = "measured"

functions

334func pm_ruler_version() -> i64 { return 3 } // 3: AT44, the mouth from its seam and the fissure grown from its pupil
335func pm_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
336func pm_max(a: i64, b: i64) -> i64 { if a > b { return a } return b }
337func pm_min(a: i64, b: i64) -> i64 { if a < b { return a } return b }
339func pm_isqrt(v: i64) -> i64
346func pm_dist(x0: i64, y0: i64, x1: i64, y1: i64) -> i64
352func pm_luma(r: i64, g: i64, b: i64) -> i64 { return (SKS_YCC_Y_R * r + SKS_YCC_Y_G * g + SKS_YCC_Y_B * b) / SKS_E5 }
353func pm_luma_at(rgb: *u8, w: i64, x: i64, y: i64) -> i64
358func pm_canthal_tilt(rise: i64, run: i64) -> i64
367func pm_largest_component(mask: *u8, gw: i64, gh: i64, label: *u8, bb: *i64) -> i64
called by 1: pm_landmarks calls 1: sys_mmap
416func pm_blobs(mask: *u8, gw: i64, gh: i64, rx0: i64, ry0: i64, rx1: i64, ry1: i64, blobs: *i64, cap: i64, capped: *i64) -> i64
called by 1: pm_landmarks calls 1: sys_mmap
489func pm_eye_fissure(rgb: *u8, w: i64, h: i64, sx0: i64, sy0: i64, sx1: i64, sy1: i64, wx0: i64, wy0: i64, wx1: i64, wy1: i64, rad: i64, out7: *i64) -> i64
594func pm_pair_check(res: *i64) -> i64
612func pm_axes(res: *i64) -> i64
632func pm_mouth_why_name(k: i64) -> *u8
642func pm_band_rgb(rgb: *u8, w: i64, x0: i64, x1: i64, y: i64, out3: *i64) -> i64
called by 1: pm_band_profile calls 2: pm_maxpm_min
662func pm_hue_deg10(ctx: *i64, r: i64, g: i64, b: i64) -> i64
670func pm_chroma(r: i64, g: i64, b: i64) -> i64 { return pm_max(pm_max(r, g), b) - pm_min(pm_min(r, g), b) }
called by 1: pm_band_profile calls 2: pm_maxpm_min
672func pm_seam_v(rgb: *u8, w: i64, x: i64, y: i64, d: i64, floor_v: i64) -> i64
683func pm_seam_half(rgb: *u8, w: i64, mx0: i64, cols: i64, ya: i64, rows: i64, d: i64, floor_v: i64, sc: i64, sr: i64, dir: i64, slope_num: i64, slope_den: i64, prow: *i64, sum_out: *i64) -> i64
called by 1: pm_mouth calls 1: pm_seam_v
723func pm_seg_cost(pw: *i64, pv: *i64, pvv: *i64, a: i64, b: i64) -> i64
called by 1: pm_first_border
729func pm_seg_mean(pw: *i64, pv: *i64, a: i64, b: i64) -> i64 { return (pv[b] - pv[a]) / pm_max(pw[b] - pw[a], 1) }
called by 1: pm_first_border calls 1: pm_max
731func pm_ln_permil(n: i64) -> i64
called by 1: pm_first_border
747func pm_first_border(v: *i64, wt: *i64, n: i64, seam_first: i64, out3: *i64) -> i64
822func pm_band_profile(ctx: *i64, rgb: *u8, w: i64, x0: i64, x1: i64, y0: i64, n: i64, hv: *i64, wt: *i64) -> i64
839func pm_seam_global(rgb: *u8, w: i64, mx0: i64, cols: i64, ya: i64, rows: i64, d: i64, floor_v: i64, prow: *i64, se: *i64) -> i64
called by 1: pm_mouth calls 2: sys_mmappm_seam_v
882func pm_mouth_hypothesis(rgb: *u8, w: i64, h: i64, hr: *i64, mx0: i64, ya: i64, cols: i64, prow: *i64, xs: i64, xe: i64, d: i64, reach: i64, reach_lo: i64, ipd: i64, ctx: *i64) -> i64
951func pm_mouth_copy(dst: *i64, src: *i64) -> i64
called by 1: pm_mouth
981func pm_mouth(rgb: *u8, w: i64, h: i64, res: *i64) -> i64
1117func pm_landmarks(rgb: *u8, w: i64, h: i64, res: *i64) -> i64
1416func pm_landmarks_cascade(rgb: *u8, w: i64, h: i64, res: *i64, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64
1489func pm_landmarks_auto(rgb: *u8, w: i64, h: i64, res: *i64, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64
1502func pm_landmarks_file(path: *u8, res: *i64) -> i64
1508func pm_png_rgb(px: *u8, w: i64, h: i64, ch: i64) -> *u8
called by 2: pm_decode_filetg_png_rgb calls 1: sys_mmap
1531func pm_decode_file(path: *u8, pix: *i64, out3: *i64) -> i64
1568func pm_landmarks_file_auto(path: *u8, res: *i64, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64
1581func pm_mouth_anchored(rgb: *u8, w: i64, h: i64, canthi8: *i64, res: *i64) -> i64
1592func pm_span_int(buf: *u8, s: i64, e: i64, out: *i64) -> i64
1612func pm_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *i64) -> i64
1629func pm_field_xy(buf: *u8, ls: i64, le: i64, idx: i64, out: *i64) -> i64
1642func pm_field_int(buf: *u8, ls: i64, le: i64, idx: i64) -> i64
1649func pm_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
1650func pm_putn(v: i64) -> i64
called by 1: pm_kv calls 2: sys_mmapsys_write
1666func pm_kv(k: *u8, v: i64) -> i64 { pm_puts(k); pm_putn(v); return 0 }
1667func pm_putspan(buf: *u8, s: i64, e: i64) -> i64 { if e > s { sys_write(1, (buf as i64 + s) as *u8, e - s) } return 0 }
called by 1: pm_referee_sum calls 1: sys_write
1669func pm_nme(ox: i64, oy: i64, mx: i64, my: i64, exo: i64) -> i64 { return pm_dist(ox, oy, mx, my) * PM_PERMIL / pm_max(exo, 1) }
1675func pm_lip_score(buf: *u8, ls: i64, le: i64, res: *i64, exo: i64, prefix: *u8, lacc: *i64, lout: *i64, olt: *i64, oui: *i64, oli: *i64, olb: *i64, omr: *i64, oml: *i64) -> i64
1711func pm_referee_sum(oracle_path: *u8, dir: *u8, face_c: *HaarCascade, eye_c: *HaarCascade, sum: *i64) -> i64
1864func pm_referee(oracle_path: *u8, dir: *u8, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64
called by 1: main calls 2: sys_mmappm_referee_sum
1869func pm_row(out: *u8, section: *u8, id: *u8, side: *u8, value: i64, refkey: *u8, when: *u8) -> i64
called by 1: pm_card_write
1888func pm_row_exists(card: *u8, n: i64, section: *u8, id: *u8, side: *u8) -> i64
1897func pm_card_write(slug: *u8, refkey: *u8, when: *u8, res: *i64) -> i64