nx_photomark_lib.nx
buildroot/runtime/nx_photomark_lib.nx
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
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
| 31 | const PM_GRID: i64 = 96 |
| 32 | const PM_MIN_CELL: i64 = 2 |
| 33 | const PM_EYE_FINE_DIV: i64 = 3 |
| 34 | const PM_EYE_ZONE_TOP_PERMIL: i64 = 180 |
| 35 | const PM_EYE_ZONE_BOT_PERMIL: i64 = 580 |
| 36 | const PM_PAIR_TRIES: i64 = 4 |
| 37 | const PM_FISSURE_ASYM_PERMIL: i64 = 350 |
| 38 | const PM_TILT_MAX_RISE_PERMIL: i64 = 450 |
| 39 | const PM_ENDO_MIN_PERMIL: i64 = 600 |
| 40 | const PM_ENDO_MAX_X10: i64 = 25 |
| 41 | const PM_HEAD_TOP_PERMIL: i64 = 200 |
| 42 | const PM_HEAD_HEIGHT_X10: i64 = 15 |
| 43 | const PM_HEAD_HALFW_PERMIL: i64 = 750 |
| 44 | const PM_TOP_BLOBS: i64 = 6 |
| 45 | const PM_TB_FIELDS: i64 = 5 |
| 46 | const PM_PERMIL: i64 = 1000 |
| 47 | const PM_SKIN_CELL_PERMIL: i64 = 500 |
| 48 | const PM_MIN_FACE_CELLS: i64 = 16 |
| 49 | const PM_DARK_PERMIL: i64 = 600 |
| 50 | const PM_EYE_ZONE_PERMIL: i64 = 620 |
| 51 | const PM_PAIR_DY_PERMIL: i64 = 150 |
| 52 | const PM_PAIR_DX_LO_PERMIL: i64 = 180 |
| 53 | const PM_PAIR_DX_HI_PERMIL: i64 = 700 |
| 54 | const PM_EYE_MAXW_PERMIL: i64 = 450 |
| 55 | const PM_BROW_ASPECT_X10: i64 = 32 |
| 56 | const PM_SIZE_RATIO_MAX: i64 = 4 |
| 57 | const PM_MOUTH_Y_LO_PERMIL: i64 = 900 |
| 58 | const PM_MOUTH_Y_HI_PERMIL: i64 = 2000 |
| 59 | const PM_MOUTH_X_PAD_PERMIL: i64 = 400 |
| 64 | const PM_SEAM_PROBE_PERMIL: i64 = 32 |
| 65 | const PM_LIP_REACH_PERMIL: i64 = 300 |
| 69 | const PM_LIP_REACH_LOWER_PERMIL: i64 = 400 |
| 72 | const PM_SEAM_MIN_PERMIL: i64 = 300 |
| 73 | const PM_ROUND: i64 = 500 |
| 74 | const 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 |
| 75 | const PM_DP_FROM_SAME: i64 = 2 |
| 76 | const PM_DP_FROM_DOWN: i64 = 3 |
| 78 | const PM_SEAM_SEED_PERMIL: i64 = 125 |
| 81 | const PM_BIC_PARAMS_2: i64 = 3 |
| 82 | const PM_BIC_PARAMS_3: i64 = 5 |
| 83 | const PM_CHI1_MEDIAN_PERMIL: i64 = 455 |
| 84 | const PM_LN2_PERMIL: i64 = 693 |
| 85 | const PM_MAX_BLOBS: i64 = 64 |
| 86 | const PM_BLOB_FIELDS: i64 = 8 |
| 87 | const PM_B_CELLS: i64 = 0 |
| 88 | const PM_B_X0: i64 = 1 |
| 89 | const PM_B_Y0: i64 = 2 |
| 90 | const PM_B_X1: i64 = 3 |
| 91 | const PM_B_Y1: i64 = 4 |
| 92 | const PM_B_SUMX: i64 = 5 |
| 93 | const PM_B_SUMY: i64 = 6 |
| 94 | const PM_B_TOUCH: i64 = 7 |
| 95 | const PM_TEN: i64 = 10 |
| 96 | const PM_I64: i64 = 8 |
| 97 | const PM_BPP: i64 = 3 |
| 98 | const PM_BYTE: i64 = 255 |
| 99 | const PM_E5: i64 = 100000 |
| 100 | const 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 |
| 103 | const PM_EYE_WIDEN_PERMIL: i64 = 500 |
| 104 | const PM_EYE_BAND_TOP_PERMIL: i64 = 300 |
| 105 | const PM_EYE_BAND_BOT_PERMIL: i64 = 850 |
| 106 | const PM_ROUTE_NONE: i64 = 0 |
| 107 | const PM_ROUTE_SKIN: i64 = 1 |
| 108 | const PM_ROUTE_CASCADE: i64 = 2 |
| 109 | const PM_NME_FOUND_PERMIL: i64 = 100 |
| 112 | const PM_RS_ROWS: i64 = 0 |
| 113 | const PM_RS_JUDGED: i64 = 1 |
| 114 | const PM_RS_UNJUDGED: i64 = 2 |
| 115 | const PM_RS_FOUND: i64 = 3 |
| 116 | const PM_RS_PLACED_OFF: i64 = 4 |
| 117 | const PM_RS_UNMEASURED: i64 = 5 |
| 118 | const PM_RS_UNREADABLE: i64 = 6 |
| 119 | const PM_RS_NME_MEAN_FOUND: i64 = 7 |
| 120 | const PM_RS_TILT_HITS: i64 = 8 |
| 121 | const PM_RS_LAST_NME_MAX: i64 = 9 |
| 122 | const PM_RS_LAST_NME_MEAN: i64 = 10 |
| 125 | const PM_RS_LIP_FOUND: i64 = 11 |
| 126 | const PM_RS_LIP_PLACED_OFF: i64 = 12 |
| 127 | const PM_RS_LIP_UNMEASURED: i64 = 13 |
| 128 | const PM_RS_LIP_NME_MEAN_MEASURED: i64 = 14 |
| 129 | const PM_RS_LAST_LIP_NME_MAX: i64 = 15 |
| 130 | const PM_RS_NME_RLAT_MEASURED: i64 = 16 |
| 131 | const PM_RS_NME_RMED_MEASURED: i64 = 17 |
| 132 | const PM_RS_NME_LMED_MEASURED: i64 = 18 |
| 133 | const PM_RS_NME_LLAT_MEASURED: i64 = 19 |
| 134 | const PM_RS_MEASURED: i64 = 20 |
| 135 | const PM_RS_LIP_MEASURED: i64 = 21 |
| 136 | const PM_RS_LIP_RATIO_ERR_MEAN: i64 = 22 |
| 137 | const PM_RS_LAST_LIP_RATIO: i64 = 23 |
| 139 | const PM_RS_ANCH_FOUND: i64 = 24 |
| 140 | const PM_RS_ANCH_OFF: i64 = 25 |
| 141 | const PM_RS_ANCH_UNMEASURED: i64 = 26 |
| 142 | const PM_RS_ANCH_NME_MEAN: i64 = 27 |
| 143 | const PM_RS_ANCH_RATIO_ERR: i64 = 28 |
| 144 | const PM_RS_LAST_ANCH_NME_MAX: i64 = 29 |
| 145 | const PM_RS_N: i64 = 30 |
| 147 | const PM_LA_NME_SUM: i64 = 0 |
| 148 | const PM_LA_RATIO_ERR_SUM: i64 = 1 |
| 149 | const PM_LA_FOUND: i64 = 2 |
| 150 | const PM_LA_OFF: i64 = 3 |
| 151 | const PM_LA_UNMEASURED: i64 = 4 |
| 152 | const PM_LA_N: i64 = 5 |
| 153 | const PM_LIPV_UNMEASURED: i64 = 0 |
| 154 | const PM_LIPV_FOUND: i64 = 1 |
| 155 | const PM_LIPV_OFF: i64 = 2 |
| 156 | const PM_TILT_TOL_DEG10: i64 = 20 |
| 159 | const PM_Y_ERR_PX: i64 = 2 |
| 160 | const PM_TILT_ERR_MAX_DEG10: i64 = 30 |
| 161 | const PM_ORACLE_X10: i64 = 10 |
| 162 | const PM_ORACLE_FIELDS: i64 = 27 |
| 163 | const PM_OF_FILE: i64 = 1 |
| 164 | const PM_OF_FACES: i64 = 5 |
| 165 | const PM_OF_RLAT: i64 = 6 |
| 166 | const PM_OF_RMED: i64 = 7 |
| 167 | const PM_OF_LMED: i64 = 8 |
| 168 | const PM_OF_LLAT: i64 = 9 |
| 169 | const PM_OF_ULIP_TOP: i64 = 10 |
| 170 | const PM_OF_ULIP_IN: i64 = 11 |
| 171 | const PM_OF_LLIP_IN: i64 = 12 |
| 172 | const PM_OF_LLIP_BOT: i64 = 13 |
| 173 | const PM_OF_MOUTH_R: i64 = 14 // the image-left commissure |
| 174 | const PM_OF_MOUTH_L: i64 = 15 |
| 175 | const PM_OF_LIP: i64 = 25 // lip_permil: (ulip_in - ulip_top) over (llip_bot - llip_in), each vermilion to its OWN inner edge |
| 176 | const PM_OF_EXO: i64 = 26 // exo_px; 25 is lip_permil -- the referee normalised every NME by the LIP RATIO until 2026-09-17 |
| 177 | const PM_PIPE: i64 = 124 |
| 178 | const PM_COMMA: i64 = 44 |
| 179 | const PM_NL: i64 = 10 |
| 180 | const PM_HASH: i64 = 35 |
| 181 | const PM_MINUS: i64 = 45 |
| 182 | const PM_D0: i64 = 48 |
| 183 | const PM_D9: i64 = 57 |
| 184 | const PM_PATHB: i64 = 1024 |
| 185 | const PM_ROWB: i64 = 4096 |
| 186 | const PM_DEFAULT_DIR: *u8 = "knowledge/fetched/" |
| 188 | const PM_R_FACE: i64 = 0 |
| 189 | const PM_R_FX0: i64 = 1 |
| 190 | const PM_R_FY0: i64 = 2 |
| 191 | const PM_R_FX1: i64 = 3 |
| 192 | const PM_R_FY1: i64 = 4 |
| 193 | const PM_R_FACE_CELLS: i64 = 5 |
| 194 | const PM_R_EYES: i64 = 6 |
| 195 | const PM_R_RLAT_X: i64 = 7 |
| 196 | const PM_R_RLAT_Y: i64 = 8 |
| 197 | const PM_R_RMED_X: i64 = 9 |
| 198 | const PM_R_RMED_Y: i64 = 10 |
| 199 | const PM_R_LMED_X: i64 = 11 |
| 200 | const PM_R_LMED_Y: i64 = 12 |
| 201 | const PM_R_LLAT_X: i64 = 13 |
| 202 | const PM_R_LLAT_Y: i64 = 14 |
| 203 | const PM_R_TILT_R: i64 = 15 |
| 204 | const PM_R_TILT_L: i64 = 16 |
| 205 | const PM_R_ICI: i64 = 17 |
| 206 | const PM_R_ICF: i64 = 18 |
| 207 | const PM_R_EYE_PIX_R: i64 = 19 |
| 208 | const PM_R_EYE_PIX_L: i64 = 20 |
| 209 | const PM_R_MOUTH: i64 = 21 |
| 210 | const PM_R_MX0: i64 = 22 |
| 211 | const PM_R_MY0: i64 = 23 |
| 212 | const PM_R_MX1: i64 = 24 |
| 213 | const PM_R_MY1: i64 = 25 |
| 214 | const PM_R_STOMION_Y: i64 = 26 |
| 215 | const PM_R_LIP: i64 = 27 |
| 216 | const PM_R_MOUTH_PIX: i64 = 28 |
| 217 | const PM_R_CELL: i64 = 29 |
| 218 | const PM_R_BLOBS: i64 = 30 |
| 219 | const PM_R_BLOBS_CAPPED: i64 = 31 |
| 220 | const PM_R_W: i64 = 32 |
| 221 | const PM_R_H: i64 = 33 |
| 222 | const PM_R_HX0: i64 = 34 |
| 223 | const PM_R_HY0: i64 = 35 |
| 224 | const PM_R_HX1: i64 = 36 |
| 225 | const PM_R_HY1: i64 = 37 |
| 226 | const PM_R_TB: i64 = 38 |
| 227 | const PM_R_ROUTE: i64 = 68 |
| 228 | const PM_R_FVOTES: i64 = 69 |
| 229 | const PM_R_ROLL: i64 = 70 |
| 230 | const PM_R_TILT_R_RAW: i64 = 71 |
| 231 | const PM_R_TILT_L_RAW: i64 = 72 |
| 232 | const PM_R_PAIR_FAIL: i64 = 73 |
| 233 | const PM_R_EYE_VOTES_R: i64 = 74 |
| 234 | const PM_R_EYE_VOTES_L: i64 = 75 |
| 235 | const PM_R_EX0: i64 = 76 |
| 236 | const PM_R_EY0: i64 = 77 |
| 237 | const PM_R_EX1: i64 = 78 |
| 238 | const PM_R_EY1: i64 = 79 |
| 239 | const PM_R_LX0: i64 = 80 |
| 240 | const PM_R_LY0: i64 = 81 |
| 241 | const PM_R_LX1: i64 = 82 |
| 242 | const PM_R_LY1: i64 = 83 |
| 243 | const PM_R_FISSURE_R: i64 = 84 |
| 244 | const PM_R_FISSURE_L: i64 = 85 |
| 245 | const PM_R_TILT_ERR: i64 = 86 |
| 246 | const PM_R_TILT_OK: i64 = 87 |
| 247 | const PM_R_CODEC: i64 = 88 |
| 250 | const PM_R_LS_X: i64 = 89 |
| 251 | const PM_R_LS_Y: i64 = 90 |
| 252 | const PM_R_STO_X: i64 = 91 |
| 253 | const PM_R_STO_Y: i64 = 92 |
| 254 | const PM_R_LI_X: i64 = 93 |
| 255 | const PM_R_LI_Y: i64 = 94 |
| 256 | const PM_R_CHR_X: i64 = 95 |
| 257 | const PM_R_CHR_Y: i64 = 96 |
| 258 | const PM_R_CHL_X: i64 = 97 |
| 259 | const PM_R_CHL_Y: i64 = 98 |
| 260 | const PM_R_MOUTH_WHY: i64 = 99 // why the mouth is (not) measured: PM_MW_* by name |
| 261 | const PM_R_SEAM_PROBE: i64 = 100 // the seam probe's reach in pixels, derived from the eye span |
| 262 | const PM_R_SEAM_STRENGTH: i64 = 101 // the seam path's summed valley depth |
| 263 | const PM_R_LIP_REACH: i64 = 102 // the vermilion search's reach from the seam, pixels |
| 264 | const PM_R_SEAM_FLOOR: i64 = 103 // the valley depth a column beside the mouth offers: the seam path counts only depth above it |
| 265 | const PM_R_SEAM_HYP: i64 = 104 // which seam finder the mouth rests on: PM_SEAM_HYP_WALK or PM_SEAM_HYP_GLOBAL |
| 266 | const 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 |
| 267 | const 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) |
| 268 | const PM_R_EYE_WX1: i64 = 107 |
| 269 | const PM_R_EYE_LWX0: i64 = 108 |
| 270 | const PM_R_EYE_LWX1: i64 = 109 |
| 271 | const PM_R_LIP_REACH_LO: i64 = 110 // the lower vermilion search's reach from the seam, pixels |
| 272 | const PM_R_N: i64 = 111 |
| 273 | const PM_SEAM_HYP_WALK: i64 = 1 |
| 274 | const PM_SEAM_HYP_GLOBAL: i64 = 2 |
| 275 | const PM_VALLEY_SPAN: i64 = PM_BYTE + PM_BYTE // a valley depth is a luma difference, -255..255: the histogram's bins |
| 277 | const PM_MW_OK: i64 = 0 |
| 278 | const PM_MW_NO_WINDOW: i64 = 1 // the window below the eyes has no rows or no columns inside the frame |
| 279 | const PM_MW_NO_SEAM: i64 = 2 // no horizontal valley line inside the window |
| 280 | const PM_MW_SEAM_PINNED: i64 = 3 // the seam runs onto the window's side: its end is the window, not a commissure |
| 281 | const PM_MW_BORDER_PINNED: i64 = 4 // a vermilion change lands on its search's far end: the reach, not a border |
| 282 | const PM_MW_NO_LIP: i64 = 5 // no colour change between the seam and one lip height on a side |
| 283 | const PM_MW_SEAM_SHORT: i64 = 6 // the valley line is no longer than one lip reach: too short to be a mouth |
| 286 | const PM_CODEC_NONE: i64 = 0 |
| 287 | const PM_CODEC_JPEG: i64 = 1 |
| 288 | const PM_CODEC_PNG: i64 = 2 |
| 289 | const PM_PNG_SIG0: i64 = 137 |
| 290 | const PM_PNG_DEPTH: i64 = 8 |
| 291 | const PM_CH_GRAY: i64 = 1 |
| 292 | const PM_CH_RGB: i64 = 3 |
| 293 | const PM_CH_RGBA: i64 = 4 |
| 294 | const PM_RGB_BPP: i64 = 3 |
| 295 | const PM_OK: i64 = 0 |
| 296 | const PM_E_READ: i64 = 0 - 1 |
| 297 | const PM_E_DECODE: i64 = 0 - 2 |
| 298 | const PM_E_NOFACE: i64 = 0 - 3 |
| 299 | const PM_E_NOEYES: i64 = 0 - 4 |
| 300 | const PM_E_EXISTS: i64 = 0 - 5 |
| 301 | const PM_PF_NONE: i64 = 0 |
| 302 | const PM_PF_EMPTY: i64 = 1 |
| 303 | const PM_PF_NARROW: i64 = 2 |
| 304 | const PM_PF_ASYM: i64 = 3 |
| 305 | const PM_PF_TILT: i64 = 4 |
| 306 | const PM_PF_ENDO: i64 = 5 |
| 307 | const PM_PF_ORDER: i64 = 6 |
| 308 | const PM_PF_PINNED: i64 = 7 // a fissure runs onto its window's side: that canthus is the window, not a landmark |
| 309 | const PM_EYE_ROWS_PAD: i64 = 3 // the skin route's fissure rows: the blob's rows plus one fine cell above and two below |
| 310 | const PM_CANTHI_XY: i64 = 8 // four canthi, x and y each, in the result's order (PM_R_RLAT_X .. PM_R_LLAT_Y) |
| 314 | const PM_FIS_REACH: i64 = 2 |
| 316 | const PM_FIS_LX: i64 = 0 |
| 317 | const PM_FIS_LY: i64 = 1 |
| 318 | const PM_FIS_RX: i64 = 2 |
| 319 | const PM_FIS_RY: i64 = 3 |
| 320 | const PM_FIS_COUNT: i64 = 4 |
| 321 | const PM_FIS_PIN_L: i64 = 5 |
| 322 | const PM_FIS_PIN_R: i64 = 6 |
| 323 | const PM_FIS_N: i64 = 7 |
| 325 | const PM_PIN_RLAT: i64 = 1 |
| 326 | const PM_PIN_RMED: i64 = 2 |
| 327 | const PM_PIN_LMED: i64 = 4 |
| 328 | const PM_PIN_LLAT: i64 = 8 |
| 329 | const PM_SIDE_L: *u8 = "L" |
| 330 | const PM_SIDE_R: *u8 = "R" |
| 331 | const PM_SIDE_C: *u8 = "C" |
| 332 | const PM_METHOD: *u8 = "measured" |
functions
| 334 | func pm_ruler_version() -> i64 { return 3 } // 3: AT44, the mouth from its seam and the fissure grown from its pupil |
| 335 | func pm_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 336 | func pm_max(a: i64, b: i64) -> i64 { if a > b { return a } return b } |
| 337 | func pm_min(a: i64, b: i64) -> i64 { if a < b { return a } return b } |
| 339 | func pm_isqrt(v: i64) -> i64 |
| 346 | func pm_dist(x0: i64, y0: i64, x1: i64, y1: i64) -> i64 |
| 352 | func 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 } |
| 353 | func pm_luma_at(rgb: *u8, w: i64, x: i64, y: i64) -> i64 called by 5: pm_eye_fissurepm_seam_vpm_mouth_hypothesispm_landmarkspm_landmarks_cascade calls 1: pm_luma |
| 358 | func pm_canthal_tilt(rise: i64, run: i64) -> i64 |
| 367 | func pm_largest_component(mask: *u8, gw: i64, gh: i64, label: *u8, bb: *i64) -> i64 |
| 416 | func pm_blobs(mask: *u8, gw: i64, gh: i64, rx0: i64, ry0: i64, rx1: i64, ry1: i64, blobs: *i64, cap: i64, capped: *i64) -> i64 |
| 489 | func 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 |
| 594 | func pm_pair_check(res: *i64) -> i64 |
| 612 | func pm_axes(res: *i64) -> i64 |
| 632 | func pm_mouth_why_name(k: i64) -> *u8 |
| 642 | func pm_band_rgb(rgb: *u8, w: i64, x0: i64, x1: i64, y: i64, out3: *i64) -> i64 |
| 662 | func pm_hue_deg10(ctx: *i64, r: i64, g: i64, b: i64) -> i64 |
| 670 | func pm_chroma(r: i64, g: i64, b: i64) -> i64 { return pm_max(pm_max(r, g), b) - pm_min(pm_min(r, g), b) } |
| 672 | func pm_seam_v(rgb: *u8, w: i64, x: i64, y: i64, d: i64, floor_v: i64) -> i64 |
| 683 | func 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 |
| 723 | func pm_seg_cost(pw: *i64, pv: *i64, pvv: *i64, a: i64, b: i64) -> i64 called by 1: pm_first_border |
| 729 | func pm_seg_mean(pw: *i64, pv: *i64, a: i64, b: i64) -> i64 { return (pv[b] - pv[a]) / pm_max(pw[b] - pw[a], 1) } |
| 731 | func pm_ln_permil(n: i64) -> i64 called by 1: pm_first_border |
| 747 | func pm_first_border(v: *i64, wt: *i64, n: i64, seam_first: i64, out3: *i64) -> i64 |
| 822 | func pm_band_profile(ctx: *i64, rgb: *u8, w: i64, x0: i64, x1: i64, y0: i64, n: i64, hv: *i64, wt: *i64) -> i64 |
| 839 | func 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 |
| 882 | func 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 |
| 951 | func pm_mouth_copy(dst: *i64, src: *i64) -> i64 called by 1: pm_mouth |
| 981 | func pm_mouth(rgb: *u8, w: i64, h: i64, res: *i64) -> i64 called by 3: pm_landmarkspm_landmarks_cascadepm_mouth_anchored calls 9: pm_maxpm_minsys_mmappm_seam_vfq_ctxpm_seam_half+3 |
| 1117 | func pm_landmarks(rgb: *u8, w: i64, h: i64, res: *i64) -> i64 called by 3: lk_align_rulermainpm_landmarks_auto calls 13: pm_minsys_mmapsks_is_skinpm_lumapm_largest_componentpm_max+7 |
| 1416 | func pm_landmarks_cascade(rgb: *u8, w: i64, h: i64, res: *i64, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64 called by 2: lk_align_rulerpm_landmarks_auto calls 7: sys_mmappm_luma_atff_findpm_eye_fissurepm_pair_checkpm_axes+1 |
| 1489 | func pm_landmarks_auto(rgb: *u8, w: i64, h: i64, res: *i64, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64 |
| 1502 | func pm_landmarks_file(path: *u8, res: *i64) -> i64 calls 1: pm_landmarks_file_auto |
| 1508 | func pm_png_rgb(px: *u8, w: i64, h: i64, ch: i64) -> *u8 |
| 1531 | func pm_decode_file(path: *u8, pix: *i64, out3: *i64) -> i64 |
| 1568 | func pm_landmarks_file_auto(path: *u8, res: *i64, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64 called by 5: mainmainpm_landmarks_filepm_referee_summain calls 3: sys_mmappm_decode_filepm_landmarks_auto |
| 1581 | func pm_mouth_anchored(rgb: *u8, w: i64, h: i64, canthi8: *i64, res: *i64) -> i64 |
| 1592 | func pm_span_int(buf: *u8, s: i64, e: i64, out: *i64) -> i64 |
| 1612 | func pm_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *i64) -> i64 |
| 1629 | func pm_field_xy(buf: *u8, ls: i64, le: i64, idx: i64, out: *i64) -> i64 |
| 1642 | func pm_field_int(buf: *u8, ls: i64, le: i64, idx: i64) -> i64 called by 4: lk_landmarks_from_oraclemj_oracle_axespm_lip_scorepm_referee_sum calls 3: sys_mmappm_fieldpm_span_int |
| 1649 | func 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 } called by 11: lk_print_imglk_print_featlk_print_canvaslk_print_bandlk_print_scorelk_print_verdict+5 calls 1: sys_write |
| 1650 | func pm_putn(v: i64) -> i64 |
| 1666 | func pm_kv(k: *u8, v: i64) -> i64 { pm_puts(k); pm_putn(v); return 0 } called by 10: mainlk_print_imglk_print_featlk_print_canvaslk_print_bandlk_print_score+4 calls 2: pm_putspm_putn |
| 1667 | func 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 } |
| 1669 | func 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) } |
| 1675 | func 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 |
| 1711 | func pm_referee_sum(oracle_path: *u8, dir: *u8, face_c: *HaarCascade, eye_c: *HaarCascade, sum: *i64) -> i64 called by 3: mj_judge_file_atmainpm_referee calls 16: sys_mmapsys_read_filepm_fieldpm_field_intpm_putspm_putspan+10 |
| 1864 | func pm_referee(oracle_path: *u8, dir: *u8, face_c: *HaarCascade, eye_c: *HaarCascade) -> i64 |
| 1869 | func pm_row(out: *u8, section: *u8, id: *u8, side: *u8, value: i64, refkey: *u8, when: *u8) -> i64 called by 1: pm_card_write |
| 1888 | func pm_row_exists(card: *u8, n: i64, section: *u8, id: *u8, side: *u8) -> i64 |
| 1897 | func pm_card_write(slug: *u8, refkey: *u8, when: *u8, res: *i64) -> i64 |