Photo-Sieve Grain Size Distribution — Worked Example
A real watershed segmentation of a coarse-sand photograph using the PE-Calc photo-sieve calculator. Output: 113 individual grains, D₁₆ = 1.21 mm, D₅₀ = 1.68 mm, D₈₄ = 2.49 mm, Folk-Ward sorting σ = 0.54 φ (moderately well sorted). Static numbers and charts on this page; click through to the live tool to run the same analysis (or upload your own photo) end-to-end in your browser.
Input photograph
A 1280 × 960 macro photograph of beach / river sand. The image was selected because it contains a representative mix of coarse sand and granule-sized grains in a single layer with reasonable contrast between grains and inter-grain shadow. Note: the photograph contains no scale reference (no coin, ruler, or card). For the example we assume a 50 mm field-of-view across the long edge — typical for a phone-camera macro shot. Under that assumption the pixel scale is 25.6 px/mm, and every reported size carries that calibration uncertainty linearly.
Watershed segmentation overlay
Same image after the OpenCV.js pipeline: CLAHE local contrast → Otsu threshold → morphological cleanup → distance transform → marker-based watershed. The red lines are the watershed boundaries (label = −1 in the marker matrix). Each enclosed region is one grain whose b-axis is then measured by minimum-area bounding rectangle.
Distribution statistics
Wentworth class breakdown
| Class | Range (mm) | % area | % count | N |
|---|---|---|---|---|
| Silt / clay | < 0.0625 | 0.0 | 0.0 | 0 |
| Very fine sand | 0.0625 – 0.125 | 0.0 | 0.0 | 0 |
| Fine sand | 0.125 – 0.25 | 0.0 | 0.0 | 0 |
| Medium sand | 0.25 – 0.5 | 0.0 | 0.0 | 0 |
| Coarse sand | 0.5 – 1.0 | 7.0 | 20.4 | 23 |
| Very coarse sand | 1.0 – 2.0 | 54.9 | 61.9 | 70 |
| Granule | 2.0 – 4.0 | 38.1 | 17.7 | 20 |
| Pebble | 4 – 64 | 0.0 | 0.0 | 0 |
Reading the table: 54.9% of the total grain area falls in the very-coarse-sand class (1–2 mm). The 17.7% count vs. 38.1% area in the granule class is consistent: granule-sized grains are a minority by count but contribute disproportionately to total area because area scales with d². This count-vs-area split is the photographic equivalent of the count-vs-mass split in mechanical sieving.
Cumulative grain-size distribution
X-axis is the b-axis in millimeters on a log scale. Y-axis is cumulative percent finer by area. Orange dashed lines mark the standard percentiles read off the curve.
Phi-scale histogram
X-axis is the phi unit, φ = −log₂(d_mm). Coarse grains plot at left (negative φ), fine grains at right (positive φ). Bin widths are 0.5 φ.
Step-by-step computation
Step 1 — Calibration
Step 2 — Segmentation
Step 3 — Per-grain b-axis
Step 4 — Area-weighted percentiles
Step 5 — Folk-Ward sorting
What this tells you
- Wentworth call: the sample is dominantly very coarse sand (1–2 mm) with a notable granule fraction (2–4 mm). The coarse-sand tail is small. There is no measurable medium-sand or finer fraction in the visible top layer.
- Sorting: moderately well sorted (σ_I ≈ 0.54 φ) is consistent with a transport-active environment — the photograph is plausibly a beach face, river bar, or eolian deposit where similar-sized grains have been segregated by repeated transport events.
- Mean (1.83 mm) vs. median (1.68 mm): the area-weighted mean is slightly larger than the median, indicating a coarse-tail skew. The 38% granule fraction by area dominates the upper half of the distribution.
- Caveat — the photograph has no scale. If the actual field-of-view were 30 mm (closer macro), all sizes would scale to 60% of these values: D₅₀ ≈ 1.0 mm (coarse sand). If 80 mm (wider framing), D₅₀ ≈ 2.7 mm (granule). Always include a scale reference in the field; this example demonstrates the method but its absolute values depend on the assumed calibration.
Run this analysis on your own photo
The live tool runs the exact same pipeline shown here. You can:
- Open the live tool.
- Click "Load sample image" to pre-load this same coarse-sand photograph (and the 50-mm-FOV custom calibration), then tap two endpoints to set the scale.
- Or upload your own field photograph with a coin / ruler / credit card in frame for accurate calibration.
Apps for offline field use in development
Native iOS and Android apps with offline OpenCV are in development for high-throughput field surveys. Sign up to be notified at launch:
Related tools
- Photo-Sieve Grain Size Distribution — live tool
- Settling velocity — Stokes / Newton for sediment particles
- Manning's equation — channel roughness from D₈₄ via Limerinos
- Terzaghi bearing capacity — granular soil strength from gradation