Counting & quality control
When people picture agricultural AI, they imagine autonomous tractors, drones, and robots. Yet one of the most common problems faced by growers, packhouses, seed companies, and researchers is far simpler: how many objects are there? More specifically — how many round objects are there?
A smartphone can now count round objects — blueberries, soybean and chickpea seeds, peanuts, beans, grapes, nuts, pellets — automatically. Computer vision detects each object individually from a single photo and returns not just a count but average size, the spread of sizes (standard deviation), and a full distribution. With a calibration plate in the frame, those measurements come back in real centimetres.
This long-read explains where smartphone counting started (post-harvest blueberries), why round objects are the ideal first target for computer vision, the four-step capture workflow, why average size alone is misleading and standard deviation matters, why 87% accuracy is often a win rather than a failure, and why a calibration plate is a rule rather than a suggestion.
- Round objects — distinct boundaries, predictable shapes, clear separation from a contrasting background — are the easiest target for computer-vision counting.
- One photo yields far more than a total: count, average diameter and area, minimum and maximum, standard deviation, and a size distribution.
- Standard deviation reveals uniformity that average size hides — two samples with the same mean can be very different products.
- A calibration plate is mandatory for real measurements. Without one you still get a count, but area and diameter come back as zeros.
The universal question: how many?
Across agriculture and food processing, thousands of decisions still rest on someone manually counting objects on a table, tray, plate, conveyor, or in the palm of a hand. Blueberries. Soybean seeds. Peas. Beans. Nuts. Pellets. Experimental samples. The counting itself is not hard — the challenge is scale. A single project can involve hundreds or thousands of images, which makes manual counting slow, repetitive, and error-prone.

Whether the objects are berries, seeds, or nuts, the underlying task is identical: count individual circular or near-circular objects from an image. Solve it once and it generalises across domains — soybean seed quality, germination studies, peanut analysis, grain research, breeding programmes, and laboratory experiments.
Where it started: blueberries
At Petiole Pro, one of our earliest counting applications came from post-harvest blueberry quality control. Researchers and industry partners wanted a faster way to quantify berry samples without spending valuable time counting fruit by hand. The workflow was collect a sample, place the berries on a tray, photograph, count, record — repeated across hundreds of images.

The counting was never the hard part — the scale was. Turning a repetitive manual chore into a few seconds of image analysis is what makes the difference at the volumes real quality control demands.
Why round objects are a good starting point
Round objects are among the easiest targets for a computer-vision system. They tend to have distinct boundaries, predictable shapes, relatively consistent sizes, and clear separation from the background. Spread them on a contrasting surface and modern image analysis can identify and count them with impressive accuracy — which is why blueberries, soybean seeds, peas, chickpeas, macadamias, hazelnuts, almonds, fertiliser pellets, and many fruits and berries all work well.

This is also why round objects make an honest starting point rather than an over-claim. Their geometry keeps the detection problem tractable, so the models can stay light enough to run on a phone. Irregular, overlapping, and biological shapes — leaves, roots, flowers — are harder, and a topic for another day.
The four-step smartphone workflow
The process is deliberately simple, so it works in a lab, a packhouse, a classroom, or a field. Everything runs from the Petiole Pro app on an ordinary smartphone.
- Arrange the sample. Spread the objects in a single layer on a contrasting background — a tray, plate, table, or bench — and add a calibration plate if you want measurements, not just a count.
- Capture an image. Photograph from directly above. Consistent light with minimal shadows improves accuracy; daylight is ideal.
- Detect individual objects. Rather than treating the sample as one mass, the algorithm finds each berry or seed separately.
- Generate measurements. Once objects are detected, the app calculates count, diameter, area, shape metrics, and distribution statistics.

Here is a step-2 capture and its step-3 result side by side — a plate of green grapes, then the same plate with every berry detected and measured:


Beyond a count: size, area, and distribution
This is where image-based counting becomes far more valuable than a total number. From a single image the app can report the number of objects, average size, minimum and maximum size, standard deviation, the full size distribution, and the percentage of objects within specific size classes. Instead of manually counting 500 blueberries, you get a complete statistical summary in seconds.

The same detection engine scales from dozens of objects to thousands. Dense seed trays are exactly where manual counting collapses and where a light on-device model keeps its footing:

Why standard deviation matters
Suppose two blueberry samples both have an average berry diameter of 16 mm. At a glance they look identical. But in Sample A most berries sit close to 16 mm — highly consistent — while in Sample B some are 10 mm and others 22 mm. Same average, very different product. For growers, packers, and buyers these are not the same thing at all, and that is what standard deviation captures.
Standard deviation measures how much variation exists within a sample. A low value means the objects are similar in size; a high value means they vary considerably. Picture a classroom: if every child is nearly the same height the standard deviation is low; if some are very short and others very tall it is high. The same principle applies to blueberries, seeds, and nuts — and it drives real decisions:
- Blueberries: retailers prefer uniform packs; a low standard deviation signals consistency.
- Soybean and chickpea seeds: uniform seed size influences planting performance and processing efficiency.
- Breeding trials: researchers hunt for varieties that produce more uniform outputs.
- Food processing: machines run better when raw materials have predictable dimensions.

Because every object is measured against the same calibrated scale, these summaries are directly comparable across samples and crops. A few real Petiole Pro results show how much the spread changes with the product:
| Sample | Objects counted | Average area (cm²) | Std deviation (cm²) |
|---|---|---|---|
| Black turtle beans | 1,228 | 0.75 | 0.20 |
| Blueberries | 231 | 2.63 | 0.60 |
| Almonds | 118 | 3.56 | 0.72 |
| Grapes | 77 | 5.02 | 1.04 |
| Raspberries | 56 | 5.99 | 1.07 |
| Strawberries | 58 | 10.34 | 2.75 |
Measured with Petiole Pro on a calibrated plate. Chickpeas, by comparison, averaged 1.10 cm in diameter with a standard deviation of just 0.09 cm — among the most uniform samples of all.
87% accuracy: precision vs practicality
Precision matters in agriculture and food processing — but how much precision is enough? Take a real example: counting 1,411 black turtle beans. The app returned 1,228 — that is 87% accuracy. Is that a problem? Not necessarily.

Why accuracy above 85% can be a win:
- Diminishing returns. Chasing the last 13% can cost more in time and resources than it is worth. 87% allows swift operations without significant compromise — and you can always count the remainder by hand.
- Nature is not uniform. Slight variation is expected and accounted for in most workflows. Staying above 85% strikes a balance between quality assurance and operational cost.
- It scales. A smartphone-based approach at this accuracy level holds up as operations grow — whether your QA team is 10 people or 100, the accuracy stays consistent across larger volumes.

Context is everything. Some industries demand higher precision; many thrive at this level. The skill is understanding your specific needs and optimising accordingly — not treating 100% as the only acceptable target.
The calibration-plate rule
Can the app count berries in a box, on a tray, or in a clump? Yes — it can count in almost any condition. But the moment you want measurements — diameter, average area, standard deviation — a calibration plate stops being a recommendation and becomes a rule.

A calibration plate acts as a measuring standard — a ruler the algorithm can trust. It tells the AI the real-world size of objects in the photo, so pixels convert into centimetres. No plate, no measurements: you will get zeros for area and diameter every time. (It is possible to measure size without a plate using a depth camera, but real-time depth processing on a phone or tablet needs extra hardware and budget.)
A free printable calibration plate ships inside the app, and sturdier acrylic plates can be purchased from the Petiole Pro store. If you are weighing up whether you need one for your workflow, we walk through the decision in detail in do I need a calibration plate for Petiole Pro?
What you can count today
The counting modules already span berries, seeds, and nuts, with dedicated quality-assurance flows in the app. Each one counts and measures; several also assess appearance and colour.


Counting is only half the story: modules such as Peanuts QA also read colour in RGB, HSV, and LAB space for appearance-based grading, and berry modules support visual quality checks that affect shelf life and marketability.


Round objects are only the beginning. Their relatively simple shape makes them an ideal entry point for automated counting and measurement, and the same thinking already extends to related tasks such as AI germination counting. Future work will tackle harder targets: irregular objects, overlapping structures, leaves, roots, and flowers.
Built for blueberries first — but the modules are extensible. If you count a specific round object that is not yet covered, a dedicated module can often be created for it.
Petiole Pro for counting & QA
Stop counting seeds by hand
Count and measure blueberries, seeds, nuts, beans, and berries from your phone with the free Petiole Pro app — count, average size, and standard deviation from a single photo. Add a calibration plate for real cm², or send us a batch of images and get clean results back as CSV.
Counting a round object we do not cover yet, or planning a research trial or QA line around image-based counting? We are a UK-based company glad to build a tailored module or join a project. Write to us at [email protected].
Frequently asked questions
What round objects can Petiole Pro count?
Petiole Pro counts round and near-round objects such as blueberries, strawberries, raspberries, grapes, soybean and chickpea seeds, peanuts, beans, almonds and other nuts, pellets, and similar samples. Objects with distinct boundaries and clear separation from a contrasting background work best.
How accurate is smartphone-based counting?
Accuracy depends on the sample and conditions, but a well-captured image typically lands above 85%. In one example, counting 1,411 black turtle beans returned 1,228 — 87% accuracy. For many operations that is a good trade-off between speed and precision, and any remainder can be counted manually. Uniform, well-separated samples on a contrasting background score highest.
Do I need a calibration plate to count objects?
Not to count — you can get a count without one. But to measure size (diameter, area, standard deviation) a calibration plate is mandatory: it gives the algorithm a known real-world scale so pixels convert into centimetres. Without a plate in the photo, the measurements return 0.00. A free plate is built into the app, and acrylic plates are available in the Petiole Pro store.
What is standard deviation and why does it matter for quality control?
Standard deviation measures how much object sizes vary within a sample. A low value means uniform sizes; a high value means mixed sizes. Two samples can share the same average size but differ greatly in consistency — which matters to retailers, packers, seed companies, and processors who depend on uniformity. It reveals what an average alone cannot.
Can the app count objects in a clump, box, or tray?
Yes — Petiole Pro can count objects in almost any condition, including clumps and boxes, without spacing every item apart. However, for size measurements you still need a calibration plate in the frame; otherwise you get a count but zeros for area and diameter.
How do I count seeds or berries with my smartphone?
Spread the sample in a single layer on a contrasting background, add a calibration plate, and photograph from directly above in consistent light (daylight is ideal). Open the relevant module in the Petiole Pro app, upload the photo, and read the count and statistics on screen. Taking a few photos and keeping the best result is a good practice.
Is Petiole Pro counting free?
The Petiole Pro mobile app is free and includes a printable calibration plate. Sturdier acrylic plates can be purchased, and for large or specialised workflows — including custom modules for a specific round object — you can contact the team.
