Explainer · Defects and grading

Is shell colour variation on an egg dirt?

Colour variation is the natural tone and speckling of the shell itself, not dirt. Dirt is material stuck to the outside of the shell, such as faeces, soil, blood or yolk. Brazil's RIISPOA requires a clean shell for Class A (art. 225), but the text does not ask for a uniform colour. Grading therefore has to separate the two cases, and calibration with eggs from your own line shows whether the separation works.

Updated · 4 min read

What is colour variation, and what is dirt?

Colour variation is the tone and speckling the shell itself has. It changes from egg to egg and even within one egg, and it usually follows the natural pattern of the shell. Dirt is something else: material that sits on top of the shell, such as faeces, soil, blood or yolk. A dirty egg has an unbroken shell with that material stuck to it, so the difference lies in what is on the shell, not in the shell's colour.

The rule that matters comes from RIISPOA: a Class A egg must have a shell and cuticle "of normal shape, smooth, clean, intact" (Decree 9.013/2017, art. 225, I). The word that separates the cases is "clean". The text asks for a clean shell and does not require a uniform colour. For when dirt becomes a problem, see dirty eggs.

Why can natural colour look like dirt to a camera?

A camera sees only brightness and colour. Dark speckles and different tones on the shell look like stains, so a fixed colour limit can mark a clean egg as dirty. The same happens with a shell that is darker than the average of the batch.

The dome of the egg also creates a brightness gradient, with the rim darker than the centre, even on a perfectly clean egg. If the camera compares every egg against one single value, the rim of any egg looks dirty. That is why the comparison has to be made within each egg.

How does Vigiovo separate natural colour from dirt?

Vigiovo does not use one colour limit for the whole egg. It measures the brightness of each pixel against the shading surface fitted to that egg, and in parallel measures colour deviation in Lab colour space, which catches stains of similar brightness but a different colour. Specular highlights are excluded. An egg is dirty if stains cover 3% or more of the visible shell, a Vigiovo configuration value and not a legal standard.

This lowers the risk of marking a naturally speckled shell as dirty, but it does not remove it. A very light stain on a very speckled shell can go unnoticed, and a surface camera cannot see what lies under the shell. See how it works for the full method.

Practical signs of natural colour and of dirt (practical judgement, not a legal test)
FeatureNatural shell colourAdhering dirt
ShapeSpeckles and tones that follow the pattern of the shellStains with an irregular, well-defined edge
ColourA tone close to the rest of the shell, at a different intensityA colour unlike the shell, such as brown, red or yolk yellow
BrightnessFollows the curve of the eggDrops locally, below the surface of the egg
OutcomeNot dirtDirty egg, outside Class A (RIISPOA, art. 225, I)

The table is a practical reading of the differences, not a rule of the standard. What decides on your line is the calibration made with eggs from your own farm.

How do you calibrate the camera so it doesn't confuse colour with dirt?

The practical answer is to calibrate with eggs from your own farm before trusting the result. The process is simple and can be repeated whenever the batch, the lamp or the camera changes:

  • Photograph eggs of every shell colour the farm produces, in separate batches.
  • Ask the team to label each egg as clean or dirty, without looking at the camera's result.
  • Adjust the dirt and colour limits until the result matches the labels.
  • Set separate limits for white or bluish shells, because Vigiovo's default configuration targets brown and cream shells.

With a few hundred labelled eggs, you can measure how close the natural colour of your farm comes to dirt. Eggs that land near the limit should go to manual review, rather than forcing the result until the problem disappears.

Frequently asked questions

Are speckles on an eggshell dirt?

Usually not. Speckles and tones are part of the shell itself, and the standard asks for a clean shell without requiring a uniform colour (RIISPOA, art. 225). Dirt is material stuck to the outside, such as faeces, soil, blood or yolk, and it has a different colour and edge from the shell.

How does a camera tell natural colour from dirt?

It compares the brightness of each pixel with the shading surface of that same egg and measures colour deviation in Lab space in parallel. These limits are only reliable after calibration with labelled eggs from your own line.

Do white or bluish eggs work the same way?

Not without adjustment. Vigiovo's default configuration targets brown and cream shells. White or bluish shells use different hue and saturation limits, set during the line's calibration.

Sources

  1. Decreto nº 9.013/2017 (RIISPOA), Presidência da República (Brasil)
  2. Como o Vigiovo classifica ovos sem IA / How Vigiovo grades eggs without AI, Vigiovo

How Vigiovo helps

Vigiovo grades eggs on the conveyor as clean, dirty, cracked or unverified, in real time, with deterministic computer vision: every decision comes with the measurements behind it, on an ordinary CPU.

See how it works