Machine Vision Lens for Deep Holes, Recessed Features and Cavity Inspection: How to Choose Focal Length and Working Distance
Inspecting a flat external surface with machine vision is relatively straightforward because the required feature usually has a direct optical path to the camera. Deep holes, recessed features, counterbores, cavities, pockets and internal shoulders create a different problem. The feature of interest may sit several millimetres or centimetres below the surrounding surface, while the upper walls of the recess partially block the camera's view. A machine vision lens can be perfectly focused and sufficiently high in resolution yet still fail to reveal the required feature because the viewing geometry does not provide a clear optical path into the cavity.
For buyers searching for a machine vision lens for deep hole inspection, industrial lens for cavity inspection, lens for recessed feature inspection, or guidance on how to inspect inside a hole with machine vision, focal length and working distance need to be considered together with hole diameter, cavity depth, opening geometry, sensor size and the location of the actual inspection feature. The objective is not simply to make the hole appear large in the image. The optical system must allow the camera to see the required bottom surface, inner edge, internal shoulder or recessed feature while retaining enough pixels and focus for reliable inspection.
Kyptec Automation® offers a broad Machine Vision Lens portfolio covering multiple focal lengths, sensor formats and resolution classes. The current collection includes 2/3", 1" and larger-format machine vision lens options across several focal lengths, giving OEM machine builders and system integrators flexibility to design the optical geometry around the actual recess rather than selecting focal length independently of working distance.
Why Deep Hole Inspection Is Primarily a Visibility Geometry Problem
The first requirement in cavity inspection is line of sight. If the upper wall of a deep hole blocks the feature at the bottom, increasing camera resolution does not solve the problem. The sensor simply receives a more detailed image of the obstruction.
Consider a narrow hole with substantial depth. When the camera views from even a modest angle, the near wall can hide a large portion of the bottom surface. A shallow recess with the same opening diameter may remain almost completely visible.
For this reason, machine vision lens selection for deep recessed features should begin with the physical dimensions of the opening and cavity before discussing megapixels.
Record Hole Diameter and Cavity Depth Separately
Two cavities with the same opening diameter can require very different optical arrangements if their depths differ.
A 20 mm diameter recess that is only 3 mm deep presents relatively modest geometric obstruction. The same 20 mm opening with a 30 mm depth behaves very differently because the walls form a much longer viewing tunnel.
The key inputs should therefore include opening diameter or width, cavity depth, required bottom inspection width, location of the critical feature and available camera position.
A useful purchasing specification should never state only “inspect a 20 mm hole.” The depth and required internal feature are equally important.
Working Distance Changes the Viewing Geometry
Working distance is the distance between the lens and the object region being imaged. In recessed inspection, however, more than one relevant plane exists.
The top surface of the component can be significantly closer to the lens than the bottom of the cavity. If a recess is 20 mm deep, the bottom inspection plane is approximately 20 mm farther from the lens than the surrounding upper surface, depending on geometry.
That difference affects magnification and focus requirements.
The engineer should therefore specify both the approximate camera-to-top-surface distance and the distance to the deepest required inspection feature.
Why More Working Distance Can Sometimes Improve Access Into a Recess
Increasing stand-off can reduce the angular severity of rays travelling from different portions of the cavity toward the lens. In some layouts, this can make it easier to obtain a useful view into the recessed feature while reducing extreme perspective.
The trade-off is that increasing camera distance generally changes FOV. A longer focal length may then be required to keep the cavity large enough on the sensor.
This is why focal length and working distance for deep hole inspection should be selected as a pair rather than independently.
Why Longer Focal Lengths Are Often Considered for Greater Stand-Off
A longer focal length gives a tighter field of view than a shorter focal length under comparable sensor and distance conditions. If mechanical constraints require the camera to remain farther from the component, a 35 mm, 50 mm or 75 mm lens can therefore be evaluated to retain sufficient object scale.
For compatible 2/3" 10 MP systems, the Kyptec Automation® KL-1230 35 MM Machine Vision Lens With 10 MegaPixel & 2/3" Format Lens provides a 35 mm focal length, 10 MP optical class, C-mount interface, 2/3" format and F2.8–16 aperture range.
A 35 mm configuration can be useful when a localized recessed feature needs more sensor coverage than a broad field would provide, subject to actual cavity geometry and working distance.
A 50 MM Lens Can Support Tighter Inspection From Greater Distance
Where more stand-off is available and the cavity occupies a relatively small physical region, a 50 mm machine vision lens can provide a tighter field.
For compatible 1" systems, the Kyptec Automation® KL-1220 50 MM Machine Vision Lens With 10 MegaPixel & 1" Format Lens is specified with 50 mm focal length, 10 MP resolution, 1" image format, C-mount and F2.5–22 aperture range.
Such a configuration can be evaluated for recessed-feature measurement, counterbore inspection or localized cavity inspection when the required FOV is comparatively narrow and the camera cannot be mounted close to the product.
When a 75 MM Machine Vision Lens Can Be Relevant
Some machines require even greater camera stand-off because tooling, guarding or mechanical assemblies prevent close placement.
Kyptec Automation® also publishes the Kyptec Automation® KL-1302 75 MM Machine Vision Lens With 1.5 MegaPixel & 2/3" Format Lens, specified with a 75 mm focal length, 1.5 MP resolution class, 2/3" format and C-mount interface.
A longer focal length can be useful where the application prioritizes localized viewing from greater distance, but its lower optical resolution class should be checked against the minimum defect or measurement requirement before selection. Longer focal length alone does not make it the correct choice for every deep-hole application.
Focal Length Does Not Determine Whether the Bottom Is Visible
A common misconception is that selecting a longer lens automatically allows a camera to “see deeper.”
Focal length primarily changes field of view and magnification for a given sensor and working distance. It does not remove physical occlusion.
If the hole walls block the required feature, changing from 25 mm to 50 mm cannot create a line of sight that does not exist.
The camera position, hole aspect ratio and required viewing angle must first permit visibility. Focal length is then chosen to frame that visible feature with adequate resolution.
Hole Aspect Ratio Is a Useful First Screening Parameter
The ratio between cavity depth and opening width provides a quick indication of how difficult the feature may be to view.
A wide, shallow pocket typically provides much better optical access than a narrow, deep hole. As depth increases relative to opening diameter, the available viewing cone becomes smaller.
This is why applications involving inspection of deep narrow holes should be treated differently from ordinary surface inspection.
Before purchasing the lens, engineers should confirm that the required bottom or internal wall feature can physically be viewed from the available camera location.
Coaxial Camera Placement Can Improve Bottom Visibility
When the inspection requirement is concentrated on the bottom of a symmetrical hole, aligning the optical axis as closely as practical with the hole axis can improve visibility by reducing obstruction from one side wall.
An off-axis camera can expose one internal wall more strongly but may hide part of the opposite wall or bottom.
Therefore, the correct camera angle depends on what must actually be inspected. Bottom-surface inspection, sidewall defect inspection and shoulder-edge inspection may require different viewing geometries even when the cavity dimensions are identical.
Internal Sidewall Inspection Is Different From Bottom Inspection
A camera looking directly down the hole axis is well suited to viewing the bottom but does not necessarily provide the best view of vertical internal sidewalls.
A sidewall is nearly parallel to the viewing direction in an axial configuration, which can reduce its apparent width.
If the defect is located on an inner wall, the camera may need a controlled offset or angled view. This creates additional occlusion and perspective considerations.
The buyer should therefore specify where inside the cavity the critical defect is located, not simply that the product contains a hole.
Recessed Shoulder Inspection Requires Enough Pixels on the Ring Feature
Counterbores, stepped holes and recessed seats frequently contain circular shoulders that need inspection for diameter, edge damage, burrs or seating quality.
These features may occupy only a narrow annular region in the image. A very wide FOV can cause that ring to use too few pixels for reliable analysis.
A localized 25 mm or 35 mm focal-length configuration can therefore be preferable when the required cavity fits comfortably within the field.
For compatible 2/3" 10 MP cameras, the Kyptec Automation® KL-1228 25 MM Machine Vision Lens With 10 MegaPixel & 2/3" Format Lens provides a 25 mm, 10 MP, C-mount, 2/3" configuration with an F2.8–16 aperture range.
Field of View Should Be Based on the Recess, Not the Whole Component
If the camera's only job is to inspect one 15 mm cavity on a 200 mm component, capturing the complete component can waste most available pixels.
A tighter FOV centred around the cavity can give the relevant feature substantially more sensor coverage.
This is particularly useful for small burr detection inside holes, internal edge inspection and recessed dimensional measurement.
However, sufficient surrounding area should remain available for product-position tolerance and reliable feature location.
Calculate Pixels per Millimetre at the Inspection Plane
For defect inspection, the critical pixel scale should be calculated at the cavity feature itself.
If a 4,000-pixel horizontal image covers 40 mm at the bottom inspection plane, the approximate horizontal sampling is 100 pixels/mm. If the FOV is 200 mm, it falls to approximately 20 pixels/mm.
The correct FOV therefore depends strongly on minimum defect size.
The engineer should calculate object sampling for the actual recessed plane rather than using the upper product surface as the only reference.
Cavity Depth Creates a Depth-of-Field Requirement
A recessed feature can contain inspection surfaces at several depths: top edge, internal shoulder, bottom plane and possibly intermediate steps.
If all of these must remain sharp in one image, the lens requires enough usable depth of field to cover their object-distance difference.
The aperture can be reduced to increase depth of field, but excessive stopping down reduces available light and can eventually reduce fine-detail resolution through diffraction.
The final aperture should therefore be determined using the deepest and nearest required features, not simply by maximizing depth of field.
Focus on the Actual Critical Inspection Plane
If the application only needs the cavity bottom, focusing on the surrounding upper component surface can be misleading.
The correct focus reference is the physical feature that drives the pass/fail decision.
For example, if the system inspects a bottom hole surface for contamination or machining defects, focus should be optimized at that depth. The upper edge can be allowed to fall slightly outside peak focus if it is not critical.
Conversely, if both top and bottom edges must be measured, the system needs a depth-of-field compromise that supports both.
High Resolution Helps Only After Visibility Is Solved
A higher-resolution optical configuration can provide more useful detail across a recessed surface, but only if the feature is actually visible.
For demanding larger-format applications, the Kyptec Automation® KL-1244 50 MM Machine Vision Lens With 25 MegaPixel & 1.1" Format Lens is published as a 50 mm, 25 MP C-mount machine vision lens with an F2.8–22 aperture range within Kyptec Automation®'s larger-format family.
This higher-resolution class can be relevant for fine recessed measurements or small internal defects on compatible larger sensors, but optical access and FOV should be solved before increasing pixel count.
Larger Sensors Can Support More Detail Across a Wider Cavity Field
When several recessed features need to be captured simultaneously, the physical FOV may need to increase.
A larger high-resolution sensor, paired with a compatible machine vision lens, can provide more total pixels across that broader field.
This is preferable to simply widening the field on a lower-resolution system until each hole occupies too few pixels.
The correct approach is therefore to balance total FOV with minimum pixels required per cavity feature.
Product Position Variation Can Hide Recessed Features
A hole that is fully visible when perfectly centred may become partially obscured if the product shifts laterally.
This happens because the viewing axis no longer passes through the opening in the same way. The upper wall can begin blocking the cavity bottom.
For conveyor or loosely fixtured parts, the required position tolerance should therefore be included in the optical-access check.
A recessed inspection system should be tested at the worst permitted product displacement, not only with a perfectly centred sample.
Tilted Holes Require a Different Visibility Calculation
Not every cavity axis is perpendicular to the main product surface.
A drilled feature may be intentionally angled, or the product itself may enter the station with angular variation. In these cases, the camera-to-hole alignment changes significantly.
The opening can appear elliptical and one internal wall can hide more of the bottom.
The machine vision lens should therefore be selected only after the actual hole axis relative to the camera has been established.
Deep-Hole Measurement Requires Calibration at the Correct Depth
If the system measures the diameter of an internal shoulder or cavity-bottom feature, calibration should correspond to that measurement plane.
The pixel-to-millimetre scale at the top surface is not automatically identical to the scale at a deeper plane because object distance differs.
This becomes increasingly important as cavity depth grows or measurement tolerance becomes tighter.
For recessed dimensional inspection, optical geometry should be finalized first and calibration performed using a reference feature positioned at the relevant depth.
Avoid Refocusing Between Different Hole Depths Where Possible
If different products contain recesses at different depths, repeatedly refocusing the lens can complicate production changeovers and potentially change image scale.
Where the total depth range is moderate, designing enough depth of field to cover all approved products can create a more repeatable system.
If the required depth range is too large, each optical condition should be validated separately rather than assuming one calibration remains correct after focus changes.
Why Kyptec Automation® Is a Practical Choice for Recessed Feature Inspection
Deep-hole and cavity inspection can require very different focal lengths depending on cavity dimensions, camera stand-off, sensor format and minimum feature size. Kyptec Automation® provides a broad Machine Vision Lens range with multiple focal lengths and optical resolution classes, allowing engineers to build the lens selection around the real inspection geometry.
For compatible 2/3" 10 MP systems, Kyptec Automation® KL-1228 25 MM Machine Vision Lens With 10 MegaPixel & 2/3" Format Lens provides a moderate focal-length option, while Kyptec Automation® KL-1230 35 MM Machine Vision Lens With 10 MegaPixel & 2/3" Format Lens offers a tighter field. Both are officially specified with C-mount interfaces, 2/3" image format and F2.8–16 aperture ranges.
For compatible 1" systems requiring additional stand-off, Kyptec Automation® KL-1220 50 MM Machine Vision Lens With 10 MegaPixel & 1" Format Lens provides a 50 mm configuration, while Kyptec Automation® KL-1244 50 MM Machine Vision Lens With 25 MegaPixel & 1.1" Format Lens provides a higher-resolution larger-format alternative for demanding applications. This diversity helps OEMs choose according to the actual cavity FOV, working distance and required detail rather than assuming one standard focal length is suitable for every recessed inspection.
Frequently Asked Questions About Machine Vision Lenses for Deep Holes, Recessed Features and Cavity Inspection
1. What is the best machine vision lens for deep hole inspection?
There is no universal focal length because hole diameter, depth, working distance, sensor format and required internal feature all affect selection. A 25 mm or 35 mm lens can suit moderate localized fields, while 50 mm or longer focal lengths may be evaluated where greater camera stand-off is required. The first requirement is confirming a clear optical path to the feature.
2. Can a longer focal length see deeper inside a hole?
Not automatically. Longer focal length provides a tighter FOV at comparable geometry but cannot see through a wall that physically blocks the feature. Hole aspect ratio and camera alignment determine visibility first; focal length then determines how much of the visible feature occupies the sensor.
3. How does working distance affect cavity inspection?
Greater working distance changes FOV and can sometimes make the viewing geometry less severe relative to the depth of the recess. A longer focal length may then be used to maintain useful magnification. The final combination should be calculated rather than changing working distance independently.
4. Why can I see the top of a hole clearly but not the bottom?
The upper walls may be blocking the line of sight to the bottom. This is common in narrow, deep cavities or when the camera axis is offset from the hole axis. Increasing resolution will not correct physical occlusion; camera location and cavity geometry must be addressed first.
5. Should the camera be aligned with the hole axis?
For inspecting the bottom of a symmetrical hole, near-axial viewing often improves access. If the requirement is sidewall inspection, however, a different viewing direction may be necessary. The camera orientation should therefore be chosen according to the actual internal feature being inspected.
6. Which Kyptec Automation® lens can be considered for a moderate recessed inspection field?
For compatible 2/3" 10 MP systems, Kyptec Automation® KL-1228 25 MM Machine Vision Lens With 10 MegaPixel & 2/3" Format Lens provides a 25 mm configuration with F2.8–16 aperture control. Its suitability depends on the required cavity FOV and available working distance.
7. When should I consider a 35 mm machine vision lens for cavity inspection?
A 35 mm lens can be useful when the inspection area is more localized or the camera is mounted farther away than a broader-field configuration requires. Kyptec Automation® KL-1230 35 MM Machine Vision Lens With 10 MegaPixel & 2/3" Format Lens provides a 35 mm, 10 MP, 2/3" C-mount option.
8. Can a 50 mm lens be used to inspect recessed features from farther away?
Yes, where the resulting FOV and object sampling match the application. Kyptec Automation® KL-1220 50 MM Machine Vision Lens With 10 MegaPixel & 1" Format Lens provides a 50 mm, 10 MP, 1" C-mount configuration with an F2.5–22 aperture range. Optical access to the recess must still be confirmed.
9. How do I inspect a small burr at the bottom of a hole?
Use a sufficiently tight FOV so the bottom feature receives adequate pixels, ensure the hole walls do not obstruct it, and focus at the bottom inspection plane. Qualification should use representative minimum-size burrs at the worst permitted product position rather than only a perfectly centred component.
10. Does cavity depth affect focus?
Yes. The bottom of a deep cavity lies farther from the lens than the top surface, so the two planes may not both remain within the available depth of field. If both are important, aperture and focus should be optimized to cover the complete required depth range.
11. Can higher megapixels solve deep-hole inspection problems?
Higher resolution can improve sampling of a visible feature but cannot solve blocked line of sight. Once optical access is established, a higher-resolution machine vision lens and compatible sensor can be valuable for small internal defects or precise recessed measurements.
12. How should I choose FOV for recessed feature inspection?
Base the FOV on the actual cavity region and required product-position tolerance rather than the full component unless the entire component must also be inspected. A tighter relevant field gives more pixels per millimetre to the recessed feature and can improve small-defect visibility.
13. Why does the cavity bottom disappear when the product shifts sideways?
Lateral product movement changes alignment between the camera axis and cavity opening. One upper wall can begin blocking the bottom. The system should therefore be validated at maximum expected product-position variation, particularly when the opening is narrow relative to depth.
14. Can one machine vision lens inspect both the top surface and bottom of a recess?
It can if both planes remain within acceptable depth of field and the FOV includes the required areas. If the depth difference is large, the aperture and focus compromise may not provide sufficient fine-detail resolution at both planes. Qualification should be based on the smallest feature on each required surface.
15. Is the pixel scale at the bottom of a cavity the same as at the top surface?
Not necessarily. Because the two planes are at different object distances, their image magnification can differ. For precision measurement, calibration should correspond to the actual recessed measurement plane rather than assuming the upper-surface scale applies at every depth.
16. Which Kyptec Automation® option can be evaluated for high-resolution recessed inspection from greater stand-off?
For compatible larger-format systems, Kyptec Automation® KL-1244 50 MM Machine Vision Lens With 25 MegaPixel & 1.1" Format Lens provides a 50 mm, 25 MP C-mount configuration with an F2.8–22 aperture range. It can be considered where high optical resolution and a tighter FOV suit the required cavity geometry.
17. What information should I provide before buying a machine vision lens for deep holes or cavities?
Provide the hole opening diameter or width, cavity depth, required internal feature location, camera sensor format and resolution, available working distance, smallest defect, required measurement tolerance and expected product-position variation. These details allow the Kyptec Automation® machine vision lens to be selected according to actual visibility, FOV and resolution requirements rather than focal length alone.
Choose the Machine Vision Lens From Optical Access First, Then FOV and Resolution
Deep-hole, recessed-feature and cavity inspection should not begin by asking which focal length can produce the largest image. The first question is whether the required internal feature is physically visible from the proposed camera position. Hole diameter, cavity depth, internal-wall geometry, product-position variation and camera angle determine optical access. If those parameters block the feature, additional lens resolution or magnification cannot recover it.
Once visibility has been established, working distance and focal length can be optimized together. A 25 mm or 35 mm configuration may suit moderate localized fields, while 50 mm or longer focal lengths can support tighter viewing from greater stand-off where the mechanical layout requires it. The resulting FOV should give the recessed feature enough pixels for the smallest defect or measurement requirement, while aperture and focus should be chosen around the actual cavity depth.
Kyptec Automation® offers a comprehensive Machine Vision Lens portfolio spanning several focal lengths, sensor formats and resolution categories, giving OEM machine builders and system integrators flexibility to design recessed inspection around the real geometry of the component. By matching the appropriate Kyptec Automation® machine vision lens to cavity dimensions, optical access, working distance, FOV and minimum feature size—and validating the system at the deepest and most difficult inspection position—industrial vision systems can achieve a stronger foundation for deep-hole inspection, recessed defect detection, internal-edge verification and cavity measurement.

Share:
Line Scan Camera Lens for Rubber Sheet and Tire Component Inspection: Selecting Optics for Surface Cracks, Cuts and Continuous Material Defects
Machine Vision Lens for Printing and Converting Inspection Machines: How to Inspect Continuous Printed Materials at High Speed Across Wide Webs