Skip to content

Texture

Texture measures small-scale surface roughness of the skin.

component: texture
request:
query: "components=texture,texture_visualization"
response_path: "results[].description == \"texture\""
value_range: [0, 1]
also_request:
- texture_visualization # polygon-area features, 2 intensity levels by default
warnings: [] # texture emits no metric-specific codes
Code: metrics/texture.js. Change the code to change the picture.

renderMetric and drawPolygonArea come from the rendering recipes guide (Recipe 3 — polygon areas); get them as files. Edits stay in this browser tab.

This picture shows the metric's visualization_data from a recorded response, drawn on the photo that was analyzed. Click a thumbnail to select a different model. Hold the photo to hide the overlay.

const tex = response.results.find((r) => r.description === "texture");

Beyond the top-level value, texture returns a per-region breakdown in measurement_locations[] — one entry per face region, each with its own value (0..1), mask_shapes (with the masks component), and polygon-area visualization_data (with texture_visualization). Some regions may not be analyzed for every face. Such a region returns value: -1 with null mask_shapes and no visualization data — treat it as “region unavailable,” not a real low score, and skip it when rendering or averaging.

  • Recommend high-quality capture since texture analysis relies on high image resolution and low amount of filtering.

The texture metric emits no metric-specific local_warnings[] codes; it inherits the global image-quality codes. A region that isn’t analyzed returns value: -1 (no status code).