nx_light.nx
buildroot/runtime/nx_light.nx
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
imports: syscalls.nxnx_image.nxnx_math.nx
imported by: nx_aesthetics.nxnx_light_test.nxnx_vision_pipeline_test.nx
structs
| none |
consts
| 38 | const NX_LIGHT_Q: i64 = 1024 |
| 39 | const NX_LIGHT_DIRS: i64 = 8 |
functions
| 45 | func nx_light_mean_luminance(gray: *Image) -> i64 |
| 65 | func nx_light_stddev_luminance(gray: *Image, mean: i64) -> i64 |
| 85 | func nx_light_min(gray: *Image) -> i64 |
| 102 | func nx_light_max(gray: *Image) -> i64 |
| 119 | func nx_light_dynamic_range(gray: *Image) -> i64 |
| 125 | func nx_light_underexposed_frac(gray: *Image, threshold: i64) -> i64 |
| 143 | func nx_light_overexposed_frac(gray: *Image, threshold: i64) -> i64 |
| 166 | func nx_light_direction_classify(gx: i64, gy: i64) -> i64 |
| 204 | func nx_light_direction_hist(gx_img: *ImageS64, gy_img: *ImageS64, |