code wiki / (root) / nx_light.nx

nx_light.nx

buildroot/runtime/nx_light.nx

7012 B233 linesdepth 5pulls 7 transitivereach 10 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_light.nx -- exposure / contrast / dynamic-range / direction (V3). Pure-math image-quality and lighting analysis. All i64. Ships: - nx_light_mean_luminance: average grayscale value - nx_light_stddev_luminance: sqrt(variance), integer - nx_light_min / max: tonal extrema - nx_light_dynamic_range: max - min - nx_light_underexposed_frac: Q10 fraction below threshold - nx_light_overexposed_frac: Q10 fraction above threshold - nx_light_direction_classify: bin a single (gx, gy) into 8 octants - nx_light_direction_hist: gradient-direction histogram Octant numbering (compass-like, y-down image convention): 0 = E (gradient points right; bright on right) 1 = SE (right-down) 2 = S (down) 3 = SW 4 = W 5 = NW 6 = N (up) 7 = NE genealogy_id: ansel_adams_zone_system + datta_2006_features lineage_id: luminance_statistics + gradient_direction_quantization

dependencies 3 imports · 3 importers

syscalls.nx nx_image.nx nx_math.nx nx_light.nx nx_aesthetics.nx nx_light_test.nx nx_vision_pipeline_test.nx

imports: syscalls.nxnx_image.nxnx_math.nx

imported by: nx_aesthetics.nxnx_light_test.nxnx_vision_pipeline_test.nx

structs

none

consts

38const NX_LIGHT_Q: i64 = 1024
39const NX_LIGHT_DIRS: i64 = 8

functions

45func nx_light_mean_luminance(gray: *Image) -> i64
65func nx_light_stddev_luminance(gray: *Image, mean: i64) -> i64
called by 2: mainmain calls 2: nx_image_getnx_math_isqrt
85func nx_light_min(gray: *Image) -> i64
102func nx_light_max(gray: *Image) -> i64
119func nx_light_dynamic_range(gray: *Image) -> i64
125func nx_light_underexposed_frac(gray: *Image, threshold: i64) -> i64
143func nx_light_overexposed_frac(gray: *Image, threshold: i64) -> i64
166func nx_light_direction_classify(gx: i64, gy: i64) -> i64
204func nx_light_direction_hist(gx_img: *ImageS64, gy_img: *ImageS64,