Back
Colour Sorting in Green Coffee
May 10, 2026
Articles

A colour sorter does not make coffee sweet. It does not create acidity. It does not repair bad drying. It does not make a tired coffee fresh again. It does not turn poor picking into careful picking.

What it does is different: it protects the quality that is already there.

It removes beans and foreign material that do not belong in the lot. It reduces the chance that black, sour, mouldy, immature, insect-damaged, broken or discoloured beans end up in the roaster. It helps a lot behave more predictably. It makes the physical preparation more honest — if the machine is used correctly, and if the data is not hidden.

That last part matters. Sorting can become transparency, or it can become cosmetics.

If we only say “this coffee was colour sorted,” we have not said enough. Was it sorted once or twice? Was the coffee density separated first? What did the reject stream look like? How much good coffee was lost? Did anyone cup the accepted and rejected streams separately? Was the sorting loss paid for, or quietly pushed back onto the producer?

Those questions are where optical sorting becomes interesting.

What optical colour sorting actually does

At the simplest level, optical sorting separates beans by what a machine can see.

Green coffee moves through the sorter in a controlled stream. Cameras or sensors scan the beans. Software compares each bean against an accepted profile. If a bean falls outside the profile, a small jet of compressed air ejects it from the main stream.

That is the basic idea.

But “colour sorting” is now a slightly outdated name, because many modern machines are doing more than reading colour. A sorter may use full-colour RGB cameras, shape recognition, infrared sensing, laser systems, or near-infrared and hyperspectral imaging. Some systems use machine-learning models to classify defects. Others are still mostly threshold-based: too dark, too pale, too red, too yellow, too broken, too long, too small.

The important point is this: the machine is not tasting the coffee. It is reading physical signals that are associated with defects.

It sees colour. It sees shape. It sees surface contrast. In more advanced systems, it can read spectral information outside the visible range. But it does not understand quality the way a good cupper understands quality. It does not know if the coffee is elegant. It does not know if the acidity is structured. It does not know if a natural process tastes intentional or messy.

That judgment still belongs to people.

The machine gives us separation. We still have to decide what the separation means.

Why colour is useful — and why it is not enough

Many coffee defects are visible because they change the surface of the bean.

Black beans are usually easy to see. Sour beans are often yellowish, brown or reddish-brown, but they can be harder because the colour range is wider. Immature beans can look pale, greenish or waxy, but not always. Insect damage may be obvious if the holes or marks are external. Mould can be visible, but sometimes the risk is more subtle. Broken and chipped beans are not colour problems at all; they are shape problems.

This is why one sensor is never the whole story.

A machine that only reads colour may remove obvious black beans well, but it may struggle with defects that overlap visually with sound coffee. A machine that also reads shape can separate broken, chipped, shell or malformed beans more effectively. A machine using NIR or hyperspectral data may detect differences that are not obvious to the human eye.

Research supports this logic. Computer vision studies show that black beans are easier to classify than sour beans because black beans sit further away from normal beans in colour space, while sour beans overlap more with other brownish categories. Hyperspectral studies show that green coffee carries chemical and structural information beyond visible colour, including variation in sucrose, caffeine and trigonelline at single-bean level. NIR studies have also shown promise for predicting cup-quality attributes from green coffee spectra.

That does not mean every commercial sorter can do all of this perfectly. It means the direction is clear: sorting is moving from simple colour rejection toward more complete physical and spectral reading.

Still, the practical question remains the same.

What did the machine actually remove from this lot?

Not from coffee in general. From this coffee.

The dry mill sequence matters

The best sorting happens when the coffee arrives at the machine already prepared. The usual sequence is something like this:

01
Hulling or dry milling.
02
Pre-cleaning to remove dust, husk, sticks and larger foreign material.
03
Destoning.
04
Screen sizing.
05
Density or gravity separation.
06
Optical sorting.
07
Re-pass, recovery sort or hand check if needed.
08
Final packing.
This order is not just operational. It affects the quality of the sort.

If a lot is dusty, uneven in screen size, full of low-density beans or poorly cleaned, the colour sorter has a harder job. Beans overlap. Dust changes the way light reflects. Different screen sizes fall differently. Low-density material behaves unpredictably. Good beans can be rejected by accident, and defective beans can pass through.

A cleaner input gives the machine a cleaner decision.

This is why I do not like when optical sorting is presented as a magic final step. It is not magic. It is one part of a preparation system. If everything before it is careless, the sorter becomes expensive damage control. If everything before it is careful, the sorter becomes a very precise finishing tool.

At origin, this difference is huge. A producer or mill that controls picking, fermentation, drying, resting, hulling, density separation and optical sorting is not simply selling “green coffee.” They are selling preparation. That preparation has a cost, and the market should be able to see it.

The defects optical sorting usually targets

The exact defect list depends on the machine and the recipe, but in green coffee the common targets are familiar:

Defect or material Why it matters How the sorter usually sees it
Full black beans Severe defect; often strongly damaging in the cup Very dark colour
Partial black beans Localised dark damage Colour contrast
Sour beans Often linked to unwanted fermentation Yellow, brown or reddish-brown tones
Immature beans Can roast as quakers; often dry or astringent Pale, greenish or uneven colour, sometimes density/structure
Insect-damaged beans Physical and sometimes sensory defect Holes, marks, colour/shape change
Mould or fungus damage Quality and food-safety concern Surface colour/texture change, sometimes spectral difference
Broken/chipped beans Roast unevenly and scorch more easily Shape and edge detection
Shells Low mass, uneven roasting Shape recognition
Parchment or husk Physical contamination Colour/material difference
Sticks, stones, glass, plastic Equipment and food-safety risk Colour, shape, laser/NIR/X-ray depending on system

The point is not that every sorter removes every category perfectly. The point is that each defect needs a detectable signal.

If the defect is obvious, sorting is easier. If the defect looks similar to a good bean, sorting becomes harder. If the defect is internal and has no clear surface or spectral signal, the sorter may miss it completely.

This is why cupping still matters. Green analysis still matters. Moisture and water activity still matter. Density still matters.

Optical sorting is powerful, but it is not a replacement for a complete QC system.

Technology overview

Modality Typical hardware What it is best at seeing Strengths Common blind spots / limits
Visible RGB / full-colour cameras High-resolution cameras + LED lighting Discolouration, black/sour beans, broken beans, long/odd shapes, small beans Mature, fast, comparatively affordable, good for most visible defects Same-colour foreign material; subtle physico-chemical defects that are visually similar
RGB + NIR / InGaAs / SWIR Multispectral camera stacks Same-colour foreign bodies, some hidden material differences, selected subtle defects Better separation of foreign material and “invisible” defects than RGB alone More complex calibration; higher cost; OEM performance data often not public
Hyperspectral NIR Snapshot or push-broom HSI Bean-level spectral signatures linked to moisture, lipids, sucrose/caffeine/trigonelline, subtle defect chemistry Strong research performance; enables chemometric and deep-learning analysis More data-heavy, slower and costlier; industrial deployment narrower than RGB-based sorters
Laser / biometric surface sensing Laser + optical receiver stacks Surface texture, fine foreign material, difficult contrast problems Useful adjunct in some belt/chute systems Public coffee-specific data are limited; often product-family rather than coffee-specific claims
X-ray Bulk-flow or in-line X-ray detector Stones, glass, metal, ceramics, some density/internal anomalies Food-safety complement where optical contrast fails Weak for flavour-driven colour defects; generally not the main “cup-quality” sorter
Machine learning / AI k-NN, PLS, CNN, lightweight CNN, embedded inference Classification layer on top of sensor data Improves use of high-dimensional features; can reduce operator tuning burden Sensitive to dataset drift, lighting drift, bias, and private-dataset overfitting

What optical sorting cannot fix

This is the part people skip because it is less comfortable.

Poor harvesting
Optical sorting cannot fix poor harvesting. If too many unripe cherries entered the process, some immature beans can be removed later, but the lot has already lost part of its potential.
Unstable fermentation
Optical sorting cannot fix unstable fermentation. It can remove some visible sour, black or damaged beans, but it cannot correct the chemistry of an entire lot if the process went wrong.
Bad drying
Optical sorting cannot fix bad drying. If drying was too fast, too slow, uneven or unstable, the coffee may carry internal stress, high water activity or poor ageing potential. A beautiful-looking bean can still be unstable.
Old coffee
Optical sorting cannot fix old coffee. It can remove defects, but it cannot bring back volatile aromatics that have faded through time, oxygen, heat or poor storage.
Honest buying
Optical sorting cannot replace honest buying. A lot can be polished until it looks clean, while the producer still received a weak price, the sorting loss was never discussed, and the preparation work remains invisible.

That is why I prefer to treat optical sorting as evidence, not decoration.

If a lot is clean because the entire process was controlled, the sorter confirms that. If the reject stream is full of immature or sour beans, the sorter tells us where to look next. The machine does not only remove defects. It gives feedback. The question is whether we listen.

The reject stream is not waste. It is information.

One of the most valuable parts of optical sorting is the rejected coffee.

Most people focus on the accepted stream because that is what gets sold. But the reject stream tells the truth about what the machine had to remove.

If the reject stream is full of immature beans, the issue likely started at picking. If it is full of broken and chipped beans, the hulling or milling setup may be too aggressive. If it contains sour and black beans, cherry handling, fermentation, drying or storage should be reviewed. If it contains a lot of good-looking coffee, the sorter may be set too strictly.

This is where sorting becomes a relationship tool.

Instead of saying, “the coffee is not clean enough,” we can say:

The reject stream shows a high immature count. Let’s look at picking separation next harvest.

Or:

The natural process is visually variable, but the rejected stream still cups clean. We may be over-sorting this lot.

Or:

The accepted coffee is clean, but the sorting loss is too high for the price being paid. The commercial structure needs to recognise the preparation cost.

That kind of conversation is much more useful than vague quality language.

Sorting washed, natural and experimental coffees

Different processes need different sorting logic.

A clean washed lot usually has a narrower colour range. If the coffee was picked well, fermented cleanly, washed properly and dried evenly, the visual profile should be relatively consistent. In that case, a stricter colour threshold often makes sense.
Naturals are different. The drying environment, fruit contact and process style can create more visual variation. Some naturals look less uniform but cup beautifully. If you run them through a washed-coffee recipe, the sorter may remove beans that are not defective — only different.
Honey and anaerobic-style coffees need even more care. Their colour can shift in ways that are connected to process, not necessarily defect. An aggressive recipe can make the lot look more conventional while removing part of what made it interesting.

This does not mean we should accept dirty naturals. It means we should sort with intelligence.

For more expressive processes, I would always want to see three things: the pre-sort sample, the accepted stream, and the rejected stream. Then I would cup them. If the reject stream tastes defective, the sorting is doing important work. If the reject stream tastes clean and the yield loss is high, the machine may be removing value.

Uniformity is important. Cleanliness is important. But cosmetic uniformity is not the same as quality.

The economics of sorting

A strict sort costs money.

It reduces the final exportable weight. It requires machine time, electricity, compressed air, skilled operators, calibration, maintenance and QC labour. If the lot needs a second pass, the cost rises again. If the sorter rejects good coffee, the economic loss can be significant.

So when a buyer asks for “cleaner preparation,” the next question should be: who pays for the loss?

If the buyer wants a tighter defect tolerance, that may be completely reasonable. But the price should reflect the preparation. Otherwise, the cost is quietly absorbed at origin.

This is one of the hidden problems in specialty coffee. We ask for more precision, more traceability, more sorting, more packaging, more documentation, more stability — and then we treat those things as if they are included by default, for free.

They are not.

A cleaner lot is not only the result of better equipment. It is the result of someone choosing to lose saleable weight in order to deliver a more consistent product.

That deserves to be visible.

What this means for roasting

Roasters feel sorting even when they never see the machine.

A well-sorted lot usually behaves more predictably. There are fewer broken pieces that roast too fast. Fewer shells that scorch. Fewer immature beans that become quakers. Fewer dark damaged beans that contribute harsh or dirty notes. Fewer foreign materials that create equipment risk.

But optical sorting does not remove the need for roaster QC.

When a coffee arrives, a roaster should still check:

- Moisture content

- Water activity

- Screen distribution

- Density

- Defects in a 300g sample

- Quaker count after a light sample roast

- Cup quality against the offer or pre-shipment sample.

If the coffee was sold as carefully prepared, that preparation should be visible in arrival samples.

For roasting, the biggest benefits are consistency and cleanliness. A sorted coffee should give the roaster a narrower physical population to work with. This is especially important for lighter roasting. The lighter the roast, the less room there is to hide defects. Quakers remain pale. Broken beans show quickly. Fermentation defects become obvious. A cleaner green lot gives the roaster more control and less correction work.

A note on research and reality

The research around optical sorting is genuinely exciting.

Computer vision can classify visible defects with strong accuracy under controlled conditions. NIR snapshot hyperspectral imaging combined with deep learning has achieved very high defect-classification accuracy in experimental systems. Hyperspectral imaging has been used to analyse sucrose, caffeine and trigonelline in single green beans. NIR spectra have been used to predict specialty cup-quality attributes.

That tells us where the industry is going.

But I do not think we should turn research into marketing too quickly.

A laboratory model is not the same as a dusty dry mill. A dataset of separated beans is not the same as a mixed production flow. A coffee from one origin or process does not automatically represent all coffees. A high accuracy number does not tell you the false-reject rate, the yield loss, or whether the cup improved.

The practical standard should be simple:

Show the samples. Share the data. Cup the streams. Price the preparation fairly.

That is more useful than saying “AI sorted” and hoping nobody asks what that means.

References & Further Reading

  1. Chen, S.-Y., Chiu, M.-F. & Zou, X.-W. (2022). “Real-time defect inspection of green coffee beans using NIR snapshot hyperspectral imaging.” Computers and Electronics in Agriculture, 197, 106970.
  2. García, M., Candelo-Becerra, J.E. & Hoyos, F.E. (2019). “Quality and Defect Inspection of Green Coffee Beans Using a Computer Vision System.” Applied Sciences, 9(19), 4195.
  3. Caporaso, N., Whitworth, M.B., Grebby, S. & Fisk, I.D. (2018). “Non-destructive analysis of sucrose, caffeine and trigonelline on single green coffee beans by hyperspectral imaging.” Food Research International, 106, 193–203.
  4. Tolessa, K., Rademaker, M., De Baets, B. & Boeckx, P. (2016). “Prediction of specialty coffee cup quality based on near infrared spectra of green coffee beans.” Talanta, 150, 367–374.
  5. Vasconcelos, A.L.S., Franca, A.S., Glória, M.B.A. & Mendonça, J.C.F. (2007). “A comparative study of chemical attributes and levels of amines in defective green and roasted coffee beans.” Food Chemistry, 101, 26–32.
  6. Toci, A.T. & Farah, A. (2008). “Volatile compounds as potential defective coffee beans’ markers.” Food Chemistry, 108, 1133–1141.
  7. Specialty Coffee Association. Green Coffee Classification and current research on physical defects and sensory impact.
  8. FAO / SCAA Green Coffee Classification and Grading reference tables.
  9. Bühler Group. Coffee Sorting / SORTEX optical sorting systems for green and roasted coffee.
  10. TOMRA Food. Coffee bean sorting machines and sensor technologies.
  11. Satake. Pikasen Alpha optical sorting system and RGB/shape recognition technology.

Learn
May 1, 2026
News
Welcome Florence!
May 1, 2026
Articles
Screen Size in Green Coffee