How Optical Color Sorting Works: RGB Cameras, Pixel Detection & Intelligent Programming

More Than Just a Camera

Many people think an optical color sorter simply "looks" at grain and removes anything that appears bad. While that's partially true, modern optical sorting is much more sophisticated.

Today's optical sorters use high-speed cameras, LED lighting, and powerful computer software to inspect every individual kernel, bean, seed, or food product as it passes through the machine. Every object is analyzed in milliseconds before the system decides whether to accept it or reject it.

Unlike a screener that separates material by size or a gravity table that separates by density, an optical sorter makes its decisions based on what it sees.

Every Kernel Is Inspected Individually

As product enters the optical sorter, it flows down chutes in a single layer so every kernel is visible to the cameras.

Specialized LED lighting creates consistent illumination while high-speed cameras capture detailed images of every individual piece of product.

Within milliseconds, the software analyzes that image and determines whether the product matches the quality standards programmed by the operator.

If it meets the criteria, it continues into the accept stream.

If it doesn't, a precisely timed burst of compressed air ejects it into the reject stream.

This entire process happens thousands of times every second.

Understanding RGB Color Detection

One of the most important concepts in optical sorting is RGB color detection.

RGB stands for:

  • R = Red

  • G = Green

  • B = Blue

These three colors form the basis for millions of different color combinations.

Each color channel is measured on a scale from 0 to 255.

By combining different values of red, green, and blue, the camera can recognize millions of unique colors.

The optical sorter compares every pixel in the image against the color ranges programmed into the machine.

The Machine Doesn't Know What's Good or Bad

One of the biggest misconceptions about optical sorting is that the machine automatically knows what good grain looks like.

It doesn't.

The machine simply measures color information.

It is the operator who teaches the machine which colors should be accepted and which colors should be rejected.

During setup, acceptable color ranges and reject color ranges are programmed into the software. The machine then follows those instructions with incredible speed and consistency.

This is why operator experience is so important. A properly programmed machine can dramatically improve product quality while maximizing good product recovery.

Color Sensitivity

Programming begins by determining which colors should be considered acceptable and which should trigger rejection.

This is often referred to as color sensitivity.

If the color settings are too aggressive, the machine may reject perfectly good product.

If the settings are too loose, unwanted defects may remain in the finished product.

Finding the right balance depends on the product, the customer's quality requirements, and the type of defect being removed.

Color Alone Isn't Enough

A modern optical sorter doesn't simply reject every object containing a certain color.

It also evaluates how much of the object contains that color.

This is where pixel analysis becomes extremely important.

Every image captured by the camera is made up of thousands of tiny picture elements called pixels.

The software measures how many of those pixels fall within the reject color range.

The operator can program the machine to reject a product only when a certain number or percentage of pixels match the reject criteria.

This allows for extremely precise sorting decisions.

Real-World Example: Removing Ergot Without Rejecting Black Tip Wheat

One of the best examples of pixel-based programming is separating ergot from wheat.

Both ergot and naturally occurring black tip wheat contain dark colors.

If the machine were programmed to reject every dark pixel, it would remove a large amount of perfectly good wheat simply because the tip of the kernel was naturally darker.

Instead, the operator adjusts both the color range and the minimum pixel threshold.

A small dark area at the tip of a wheat kernel may remain acceptable because it does not contain enough dark pixels to exceed the reject threshold.

An ergot body, however, typically contains a much larger concentration of dark pixels. Once that programmed threshold is exceeded, the machine activates the air ejector and removes the contaminant.

This type of programming helps maximize product recovery while still effectively removing unwanted material.

Every Product Requires Different Programming

There is no single program that works for every crop.

Each product has different color characteristics, surface textures, and quality requirements.

For example:

  • Wheat programs are different from corn programs.

  • Pinto beans require different settings than black beans.

  • Chickpeas are programmed differently than lentils.

  • Food-grade products often require tighter tolerances than feed-grade products.

Every application requires adjustments to lighting, camera settings, color ranges, pixel thresholds, and reject sensitivity.

Why Operator Experience Matters

The quality of the finished product depends on much more than the machine itself.

Experienced operators understand how to balance product recovery with contaminant removal by adjusting machine settings to match each specific application.

Small changes in programming can have a significant impact on yield, quality, and overall performance.

At Loraas Custom Sorting, every project begins with evaluating the product, understanding the customer's quality goals, and developing machine settings that provide the best possible results for that application.

Need Help With Optical Color Sorting?

Whether you're cleaning wheat, corn, edible beans, pulse crops, seed, or specialty food products, Loraas Custom Sorting provides mobile optical color sorting services across North America. We can help with problem lots, We can bring a machine to you, We can walk you through plant layout and plant design to incorporate a sorter into your existing cleaning line. Or you can send us samples and we can clean small batches for you at our office.

Our goal is to help customers improve product quality, recover value from difficult lots, and meet demanding buyer specifications through properly programmed optical sorting and grain cleaning systems.

Your Questions, Answered