nx_scale.nx
buildroot/runtime/nx_scale.nx
about
nx_scale.nx -- multi-scale image pyramids (V6 of vision rollout).
Burt+Adelson 1983 image pyramid: cascade of downsampled blurred
images. Each level halves spatial dimensions.
G_0 = original
G_{n+1} = downsample(gauss_blur(G_n))
Difference-of-Gaussians (DoG) approximates Laplacian-of-Gaussian
without computing second derivatives. DoG extrema = scale-invariant
blob centers (the heart of SIFT, Lowe 2004).
What this unlocks:
+ scale-invariant analysis: feature found at any size
+ distant-vs-near object discrimination
+ face / eye / object detection at unknown scale
+ multi-resolution salience (objects pop at characteristic scale)
+ image-quality (high-freq energy at level 0 vs blurred)
All i64. 5-tap binomial filter [1, 4, 6, 4, 1] / 16 = >> 4.
Separable horizontal+vertical pass.
genealogy_id: burt_adelson_1983_pyramid + lowe_2004_sift_dog
+ crowley_1981_dog_blob
lineage_id: gaussian_pyramid + dog_blob_detection
axioms: NX_AX_LINEAR_FILTER_COMMUTES (separable convolution)
dependencies 2 imports · 4 importers
imports: syscalls.nxnx_image.nx
imported by: nx_ms_ssim.nxnx_salience.nxnx_scale_test.nxnx_vision_pipeline_test.nx
structs
| 41 | struct GaussPyramid |
consts
| 39 | const NX_SCALE_MAX_LEVELS: i64 = 5 |
functions
| 50 | func nx_scale_pyramid_get(p: *GaussPyramid, level: i64) -> *Image |
| 65 | func nx_scale_gauss_blur(src: *Image) -> *Image |
| 107 | func nx_scale_downsample_2x(src: *Image) -> *Image |
| 124 | func nx_scale_pyramid_down(src: *Image) -> *Image called by 2: nx_ms_ssim_image_q10nx_scale_gauss_pyramid calls 2: nx_scale_gauss_blurnx_scale_downsample_2x |
| 131 | func nx_scale_gauss_pyramid(src: *Image, n_levels: i64) -> *GaussPyramid |
| 158 | func nx_scale_dog(img: *Image) -> *ImageS64 |
| 179 | func nx_scale_dog_extrema(dog: *ImageS64, threshold: i64, |