code wiki / (root) / nx_texture.nx

nx_texture.nx

buildroot/runtime/nx_texture.nx

6904 B215 linesdepth 5pulls 6 transitivereach 7 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_texture.nx -- texture primitives (V5 of vision rollout). Two complementary descriptors: 1. GLCM Haralick features (Haralick 1973) Gray-Level Co-occurrence Matrix counts pixel-pair frequencies at offset (dx, dy). Derived statistics: contrast, energy, homogeneity. 2. Local Binary Patterns (Ojala 1996, 2002) 8-bit signature comparing each pixel to its 8 neighbors. Robust to monotonic illumination change. Histogram of LBP codes characterizes texture. What this unlocks: + material discrimination (skin / fabric / fur / feather / concrete) + grass vs concrete vs sand for outdoor scene classification + texture-based salience (busy region vs flat) + texture homogeneity check for image-quality (over-blurred?) All i64. GLCM features in Q10 (scaled by 1024) for cross-image comparison. genealogy_id: haralick_1973_glcm + ojala_1996_lbp + ojala_2002_uniform lineage_id: co_occurrence_matrix + binary_pattern_histogram

dependencies 2 imports · 4 importers

syscalls.nx nx_image.nx nx_texture.nx nx_areola_texture.nx nx_skin_texture.nx nx_texture_test.nx nx_vision_pipeline_test.nx

imports: syscalls.nxnx_image.nx

imported by: nx_areola_texture.nxnx_skin_texture.nxnx_texture_test.nxnx_vision_pipeline_test.nx

structs

none

consts

37const NX_TEX_GLEVELS: i64 = 8
38const NX_TEX_Q: i64 = 1024

functions

48func nx_texture_glcm(img: *Image, dx: i64, dy: i64, out_glcm: *i64) -> i64
81func nx_texture_glcm_total(glcm: *i64) -> i64
96func nx_texture_contrast(glcm: *i64) -> i64
116func nx_texture_energy(glcm: *i64) -> i64
132func nx_texture_homogeneity(glcm: *i64) -> i64
160func nx_texture_lbp_pixel(img: *Image, x: i64, y: i64) -> i64
177func nx_texture_lbp_image(img: *Image) -> *Image
193func nx_texture_lbp_histogram(lbp_img: *Image, x0: i64, y0: i64,
called by 2: mainmain calls 1: nx_image_get