How can a single lens directly affect the stability of visual measurements?
Source:Shenzhen Kai Mo Rui Electronic Technology Co. LTD2026-08-24
When performing visual measurement, you’ll often encounter this situation:
For the same product, the measurement results keep fluctuating.
The first reaction is often that the algorithm is unstable.
Adjusting the threshold, tweaking the parameters, and re-searching for edges—after fiddling around for ages, the effect still isn't obvious.


At this point, you might as well take a look at the lens first.
Because measurements of dimensions, hole spacing, and angles all ultimately come down to one thing:
Edge.
The lens can't stabilize the edges no matter how much the algorithm is adjusted—the result remains difficult to stabilize.
If the measurement is unstable, first check whether the image is stable.
In a visual system, the lens is often treated as just an accessory.
In fact, when conducting measurements, its importance is no less significant.
The lens affects the field of view, distortion, depth of field, and sharpness—all of which ultimately impact edge quality.
For example, measuring a dimension.
The algorithm first identifies two edges and then calculates the distance between them.
If the clarity of the edges varies each time the product comes through, the positions identified will naturally fluctuate as well.
So when you encounter fluctuations in measurement values, don't just ask:
“Is the algorithm stable?”
I’d also like to ask one more question:
“Is the image itself stable?”
The images are unstable, making it difficult for the algorithm to produce stable results.
Focal length isn't just about being able to fit it in the frame.
Common lens focal lengths include 8mm, 16mm, and 25mm, among others.
You don’t need to overcomplicate the focus at the scene.
Simply put, it affects two things:
How wide is the field of view, and how far away is the camera mounted?
Short focal lengths typically offer a wider field of view, but edge distortion may be more pronounced.
A longer focal length results in a narrower field of view and makes the system more sensitive to installation distance and space requirements.
Therefore, when selecting a lens, you can't just focus on whether the workpiece can be fully captured in the frame.
At least these few conditions need to be determined first:
Workpiece dimensions, installation distance, and camera target plane.
If you don’t clarify these few conditions and just pick a lens based on experience, you might end up in a really troublesome situation later on:
It can shoot and measure, but it just isn’t stable enough.
This kind of problem is more troublesome than being completely unusable.
Because it looks like there’s nothing wrong anywhere.
Avoidance tip:In measurement-based projects, only when the lens ensures edge stability can the algorithm have a chance to compute stably.

The image is dark—don't immediately open the aperture wide.
The on-site image is a bit dark, so many people tend to start by opening the aperture wide.
The picture is indeed bright.
But there’s another issue that’s easy to overlook:
The depth of field has changed.
The larger the aperture, the shallower the depth of field;
The smaller the aperture, the greater the depth of field.
If the product height varies, or if there’s fluctuation in the mechanism’s positioning, and the depth of field is insufficient, the following may occur:
This product is clear; the next one feels a bit vague.
Although the difference may not seem significant to the naked eye, it could already have an impact on edge detection.
The final phenomenon observed is:
The measurement results have begun to fluctuate.
Therefore, when measuring the aperture for a lighting adjustment, you can't just focus on whether it's bright or not.
You also need to check whether the edges remain sharp after the product’s position has changed.
Just because something looks clear doesn't mean it's suitable for measurement.
This is a point in the measurement project that’s easy to confuse.
Someone might say:
“This picture is pretty clear—there shouldn’t be any problems with the lens, right?”
Not necessarily.
If you’re only concerned with determining presence or absence and can reliably distinguish the target, that’s often sufficient.
But the measurements are different.
The measurement is intended to determine the precise edge locations, dimensions, hole spacing, and angles.
So, in addition to clarity, you also need to consider:
Is the distortion big or small?
Is the depth of field sufficient?
Are the edges at different locations consistent?
Will the size performance change after the product's height changes?
For measurement, the image doesn't necessarily get better the “more appealing” it is.
Stability and repetition are often more important than simply appearing clear.
Why are telecentric lenses often used in measurement applications?
Standard lenses have a perspective effect.
Simply put:
For the same object, its apparent size in the image may differ depending on whether it’s closer to or farther from the lens.
If the only question is whether a product exists or not, this issue often doesn't matter much.
But if you need to measure dimensions, hole spacing, and angles, you’ll have to think carefully.
An important value of a telecentric lens is that it reduces this perspective distortion within a certain range.
Telecentric lenses can eliminate perspective distortion, so they are often used in measurement applications.
Of course, you don’t necessarily have to use a telecentric lens just for measurement.
Whether a standard lens can meet the requirements depends on the specific project.
If all you need is presence or absence detection, a standard lens is usually sufficient.
If you have high requirements for the stability of dimensions, hole spacing, and angles, then a telecentric lens is worth considering.
It’s not that telecentric lenses are always better—rather, it depends on whether this particular project actually requires them.
There’s another issue with the lens: in the end, it has to be fitted into the device.
C-Mount, F-Mount, M42, M72……
These interfaces may seem like minor issues, but they might not be so minor once it comes time to install the equipment.
Because next to the camera there are also lenses, light sources, cables, protective covers, and mechanisms—and sometimes you also need to account for maintenance space.
So when choosing a lens, you can't just look at the optical specifications.
Also consider:
Can it be installed? Is there enough space? Is it easy to adjust later on?
At first, you might not care much about it, but once the mechanical structure is finalized and you realize the lens can’t fit in after all, that’ll be a real hassle.
The measurement results are erratic—don’t let the algorithm take the blame first.
Back to the original question.
Why does a single lens directly affect the stability of visual measurements?
The reason is actually very simple:
The algorithm doesn't see the workpiece itself—it sees the workpiece as captured by the lens.
An improper focal length may affect the field of view and cause distortion.
If the depth of field is insufficient, even a slight variation in the product's height can cause the edges to appear blurry.
Perspective has a noticeable effect: as the relative positions of objects change, their apparent sizes in the image may also change accordingly.
These issues will ultimately affect the edges.
And once the boundary changes, the measurement results will naturally change as well.
So when you encounter fluctuations in measurement data, don't rush to modify the program yet.
Let's take a look at the original image first.
Is the edge stable?
Is the clarity consistent across different products?
Has the image changed after the product’s position and height have been altered?
Are there any issues with distortion, depth of field, or the installation reference?
Many times, after spending ages tweaking the parameters, the root cause isn't necessarily in the algorithm.
If you want to achieve stable visual measurement, first make sure the images are stable.
The earlier you clarify your lens selection, the easier it will be to debug later on.
When you’re taking dimension measurements and encounter data that keeps jumping back and forth, what’s the first place you’d typically check?
Algorithms, lenses, light sources, or mechanisms?
Related News
- 2026-08-25
- 2026-08-25
Exposure and Exposure Compensation
2026-08-25Aperture (F‑Number) and A Mode
2026-08-24- 2026-08-24
How can a single lens directly affect the stability of visual measurements?
2026-08-24






+8613798538021