Best Machine Vision Lens for Barcode Reading, OCR, Measurement and Defect Inspection: Application Comparison Guide

The best machine vision lens for barcode reading is not automatically the best lens for OCR, dimensional measurement or surface defect inspection. All four applications use an industrial camera to capture an image, but the information that must remain visible inside that image is different.

A barcode reader needs enough resolution across individual bars or code modules for reliable decoding. An OCR system needs clean character strokes and sufficient contrast between printed text and its background. A dimensional measurement system needs repeatable edges with controlled geometric distortion. A defect inspection system may need to reveal scratches, cracks, dents, contamination or other subtle surface variations that are much smaller than the overall object.

This changes how the lens should be selected.

Instead of asking only for the “best industrial camera lens,” buyers should first define what the vision software needs to extract from the image. Field of view, focal length, sensor compatibility and camera resolution remain important, but their priority changes with the application.

For engineers, machine builders and OEMs comparing optics for identification, reading, measurement and quality inspection, this application based approach is more useful than selecting a lens from focal length or megapixel rating alone.

Kyptec Automation® provides a broad range of machine vision lenses covering several focal lengths, image formats and resolution classes. This allows the optical configuration to be selected according to the actual task, whether the camera is reading codes, recognizing characters, measuring geometry or inspecting defects.

Why the Application Should Decide the Lens

Two machine vision systems may use cameras with identical resolution and still need different lenses because the image processing objectives are different.

For barcode reading, the most important image information is the structure of the code. The individual bars or data modules must remain sufficiently distinct for the decoding algorithm.

For OCR, characters must preserve enough edge and stroke information for the software to distinguish similar letters and numbers.

For measurement, the system depends on stable edge position. Optical distortion or changing perspective can influence the calculated dimensions even when the image appears sharp.

For defect inspection, the smallest unacceptable feature has to create a detectable image difference. Fine cracks, scratches and surface defects can require considerably more optical detail and more careful illumination than simple identification.

This means the most expensive or highest resolution lens is not necessarily the right choice for every application.

The correct lens is the one that preserves the type of information the algorithm needs.

Best Machine Vision Lens for Barcode Reading

Barcode inspection is fundamentally a sampling and contrast problem.

The camera needs to see individual bars or code modules clearly enough for decoding. A barcode can occupy only a small portion of the total image, especially when one camera is responsible for inspecting an entire package or tray.

The first practical question is therefore how many pixels represent the narrowest bar or smallest module.

If a one dimensional barcode has narrow elements that occupy only one pixel, decoding reliability can become poor because blur, motion or slight changes in position can merge neighbouring features.

The same issue applies to two dimensional codes. A dense data code contains many small modules inside a limited physical area. Each module needs sufficient pixel representation.

This is why the best machine vision lens for barcode reading is not defined by focal length alone. The lens and camera combination must place enough useful pixels across the code while keeping the full required object area in view.

For a wider inspection area at relatively short working distance, a shorter focal length can be useful. Kyptec Automation® KL-1222 8 mm 10 MP Machine Vision Lens is one example of a C mount lens for a compatible 2/3 inch camera where the application requires a relatively wide view with a 10 MP optical class.

For smaller codes viewed from greater distance, a longer focal length may provide better framing because it allows the code to occupy more of the sensor.

The choice should always be validated against code size, field of view and camera pixel count.

Barcode Reading Needs More Than a Sharp Image

A barcode can appear visually recognizable to a person but still fail automated decoding.

The software must distinguish repeated high contrast transitions accurately.

Blur across the bar edges reduces the difference between black and white regions. Reflections on glossy packaging can remove part of the code. Motion can smear the narrow bars in the direction of conveyor travel.

Therefore, lens selection should be coordinated with exposure time and illumination.

For high speed barcode reading, increasing lens resolution alone will not fix motion blur. The system may require more light so the camera can use a shorter exposure.

Likewise, if a glossy code reflects the illumination into the camera, optical sharpness may be excellent while the code itself becomes partially unreadable.

The best lens for barcode scanning is therefore part of a complete reading geometry rather than an isolated component.

Best Machine Vision Lens for OCR and Character Recognition

OCR places different demands on the image.

Instead of decoding regularly spaced bars or modules, the system needs to identify the shapes of letters, numbers and symbols.

The important dimension is often the thinnest character stroke.

Imagine two printed characters with similar shapes. If fine stroke information disappears because the text is too small in the image, the OCR software may confuse them.

For this reason, an OCR machine vision system should be designed around the smallest text that must be read.

The characters should occupy enough vertical pixels, but overall character height is not the only consideration. Thin stroke width, print quality, contrast and spacing can determine whether the optical image contains enough information for reliable recognition.

Applications can include lot code reading, serial number recognition, date code inspection, label verification, packaging text inspection, engraved character reading and component marking identification.

A lens such as Kyptec Automation® KL-1216 25 mm 10 MP Machine Vision Lens can be evaluated when a compatible 1 inch camera and approximately 25 mm focal length suit the OCR geometry. The lens is one possible optical configuration rather than a universal OCR lens because character size, sensor and working distance still determine the requirement.

OCR Quality Depends Strongly on Character Stroke Contrast

An OCR system can have adequate camera resolution and still perform poorly if the printed text does not separate clearly from the background.

Dark text on a uniform matte surface is generally easier to image than low contrast engraving on shiny metal.

This means OCR lens selection should be considered together with lighting.

For printed packaging, diffuse illumination may create uniform text contrast. For engraved or embossed characters, directional light may reveal the shape more effectively.

A higher resolution industrial camera lens can preserve finer character detail, but the illumination must first make that information visible.

Before increasing camera or lens resolution, it is therefore worth checking whether recognition errors are actually caused by insufficient spatial resolution or by poor character contrast.

Barcode Reading vs OCR: Do They Need the Same Lens?

Sometimes the same lens can handle both tasks, particularly when a label contains both a barcode and printed characters.

However, the optical design should be based on whichever feature is more difficult to image.

If the barcode modules are smaller than the character strokes, barcode sampling may determine the camera resolution.

If very small printed text appears beside a relatively large barcode, OCR may become the limiting requirement.

The useful buying question is therefore: what is the smallest meaningful visual element anywhere on the label?

Design the imaging system around that feature.

This approach also helps when one inspection station must verify the barcode, OCR text, logo position and label presence in a single image.

Best Machine Vision Lens for Dimensional Measurement

Measurement is different from recognition.

A barcode reader can often tolerate some geometric distortion as long as the code remains decodable. OCR can also tolerate moderate geometric variation when the software is trained or designed to recognize transformed characters.

Dimensional measurement is much less forgiving.

The system uses image coordinates to determine distances, diameters, positions, angles or other geometric values. If the lens changes the apparent position of an edge, measurement accuracy can be affected.

For this reason, the best machine vision lens for measurement should be evaluated for geometric fidelity as well as sharpness.

Low distortion becomes important.

Stable mounting becomes important.

Focus repeatability becomes important.

Calibration becomes important.

The required field of view should also be carefully controlled because measurement precision depends partly on how many pixels represent each millimetre of the object.

For compatible 2/3 inch systems where the geometry requires greater camera distance or a narrower field, Kyptec Automation® KL-1232 50 mm 10 MP Machine Vision Lens is one example of a longer focal length C mount option that can be considered according to the measurement setup.

Why More Pixels Improve Measurement Only Up to a Point

Increasing camera resolution can provide more image samples across an edge.

This can support finer measurement, but pixels are only one part of the measurement error budget.

Suppose a system measures a 100 mm object across 5000 horizontal pixels. The nominal object sampling is about 0.02 mm per pixel.

That does not automatically guarantee 0.02 mm measurement accuracy.

Lens distortion, calibration error, object position, focus, lighting, edge contrast, vibration and algorithm behaviour can all affect the final result.

Machine vision measurement should therefore distinguish between pixel resolution and measurement accuracy.

The first describes how finely the image is sampled.

The second describes how reliably the complete system can determine a physical dimension.

The lens influences both through its ability to preserve sharp, geometrically stable edges.

Perspective Can Matter in Measurement Applications

If an object moves closer to or farther from a conventional lens, its apparent size can change.

For many ordinary inspection applications, this is acceptable.

For high precision dimensional measurement, changes in object height can introduce measurement variation.

A standard fixed focal length machine vision lens may still be suitable when the object position is well controlled and the system is properly calibrated.

When height variation is significant and very high measurement accuracy is required, specialized optical arrangements may need to be considered.

The key point for buyers is that “high resolution lens” and “measurement lens” are not automatically the same thing.

Resolution describes fine detail capability. Measurement also requires controlled geometry.

Best Machine Vision Lens for Surface Defect Inspection

Defect inspection often places the greatest emphasis on image detail and contrast.

The camera may need to detect scratches, cracks, chips, dents, stains, contamination, missing material, printing defects, surface marks or manufacturing irregularities.

The relevant feature can be much smaller than the complete product.

The best machine vision lens for defect detection is therefore one that allows the camera to use enough pixels across the smallest unacceptable defect while maintaining sufficient contrast.

For demanding high resolution inspection, a lens such as Kyptec Automation® KL-1238 16 mm 25 MP Machine Vision Lens can be considered when a compatible larger format high resolution camera and approximately 16 mm focal length fit the required imaging geometry.

A high resolution lens becomes particularly useful when a large area must remain in view while small defects still need to occupy enough sensor pixels for detection.

However, surface inspection is also where lighting can become more important than simply increasing optical resolution.

Why Defect Inspection Can Need a Different Lens Than Barcode Reading

A barcode creates intentional contrast.

Its bars or modules are designed to be visually different from their background.

A small surface defect may not.

A shallow dent can have almost the same colour as the surrounding material. A scratch on polished metal may appear bright under one lighting direction and invisible under another.

This means a defect inspection lens must preserve subtle local contrast as well as spatial detail.

If the smallest defect is extremely fine, a high resolution optical system becomes useful. But if illumination does not reveal the defect, the additional resolution may provide little benefit.

This is why defect inspection should be tested with actual good and defective samples before the final camera and lens configuration is approved.

Barcode, OCR, Measurement and Defect Inspection Compared by Smallest Feature

One of the easiest ways to compare these applications is to identify the smallest element the camera must interpret.

For a barcode, that element may be the narrowest bar or data module.

For OCR, it may be the thinnest character stroke or gap between neighbouring strokes.

For dimensional measurement, it may be the smallest edge displacement corresponding to the required tolerance.

For defect inspection, it may be the width of the smallest crack, scratch or mark that must trigger rejection.

Once this dimension is known, the camera pixel requirement can be estimated.

This creates a common engineering language across all four applications.

Worked Example: Selecting a Lens for Barcode Reading

Suppose a conveyor carries cartons that are 200 mm wide, and the entire carton face must remain visible.

The camera provides 4000 horizontal pixels.

The nominal object sampling becomes approximately 0.05 mm per pixel.

If the smallest barcode module is 0.5 mm wide, it spans about ten pixels.

That provides considerably more image information than a module spanning only two pixels.

The lens should now be selected to give approximately the 200 mm field of view at the available working distance while matching the camera sensor format and resolution.

If the working distance requires a relatively short focal length, a wide lens such as Kyptec Automation® KL-1222 may become a candidate for a compatible camera.

The lens choice follows the barcode sampling calculation rather than preceding it.

Worked Example: OCR of Small Printed Characters

Suppose a pharmaceutical or packaging inspection station needs to read characters 2 mm high.

The full label inspection area is 100 mm high and the camera provides 3000 vertical pixels.

Each millimetre is represented by about 30 pixels.

A 2 mm character therefore occupies roughly 60 vertical pixels.

This is likely to provide substantially more recognition information than a character represented by only ten pixels.

But if the character strokes are extremely thin or low contrast, illumination and focus still need to be optimized.

The lens should provide enough optical resolution that the small strokes do not blur together.

This example illustrates why OCR should be evaluated through actual character dimensions rather than only camera megapixel count.

Worked Example: Dimensional Measurement of a Machined Part

Suppose a system needs to measure a 50 mm feature and detect dimensional changes on the order of 0.05 mm.

A camera captures 2500 horizontal pixels across a 100 mm field.

The nominal sampling is approximately 0.04 mm per pixel.

That is useful information, but it should not be interpreted as a guaranteed 0.04 mm measurement accuracy.

If the required tolerance is close to the sampling scale, the system will need strong edge contrast, accurate calibration and stable geometry.

Using a lens with adequate resolution and controlled distortion becomes important because the measurement algorithm relies on precise edge location.

A longer focal length configuration can also help when the machine requires greater distance between the camera and object, provided the required field of view remains available.

Worked Example: Surface Defect Inspection

Suppose a manufacturer needs to find scratches approximately 0.2 mm wide across a 150 mm inspection area.

The camera provides 6000 horizontal pixels.

Object sampling becomes approximately:

150 mm ÷ 6000 = 0.025 mm per pixel.

A 0.2 mm scratch would therefore occupy about eight pixels across its width under ideal geometric conditions.

That gives the optical system a meaningful sampling target.

If the camera is high resolution and uses a larger sensor, a compatible high resolution lens may be appropriate. Kyptec Automation® KL-1238 at 16 mm is one option within the 25 MP class when its field of view and sensor format match the system.

The final inspection still needs real scratch samples because a reflective surface can make an eight pixel feature difficult to detect if contrast is poor.

Which Application Usually Needs the Highest Lens Resolution?

There is no universal ranking, but fine defect inspection and precision measurement often impose the strongest optical requirements.

Barcode reading may require only enough resolution to separate the smallest modules reliably.

OCR requires enough detail to preserve character strokes.

Measurement depends on accurate edge localization and geometric stability.

Defect inspection can require extremely fine spatial detail, particularly when a small defect must be found across a large field of view.

However, a very dense barcode or tiny OCR marking can sometimes require more spatial resolution than a relatively large defect.

Application names alone therefore do not determine the correct lens resolution.

Feature size does.

Which Application Is Most Sensitive to Lens Distortion?

Dimensional measurement is normally the most directly sensitive because distortion changes the mapping between object position and image position.

Barcode reading and OCR algorithms can often tolerate or computationally handle moderate geometric changes, depending on the application.

Defect inspection may also tolerate some distortion when the objective is simply to classify a surface region.

For measurement, even small geometric errors can become part of the dimensional result.

This is why a lens for industrial metrology should be evaluated differently from a lens used purely for reading identification codes.

Which Application Is Most Sensitive to Lighting?

All four applications depend on lighting, but the reason differs.

Barcode reading needs clear separation between code elements.

OCR needs readable strokes against the background.

Measurement needs crisp, repeatable edges.

Defect inspection needs the illumination to make physical abnormalities visible.

Surface defect inspection can be especially sensitive because many defects are revealed primarily through how they interact with light.

A small scratch can disappear entirely under one illumination direction and become obvious under another.

Therefore, there is no meaningful “best defect detection lens” without considering the illumination geometry.

What Focal Length Is Best for These Applications?

There is no barcode focal length, OCR focal length, measurement focal length or defect inspection focal length.

Focal length should be derived from sensor size, required field of view and working distance.

A barcode system could use 8 mm, 16 mm, 25 mm or 50 mm depending on the physical arrangement.

The same is true for OCR and defect inspection.

This is one reason Kyptec Automation® offers multiple focal lengths inside different optical resolution classes. The Machine Vision Lens collection allows engineers to choose the required resolution class and then select a focal length suited to the machine geometry.

Why One Lens Can Sometimes Handle Several Inspections

Modern machine vision stations often perform several tasks from one image.

A packaging system may read a barcode, recognize printed text, verify label position and inspect the package for damage.

In this situation, lens selection should be based on the most demanding visual requirement.

If the smallest barcode module requires more pixels than the text strokes, barcode reading can determine the optical specification.

If the package includes extremely small printed characters, OCR can become the limiting factor.

If tiny printing defects must also be detected, defect inspection may set the final resolution requirement.

The safest approach is to list every visual feature and identify which one requires the highest spatial detail or strongest geometric accuracy.

When Separate Cameras Are Better Than One High Resolution Camera

Using one camera for every inspection is attractive because it can reduce hardware count.

But it is not always the most efficient design.

A wide field camera may be excellent for barcode and OCR verification while providing too few pixels across a tiny surface defect.

Instead of replacing the complete system with an extremely high resolution camera, a second camera with narrower field of view can be added for the critical defect.

Similarly, precision measurement may benefit from a dedicated controlled optical geometry even when another camera already sees the complete component.

Machine vision architecture should therefore be optimized for inspection reliability rather than minimizing camera count at all costs.

Why Kyptec Automation® Offers Useful Flexibility for Application Based Lens Selection

Different applications create different optical priorities, which is why a broad lens family is more useful than one general purpose specification.

For moderate imaging and wide coverage, Kyptec Automation® KL-1202 provides an 8 mm 5 MP Machine Vision Lens for compatible 2/3 inch C mount systems.

For higher resolution wide field imaging, Kyptec Automation® KL-1222 provides the same 8 mm focal length in a 10 MP class.

For a more moderate field on a larger compatible sensor, Kyptec Automation® KL-1216 provides 25 mm focal length, 10 MP optical resolution and 1 inch format.

For greater working distance or tighter framing in compatible 2/3 inch systems, Kyptec Automation® KL-1232 provides a 50 mm, 10 MP configuration.

For demanding high resolution inspection, Kyptec Automation® KL-1238 provides a 16 mm, 25 MP class option.

The advantage is not that one model is designated as a barcode lens while another is designated only for defects. The advantage is that engineers can match focal length, sensor format and optical resolution to whichever application requirement is dominant.

Kyptec Automation® supports machine vision and factory automation applications across industries including automotive, electronics, pharmaceutical, food processing, textiles and printing, making the range relevant to OEMs and system integrators building different types of inspection platforms.

Frequently Asked Questions About Machine Vision Lenses for Barcode, OCR, Measurement and Defect Inspection

1. Can one machine vision lens read a barcode and measure its position at the same time?

Yes, if the image provides enough pixels for barcode decoding and the optical geometry is stable enough for the required positional measurement. The measurement requirement can be more demanding than decoding because it depends on accurate coordinate mapping. When both tasks are performed from one image, choose the lens according to the stricter requirement and calibrate the measurement system properly.

2. What matters more for barcode reading: megapixels or pixels per barcode module?

Pixels per module is the more meaningful application metric. Total camera megapixels do not tell you how large the barcode appears inside the final image. A lower resolution camera with a narrow field of view can sometimes provide more pixels across each barcode module than a much higher resolution camera viewing a very large area.

3. Why can my OCR system read large letters but fail on small serial numbers?

The smaller characters may not provide enough pixels across their strokes, or the stroke contrast may be insufficient. Calculate how many pixels represent the smallest character height and stroke width. If sampling is adequate, improve focus and illumination before assuming the recognition software is the problem. A higher resolution Kyptec Automation® lens can become relevant when the camera sensor genuinely needs finer optical detail.

4. Does OCR require a higher resolution lens than barcode reading?

Not automatically. A dense barcode with extremely small modules can be more demanding than large printed text. Conversely, very small characters with thin strokes may require more optical detail than a large barcode. Compare the smallest module dimension with the smallest character stroke rather than deciding from the application name.

5. Can a standard fixed focal length machine vision lens be used for dimensional measurement?

Yes, for many applications where object position is controlled, the lens has suitable optical performance and the system is properly calibrated. High precision measurement can place additional demands on distortion and perspective control. The required accuracy should therefore be defined before selecting the optical system.

6. Why does my measured dimension change when the object height changes?

With conventional perspective imaging, changing object distance can change apparent magnification. If the part moves toward or away from the lens, the measured pixel size may change unless the system geometry and calibration account for it. This issue is especially important when dimensional tolerance is tight.

7. Is a 25 MP lens necessary for surface defect inspection?

Only when the camera sensor and required defect sampling justify that optical resolution. A large visible defect may be detected reliably using a lower resolution system. A 25 MP lens becomes more useful when a compatible high resolution camera must detect very small features across a relatively large field. Kyptec Automation® KL-1238 is one available 25 MP option when its sensor format and focal length suit the inspection geometry.

8. Can barcode reading and defect inspection use the same lighting?

Sometimes, but not always. Barcode reading usually benefits from illumination that maximizes contrast between code elements. Surface defects may need directional, diffuse or other specialized lighting to make texture variations visible. If one camera must perform both tasks, lighting should be tested against the more difficult feature.

9. Which lens parameter is most important for OCR on moving products?

Adequate spatial resolution is important, but motion control can become equally important. If the characters move significantly during exposure, their strokes blur regardless of lens sharpness. Use sufficient illumination to support a short exposure, then choose a lens that preserves the required character detail at the target field of view.

10. Why does my barcode decode when the product is stopped but fail on the conveyor?

Motion blur is a common cause. Narrow bars or modules can smear into neighbouring regions during exposure. Increasing lens resolution alone will not correct this. Shorter exposure time, stronger illumination, correct triggering and adequate optical sampling are typically more relevant.

11. Can I use one wide angle lens to inspect several barcodes in the same image?

Yes, provided every barcode still receives enough pixels across its smallest modules. A wide angle lens increases scene coverage, but each individual code occupies a smaller portion of the sensor. Kyptec Automation® KL-1222 at 8 mm can be evaluated for compatible wide field 10 MP systems when the resulting barcode sampling remains sufficient.

12. What makes a lens suitable for precision edge measurement?

The lens should provide adequate resolution, repeatable focus, sufficient sensor coverage and controlled geometric behaviour across the measurement region. Edge contrast and calibration are also critical. A sharp image alone is not enough if geometric distortion or changing object position introduces measurement uncertainty.

13. Should a defect inspection camera use a narrower field of view than a barcode camera?

Often it may, because small defects can require many more pixels per millimetre than a barcode needs. A dedicated narrow field inspection can concentrate the camera resolution on the defect region. However, if a high resolution camera provides sufficient sampling across the full product, the same field can sometimes support both tasks.

14. How do I choose a lens when the same station needs OCR, barcode reading and measurement?

Identify the smallest code module, smallest character stroke and tightest measurement tolerance. Determine which requirement produces the highest pixel density or geometric accuracy demand. Design the camera and lens around that limiting requirement, then verify that the remaining tasks also perform reliably. The Kyptec Automation® machine vision lens range provides different focal lengths and resolution classes that can be compared once this limiting requirement is known.

15. What application details should I provide before asking which machine vision lens to buy?

Provide the exact inspection task, camera sensor and resolution, field of view, working distance and the smallest visual feature involved. For barcode reading, include module size. For OCR, provide character height and minimum stroke width. For measurement, provide the required tolerance and object geometry. For defect inspection, provide the smallest defect dimensions and surface type. These details allow Kyptec Automation® lens options to be narrowed according to real application requirements rather than a generic recommendation.

A Practical Application Based Lens Selection Method

If the application is barcode reading, begin with the smallest barcode module and calculate how many sensor pixels will represent it. Then choose the field of view, camera and lens geometry that preserve enough module detail while controlling motion blur.

If the application is OCR, begin with the smallest text and especially the narrowest character stroke. Confirm that the character receives sufficient pixels and that illumination produces reliable contrast.

If the application is measurement, begin with the required tolerance and complete measurement range. Determine the required object sampling, then pay close attention to distortion, calibration, focus stability and object position.

If the application is defect inspection, begin with the smallest unacceptable defect and the type of surface on which it appears. Calculate pixels across the defect, then design lighting that makes that feature visually different from acceptable material.

After the application requirement is established, choose focal length according to working distance and field of view. Confirm sensor coverage. Then select the optical resolution class appropriate for the camera.

This sequence prevents the lens specification from driving the application backward.

Which Machine Vision Lens Should You Finally Buy?

For barcode reading, buy a lens that provides adequate module sampling, stable focus and suitable framing at production speed. The lens does not need to be the highest resolution model if every critical barcode element already occupies enough useful pixels.

For OCR, prioritize sufficient character and stroke detail together with consistent contrast. Higher optical resolution becomes useful as text becomes smaller or more complex.

For dimensional measurement, prioritize repeatable geometry and edge quality rather than resolution alone. Calibration and distortion become especially important.

For defect inspection, prioritize pixels across the smallest defect, optical detail and the ability of the lighting system to make the defect visible.

There is therefore no single “best machine vision lens” for all four applications.

The best lens is application specific.

Kyptec Automation® is useful for this type of purchasing decision because the Machine Vision Lens portfolio includes multiple combinations of focal length, resolution and image format instead of forcing barcode reading, OCR, measurement and defect inspection into one optical configuration.

An OEM designing a general inspection platform may find a moderate 10 MP lens configuration appropriate. A high resolution defect inspection system may need a 25 MP optical class. A simpler identification station may perform reliably with a 5 MP lens when its field of view and feature size are favourable.

The correct specification is the one that produces enough usable image information for the algorithm to make the required decision.

For buyers, system integrators and machine builders, the final lens selection should therefore begin with one simple question:

What is the smallest or most geometrically critical piece of information that the machine vision software must extract from this image?

For barcode reading, that is usually the code module.

For OCR, it is often the character stroke.

For dimensional measurement, it is the edge position required to meet the tolerance.

For defect inspection, it is the smallest unacceptable physical defect.

Define that requirement first, and the choice of machine vision lens becomes far more accurate, practical and economical.