Spaces:
Runtime error
Runtime error
|
Download src/extraction/context.md from dylanebert/MeshPalettizer: direct link, hf CLI and curl.
- Browser
- Download file 912 Bytes
-
https://huggingface.co/spaces/dylanebert/MeshPalettizer/resolve/main/src/extraction/context.md
- Command line
-
hf download hf://spaces/dylanebert/MeshPalettizer/src/extraction/context.md
-
curl -L -o context.md https://huggingface.co/spaces/dylanebert/MeshPalettizer/resolve/main/src/extraction/context.md
912 Bytes
| # Color Extraction Module | |
| Extract colors from 3D mesh materials and textures | |
| ## Purpose | |
| - Sample colors from mesh faces | |
| - Read from textures via UV coordinates | |
| - Apply area-weighted sampling | |
| ## Layout | |
| ``` | |
| extraction/ | |
| βββ context.md # This file | |
| βββ __init__.py # API: extract_colors() | |
| βββ sampler.py # Random sampling strategies | |
| βββ reader.py # Read colors from materials | |
| ``` | |
| ## Scope | |
| - In-scope: Color extraction, texture sampling, UV mapping | |
| - Out-of-scope: Color quantization, atlas generation | |
| ## Entrypoints | |
| - `extract_colors(mesh, sample_rate, simplify_details, detail_sensitivity)` - Main extraction function | |
| - `get_face_colors(mesh, simplify_details, detail_sensitivity)` - Read colors from mesh | |
| - `sample_colors(colors, sample_rate, areas)` - Sample with weighting | |
| ## Dependencies | |
| - Internal: preprocessing.simplify_texture | |
| - External: NumPy, trimesh, OpenCV |