6 min read · Machine vision

A lot of dried longan may look good, with even colour and unbroken shells, yet still have moisture above what the buyer specifies, which risks storage problems and mould later. A camera is good at checking appearance, but moisture is inside the flesh, and a camera cannot see it.
The examples in this article are hypothetical. Every number is made up to explain the way of thinking. They are not results from a real drying plant or a customer project.
Split the work correctly: what goes to the camera and what goes to the meter
| What to check | What to check it with | Notes |
|---|---|---|
| Colour of the shell and of the flesh visible from outside | Camera | Lighting must be kept constant, and there must be a colour reference sample |
| Cracked, broken or chipped shells | Camera | Works well when the fruit do not overlap on the belt |
| Fruit size | Camera | Calibrate size against real fruit before use |
| Visible foreign matter, such as stalks or leaf fragments | Camera (partly) | Things close in colour to the fruit may be hard to detect |
| Moisture | Moisture meter or lab | An ordinary camera cannot see moisture in the flesh |
| Mould inside or abnormal smell | A person or the lab | A camera looking at the surface may not see it |
| Taste, sweetness | A person tasting, as agreed with the buyer | A camera cannot tell |
Camera types that see beyond human vision, such as cameras in other wavelength ranges, have a role in some kinds of work. You can read more in the article on RGB versus hyperspectral. But even with a special camera, it has to be calibrated against values measured by a standard method before it is put to use.
How is moisture measured?
The method most often seen in plants is a moisture meter that heats the sample and weighs the mass lost (a moisture analyser). A lab may use its own standard method. The results from different methods can differ slightly. Agree with the buyer which method is the primary one and how much deviation is allowed.
- Sample from several bags or several positions in the lot, not from one place.
- Weigh and prepare the sample by the same method every time.
- Measure at least two or three times and check whether the values are close.
- Check the meter against reference weights or a reference sample, at the interval the meter manufacturer recommends.
- Record the result in a document with the lot number, the date and the name of the person who measured.
The moisture requirement for dried longan depends on the buyer, the destination market and the relevant standards. Check with the buyer or the relevant standard of the National Bureau of Agricultural Commodity and Food Standards (ACFS). This article does not state any figure as a mandatory limit.
The procedure when there are two inspection systems
- Agree with the buyer on the appearance criteria and the moisture criteria for each grade, and on who decides when the two do not point the same way.
- Have the camera check the appearance of the longan along the belt and record the result for each lot or each bag.
- Take a sample from the same lot and measure its moisture.
- Record both results in the same document, under the same lot number.
- If the camera passes but the moisture fails, hold the lot before release and review the drying step.
- If the moisture passes but the camera fails, have a person recheck and sort according to the appearance criteria.
Hypothetical example: good appearance, but moisture fails
Suppose the drying plant samples 300 dried longan from one lot for the camera to check. It finds 18 with cracked or broken shells, which is 6 percent of those checked. Assume this passes the agreed appearance criterion of no more than 8 percent.
At the same time, a sample is taken for moisture, measured three times, giving 19.0%, 19.8% and 19.4%. The average is (19.0 + 19.8 + 19.4) ÷ 3 = 58.2 ÷ 3 = 19.4%. Suppose the buyer specifies no more than 18%. This lot therefore fails on moisture, even though the camera passed it.
If the plant looked only at the camera result, this lot might be shipped out with moisture too high. Keeping the two results side by side lets the problem be seen before release, and lets you go back and look at the drying step for that lot. All the numbers are hypothetical examples, not criteria to use in practice.
Common mistakes
- Believing that passing the camera appearance check means the lot is good.
- Measuring moisture from a sample taken only from the top layer of a bag.
- Keeping the camera results and the moisture results in different places, so they cannot be matched to the lot later.
- Not checking the meter on schedule, so the readings drift little by little without anyone knowing.
- Using a moisture method different from the buyer’s, so the values do not match. Agree on the method clearly from the start.
Keeping results against the lot number is the same idea as tracing production lots. You can read more in the article on lot traceability.
Limits and cautions
A camera can only check what is visible from outside. It does not know moisture, mould inside or taste. Moisture must be measured with a meter or a lab, and results that concern food safety should be decided by the plant’s quality lead or inspector. The numbers in this article, such as 300 fruit, 18 fruit, 6 percent, the 8 percent criterion, the moisture values 19.0, 19.8 and 19.4, and 18 percent, are hypothetical examples to explain the way of thinking only. They are not results from a real project and not the criteria of any standard. Check the real criteria with the buyer or the relevant standards body.
Starting references
- Wikipedia — Moisture analysis
- Wikipedia — Water activity
- Wikipedia — Longan
- Wikipedia — Machine vision




