Record coffee particle-size distributions using Gagné’s image procedure
A step-by-step guide to photographing ground coffee, calibrating the image, detecting particles and recording a particle-size distribution with Gagné’s method, kept separate from sieve fractions and grinder settings.
Contents
- What the record gives you and when to use it
- What to have ready
- Set up the recording worksheet
- Step-by-step procedure
- 1. Spread the sample
- 2. Photograph the grounds
- 3. Open the image and calibrate the scale
- 4. Draw the analysis polygon
- 5. Set the threshold
- 6. Detect particles and inspect the outlines
- 7. Choose how to summarize the distribution
- 8. Save everything
- How to judge whether the record is usable
- Illustrative example: calibration and count arithmetic
- Count, projected area and inferred mass are different series
- Recording weighed sieve fractions alongside an image record
- Comparing records
- Limits that affect what you conclude
Gagné’s image procedure turns a photograph of ground coffee into a particle-size distribution you can save, compare and revisit. The result is a calibrated, documented record of one coffee, one roast and one grinder setting. You can file it next to your brewing ratios and tasting notes so that a later grind can be checked against an earlier one using the same method.
What the record gives you and when to use it
The procedure measures particles as they appear in a photo. It reports pixel-based sizes, which become millimetres once you calibrate against a reference object of known length. From those sizes it builds histograms and statistics weighted by particle count, by projected area or by inferred mass. It is useful in three situations: comparing two settings on your grinder, checking whether a setting still produces the distribution you recorded earlier, and attaching a measured grind description to a brew log.
Keep three things separate in your notes. First, the image estimate is what this procedure produces. Second, weighed sieve fractions come from physically separating and weighing the grounds, which is a different measurement. Third, the grinder’s dial number is a nominal label, not a size measurement. Record the dial number as metadata only.
What to have ready
- Ground coffee from a single coffee and roast, ground at a single grinder setting
- A flat white background with uniform lighting
- A camera that can take an in-focus photo held perpendicular to the background
- A reference object of known length to place beside the grounds
- Gagné’s coffee grind size software, which opens JPG and PNG images
- A recording worksheet, set up as in the next section
Set up the recording worksheet
Fill in the worksheet as you work, not afterward. Many of these values, such as the threshold and the manual erasures, cannot be recovered from the histogram alone. The layout below is a suggested template.
| Field | What to write |
| Sample ID | A unique label for this photo and sample |
| Coffee | Coffee identity, origin and roast |
| Grinder | Model and nominal setting (metadata only) |
| Preparation | How the sample was taken and spread |
| Procedure | Procedure reference and software version |
| Camera | Camera used and image dimensions |
| Raw image | File name of the unedited photo |
| Reference | What the object is and its known length in mm |
| Reference pixels | Pixel length you marked between its endpoints |
| Analysis polygon | What the polygon excludes (reference, glare, shadows) |
| Threshold | Channel used and threshold percentage |
| Detection settings | Maximum diameter, minimum cluster area, roundness, Quick & Approximate on or off |
| Manual exclusions | Any particles erased by hand |
| Metric and units | Which size metric, in what unit |
| Bins | Bin boundaries, range, and linear or log axis |
| Weighting | Count, projected area or inferred mass, and the denominator |
| Exports | Names of the CSV, statistics and image or histogram files |
| Sample mass | Weighed mass, if you measured it, recorded separately |
Step-by-step procedure
1. Spread the sample
Sprinkle the grounds onto the white background without choosing particles by size. Do not pick out the large pieces or brush away the fines, because doing so biases the distribution. Separate the grains so that, in the eventual photo, they sit about 5 pixels apart. If grounds get pushed off while you spread them, return them to the sample. If grains are still touching, spread further before you photograph. The software can merge touching grains into a single particle.
2. Photograph the grounds
Take the photo with the following conditions:
• The camera is held perpendicular to the background.
• The image is in focus.
• The lighting is uniform.
• The reference object lies beside the grounds.
Retake the photo if it is blurred, taken at an angle, or unevenly lit. Save the original file unedited and note its name on the worksheet.
3. Open the image and calibrate the scale
Open the JPG or PNG in the software. Mark the two endpoints of the reference object, then enter its known length in millimetres as a custom length. Mark the object itself, not its shadow or its visible thickness. Write both the known length and the marked pixel length on the worksheet, because every millimetre value in the result depends on this calibration.
4. Draw the analysis polygon
Draw a polygon around the area to analyse. Leave out the reference object, any glare and any shadows. Note on the worksheet what you excluded.
5. Set the threshold
The software thresholds pixels on the blue channel, and its default threshold is 58%. Treat the default as a starting point. Inspect which pixels it selects and adjust the threshold if particles are missed or background is being picked up. Record the final value.
6. Detect particles and inspect the outlines
Run particle detection, then look over the outlines on the image before accepting the result. Write down the settings in use:
• maximum diameter, in pixels
• minimum cluster area, in pixels²
• roundness
• whether Quick & Approximate was on
If you erase particles by hand, record that as well. If outlines show merged clusters, stop here. Go back to step 1, spread the grains further and rephotograph rather than accept the result.
7. Choose how to summarize the distribution
Make the following choices and record each one:
• the size metric
• the bin boundaries
• the range
• linear or logarithmic axis
• the weighting: by count, by projected area or by inferred mass
The same particles produce different-looking histograms under each weighting, so the weighting is part of the record.
8. Save everything
Save the particle CSV, the statistics, and the image and histogram views. The CSV holds pixel-based measurements together with the pixels-per-millimetre calibration. Because of that, it can be re-binned or re-plotted later without repeating the photo.
How to judge whether the record is usable
- The reference was marked end to end on the object itself, and its known length and pixel length are both recorded.
- The polygon leaves out the reference, glare and shadows.
- The threshold was inspected rather than left unchecked, and its value is written down.
- The detected outlines follow individual grains, not merged clumps, glare or shadows.
- Every detection setting and manual erasure is on the worksheet.
- The metric, bins, axis type and weighting are stated alongside the histogram.
- The CSV, statistics and image views are saved under names that match the sample ID.
If any of these checks fails, correct that step and rerun the steps after it. The software does not supply a single pass or fail signal for a finished distribution. The checks above are the observable cues available.
Illustrative example: calibration and count arithmetic
Hypothetical numbers: a 10 mm reference spans 1,000 pixels, which gives 100 pixels per mm. A particle with a projected area of 400 pixels² therefore covers 400 ÷ 100² = 0.04 mm². If 12 of 40 accepted particles fall in a chosen area bin, that bin holds 30% of the particles by count. This arithmetic gives a count fraction only. It is not a mass fraction or a volume measurement.
Count, projected area and inferred mass are different series
Each weighting answers a different question:
• Count weighting describes how many particles fall in each size range.
• Projected-area weighting describes how much of the photographed area each size range covers.
• Inferred-mass weighting estimates mass from the image. It assumes the particles’ vertical shape and thickness, and it assumes all particles share the same density. It is not weighed mass.
The formula labels for width and semi-axes are ambiguous. For that reason, do not present inferred-mass results as absolute physical volumes.
Recording weighed sieve fractions alongside an image record
If you also separate a sample with sieves and weigh each fraction, store those masses as their own series and always state the denominator. Hypothetical example: you start with 10.00 g and collect fractions of 2.00 g, 5.00 g and 2.80 g. Measured against the starting mass, the fractions are 20%, 50% and 28%, with 0.20 g unaccounted for. Measured against the 9.80 g you recovered, the same fractions are about 20.41%, 51.02% and 28.57%.
| Fraction | Mass (g) | % of starting mass (10.00 g) | % of recovered mass (9.80 g) |
| A | 2.00 | 20% | 20.41% |
| B | 5.00 | 50% | 51.02% |
| C | 2.80 | 28% | 28.57% |
| Unaccounted | 0.20 | 2% | not applicable |
This guide does not cover how to run the sieves: shaking method, duration, sieve sizes and an acceptable level of mass loss are not included. Before you rely on sieve numbers, adopt a sieving protocol from a documented source and record it on the worksheet.
Comparing records
Compare two distributions only after confirming they share the following:
• procedure
• calibration approach
• size metric and units
• detection filters
• bins
• weighting
Keep the grinder setting as a label, not as evidence of size. Store sieve mass fractions, image counts, projected-area fractions and inferred-mass fractions as distinct series, and do not plot one as if it were another.
Records from other methods need the same separation:
• Steven Abbott’s browser tool calibrates the full image width in millimetres. It converts each blob’s area to a pseudo-sphere with radius √(A/π), so its volume model differs from Gagné’s, and its author describes the numerics as unvalidated.
• Laser-diffraction reports, such as Malvern’s Mastersizer coffee work, give Dv10, Dv50 and Dv90 values in micrometres. These are a separate kind of measurement.
Neither set of numbers can be dropped directly into a Gagné record. A distribution on its own also does not tell you which grinder is better or how a coffee will extract. Keep those judgments in your tasting notes.
Limits that affect what you conclude
The smallest grains can fall below the photo’s resolution and go uncounted, so the fine end of an image distribution is understated. Touching grains can be read as one larger particle. When two records differ mainly at the fine end, or in a few large particles, check the photo’s resolution and the outline images before treating the difference as real.
Related articles
What Does the 80/20 Rule Mean for Coffee?
Discover how the 80/20 rule applies to coffee brewing. Learn about the 80/20 ratio, how small adjustments affect flavor, and how to find your perfect cup through simple experiments.
Keep a Home Coffee Blend Journal with Measured Proportions
Learn how to record home coffee blends by weight, calculate blend percentages, keep them separate from your coffee-to-water ratio, and compare trials.
Calculate Home-Brewed Coffee Ingredient Cost per Serving
Work out what each cup of home-brewed coffee costs in ingredients, using your own prices, a printable worksheet, spreadsheet formulas and a savings comparison.
Record coffee dose, water and timer events with an Acaia Pearl
How to use the original Acaia Pearl's tare, timer and brewing modes to separately log equipment weight, dry coffee dose, water added, beverage weight and brew time.
Calculate coffee TDS and extraction yield and read the SCAA drip-brewing chart
How TDS, beverage-based extraction yield, brew ratio and taste differ, how to calculate extraction from refractometer readings, and how to read the 2016 SCAA drip-brewing chart.
Iced pour-over coffee: recording hot water, ice and dilution
How to plan and log an iced pour-over: separate entries for coffee dose, hot extraction water, brewing ice, measured beverage and later serving ice or water, with one worked recipe example.
Recording brewing water: labels, minerals and measurements
How to document the water behind each home coffee brew: source, label minerals, treatment and real measurements, kept separate from brewed-coffee TDS and tasting notes.
Coffee scoops, tablespoons and grams: recording measurements
How to turn coffee scoops and tablespoons into grams, weigh and record your own scoop, convert common doses, and use a simple coffee-to-water ratio at home.
What Is a Bloom Ratio? How the Coffee Bloom Works and What the Evidence Supports
What a bloom ratio means in pour-over coffee, how the bloom differs from your total brew ratio, and the steps and timing the sources support, with clear notes where details are missing.
Coffee Grind Size Chart: Matching Grind to Brewing Method and Extraction
A practical coffee grind size chart from finest to coarsest, how grinding methods differ, and how to adjust grind to your brewing method. Unverified details are flagged.