code wiki / (root) / nx_salience.nx

nx_salience.nx

buildroot/runtime/nx_salience.nx

8056 B237 linesdepth 6pulls 7 transitivereach 11 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_salience.nx -- Itti-Koch multi-scale salience (V8). Salience = "where does the eye go first" before any semantic understanding. Itti+Koch 1998 model: compute feature pyramids (intensity, color, orientation), take center-surround differences across scales, normalize, sum. Locally distinctive regions emerge. We ship a simplified pure-math variant: - intensity pyramid (grayscale via Rec.709) - edge-magnitude pyramid (Sobel) - center-surround differences at 3 scale ratios - sum into single 8-bit saliency map What this unlocks: + automatic subject detection ("where's the main thing") + cropping suggestions (frame the high-salience region) + image-quality (boring images have flat salience) + auto-focus / auto-exposure region suggestion Per CAPTAIN_MORONI_DOCTRINE this measures IMAGE distinctiveness. It does not classify subjects; it does not rank persons; it only identifies regions that stand out from their surround. genealogy_id: itti_koch_1998_salience + koch_ullman_1985_attention lineage_id: center_surround_difference + multiscale_integration axioms: NX_AX_NORMALIZATION_PRESERVES_RANK

dependencies 3 imports · 4 importers

syscalls.nx nx_image.nx nx_scale.nx nx_salience.nx nx_aesthetics.nx nx_image_clarity.nx nx_salience_test.nx nx_vision_pipeline_test.nx

imports: syscalls.nxnx_image.nxnx_scale.nx

imported by: nx_aesthetics.nxnx_image_clarity.nxnx_salience_test.nxnx_vision_pipeline_test.nx

structs

none

consts

none

functions

43func nx_salience_upsample_2x(src: *Image) -> *Image
64func nx_salience_upsample_pow2(src: *Image, n: i64) -> *Image
76func nx_salience_abs_diff(a: *Image, b: *Image) -> *Image
104func nx_salience_intensity(gray: *Image) -> *Image
153func nx_salience_combined(gray: *Image) -> *Image
186func nx_salience_peak(sal: *Image, out_x: *i64, out_y: *i64) -> i64
216func nx_salience_flatness(sal: *Image) -> i64