Zenaight Logo

Menu

Close

Insights

Production Line Counting with Computer Vision: When Sensors Aren’t Enough

Traditional production line counting systems work extremely well until the process becomes more complicated than a simple on-or-off signal. Here is where computer vision can help manufacturers count, verify and understand what is actually happening on the line.

Mon Aug 17 2026Zenaight Team8 min read
Production Line Counting with Computer Vision: When Sensors Aren’t Enough

Topics

Computer Vision
Manufacturing
Machine Vision
Automation
South Africa

Share this post

Most production lines already have counters.

A photoelectric sensor sees something pass. A proximity sensor changes state. A PLC increments a number. It is simple, cheap and, when the process is predictable, remarkably reliable.

For many production line counting systems, that is exactly the right approach.

The problem starts when the real world stops behaving like the wiring diagram.

Two products touch each other and pass as one. A vibrating bracket creates two pulses instead of one. A product moves backwards and gets counted twice. One item hides behind another. The spacing changes. The line speed changes. Or the sensor is technically working perfectly, but the question the business actually wants answered has become more complicated than: "Did something pass here?"

That is usually the point where computer vision or machine vision counting becomes worth discussing.

Not because every factory suddenly needs AI cameras. Quite the opposite. If a R500 sensor can solve the problem reliably, use the R500 sensor. It will probably still be working long after somebody has forgotten the Wi-Fi password.

But there are production problems where a simple signal is no longer enough.

If you are new to the technology itself, our introduction to computer vision explains the fundamentals in plain English. Here, the focus is specifically on industrial counting and where vision becomes useful on a real production line.

A counter can be correct and still give you the wrong answer

Traditional industrial sensors are good at answering very specific questions.

A beam-break sensor can tell you that something crossed a point. A proximity sensor can detect the presence of an object. An encoder can tell you that something moved a certain distance.

What these devices usually cannot tell you is what passed the sensor, how many objects were actually present, whether two objects were touching, or whether the same object has already been counted.

Imagine a line where products normally travel one at a time.

The sensor sees:

ON → OFF

One product. One count. Perfect.

Now two products arrive touching each other.

The sensor may still see:

ON → OFF

One signal. Two products.

The PLC has done exactly what it was told to do. The count is still wrong.

That distinction matters because teams sometimes spend weeks adjusting timers, debounce logic and PLC code when the underlying problem is not the logic. The sensor simply does not have enough information about the scene.

Traditional production line sensor counting compared with computer vision counting

The difficult 1% is normally where the money is

Most counting systems do not fail spectacularly.

They fail occasionally.

That can actually make the problem harder.

If a counter is wrong 50% of the time, everyone knows it is broken. If it is right 99% of the time, operators often learn to live with the remaining errors.

Until those errors start affecting production reconciliation, yield, giveaway, traceability, downstream packaging or customer claims.

Consider a line producing thousands of units per shift. A small percentage of counting errors can become a surprisingly large number over a month.

And the operational cost is rarely just the value of the missing or additional product.

Someone has to investigate the discrepancy.

Production checks another number. Quality checks a record. An operator manually recounts something. The shift supervisor tries to work out what happened three hours earlier. Eventually a spreadsheet appears, which is normally a sign that the problem has officially become everybody's problem.

This is where better visual information can have value beyond simply producing a more accurate number.

For South African manufacturers, this kind of issue often appears on production lines where existing PLCs, sensors and control systems are already doing most of the job perfectly well. There is simply one awkward counting point that keeps creating discrepancies. In those cases, computer vision does not need to replace the automation stack. It only needs to solve the part the existing instrumentation cannot see clearly.

How computer vision counts products on a production line

A computer-vision counting system looks at the actual scene rather than only reading a binary signal.

Depending on the application, the system can detect individual objects in each video frame and track them as they move through a defined counting zone.

Instead of asking only whether the sensor changed state, the system can reason about individual objects moving through the image.

That makes it possible to distinguish situations that look identical to a conventional sensor.

For example, vision can potentially determine that:

  • two objects passed through the line while touching each other;
  • three items were visible inside one carrier;
  • an object moved backwards and should not be counted again;
  • an empty carrier passed the camera;
  • the wrong product type appeared;
  • a product entered the counting zone but never exited it;
  • the line stopped while products were still inside the monitored area.

Common production line counting failure modes

The useful part is not that the system has a camera.

Factories already have plenty of cameras.

The useful part is that the image becomes structured information the rest of the operation can use.

Instead of footage that somebody watches after something goes wrong, the system can produce events such as:

Product detected → Product tracked → Counting zone crossed → Count updated

Those events can then be linked to a PLC, database, dashboard, batch record, checkweigher or alerting system.

This does not mean replacing the PLC

One of the easiest mistakes to make with industrial AI is trying to replace systems that are already very good at their jobs.

A PLC is extremely good at deterministic machine control.

A proximity sensor is extremely good at detecting proximity.

A checkweigher is extremely good at measuring weight.

Computer vision is useful when the process needs information those devices cannot easily provide.

The strongest systems often combine them.

For example:

  • the camera determines how many products are physically present;
  • the PLC provides machine state and line status;
  • a checkweigher confirms whether the measured weight is consistent with the expected count;
  • the vision system records the event and provides visual evidence;
  • the dashboard shows production totals and exceptions;
  • the PLC remains responsible for any approved machine intervention.

Example architecture for an industrial production line vision counting system

This creates something much more useful than an isolated AI model. It creates another source of operational information.

Where vision-based counting starts making sense

Computer vision is worth investigating when the physical process creates ambiguity.

Typical examples include products travelling very close together, overlapping objects, irregular spacing, variable product sizes, conveyors where products can move backwards, or processes where the same object could cross a traditional sensor more than once.

There are also situations where the count itself is only part of the requirement.

A manufacturer may eventually want to know:

How many?

Then:

Which type?

Then:

Was it complete?

Then:

Which batch did it belong to?

Then:

Can we see exactly what happened when the count was wrong?

At that point a conventional counter and a vision system are solving fundamentally different problems.

This is relevant across industries.

In food processing it may mean verifying product quantities or carrier contents.

In steel processing it could mean distinguishing individual billets even when spacing is poor.

In packaging it might mean checking the number of products entering a carton.

In mining and materials handling it could mean counting material classes or larger objects moving on a conveyor.

The camera changes. The model changes. The environment changes.

The basic problem is the same: the process contains useful visual information that the existing instrumentation is not capturing.

But vision has its own failure modes

Computer vision is not magic, and an industrial system should never be designed as though it is.

Lighting matters.

Camera position matters.

Motion blur matters.

Dust, steam, water, reflections and vibration matter.

A model trained on one carefully selected video is not automatically production-ready.

The right question is therefore not:

"Can AI detect this object?"

With modern computer vision, the answer to that question is often yes.

The better question is:

"Can the complete system detect and count it reliably under the actual operating conditions of this plant?"

That includes bad days, dirty lenses, unusual product spacing, maintenance activity, changing shifts and all the other things that tend not to appear in a demo video.

Start with the process, not the camera

For most plants, the first step should not be buying hardware.

Start by understanding where the existing count becomes unreliable.

Look at the physical process.

What causes the errors?

Are products touching?

Can they reverse?

Does the line stop and start?

Is the sensor actually wrong, or is another part of the production data creating the discrepancy?

What independent number can be used to validate the result?

Sometimes this exercise shows that the existing sensor can be improved for very little money.

That is a good outcome.

If the problem genuinely requires visual understanding, the next step is normally a small feasibility or proof phase using footage from the real production environment.

A practical proof should answer three things:

  1. Can the product be seen consistently under real operating conditions?
  2. Can the difficult scenarios that cause current counting errors be handled?
  3. Can the result be measured against a trusted production reference?

Only after that should the full production system be designed.

The goal is not an AI camera. It is a number you can trust.

Manufacturing teams generally do not need another piece of technology to maintain.

They need fewer unexplained discrepancies.

They need production numbers that reconcile.

They need to know when something went wrong and, ideally, why.

That is the real opportunity for computer vision in production counting.

Traditional sensors remain the right answer for a huge number of applications. But when the process becomes too visually complicated for a single ON/OFF signal, adding a system that can actually see what is happening can close the gap.

At Zenaight, we design AI and computer-vision systems around the complete operational problem: cameras, AI models, edge processing, PLC and sensor integration, dashboards, validation and the software required to make the information useful.

If you have a production count that is almost always right, that may actually be the most interesting place to start.

Why it matters

Perspective for leaders and delivery teams navigating AI systems, operational technology, and implementation decisions.

Contact

Discuss your next AI systems initiative

If your team is evaluating an AI, software, or connected systems project, we can help shape the right delivery path.