Cameras & sensorsGuide

Pin position measurement at different heights

Plan pin position measurement at different heights using a cylindrical datum, calibrated views, error estimates and checks for hidden pin features.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01Define the pin feature and the datum frame
  2. 02Choose views according to what must be observable
  3. 03Estimate projection error before selecting optics
  4. 04Set image sampling without confusing it with accuracy
  5. 05Work through a datum-relative position calculation
  6. 06Select hardware around the validated geometry
  7. 07Keep both heights sharp without moving the measurement
  8. 08Validate with changes that expose hidden errors
  9. 09Check the exceptions before ordering
  10. 10Questions

Pin tips at different elevations can appear displaced even when their physical positions are correct. A top camera may also hide the feature you need beneath a wider head or shoulder. For connector and terminal inspection, the first decision is therefore geometric, not algorithmic. You need to define the cylindrical datum, identify the pin feature being measured, and establish whether each image contains enough information. The setup below separates lateral displacement from height-related projection error and explains when another view is necessary.

Define the pin feature and the datum frame

Start with the drawing rather than a camera specification. A pin-tip center, a hole center and a pin axis are different measurement features. Measuring one does not automatically establish the position of the others.

For each pin family, record:

  • The feature to locate: tip, hole, cross-section center or derived axis.
  • Its nominal coordinates relative to the specified datums.
  • Its nominal height and permitted height variation.
  • The position tolerance and reporting convention.
  • Whether lean, straightness or insertion depth must also be inspected.

A cylindrical datum can establish an axis, but it does not independently establish every coordinate direction. Rotation about that axis remains undefined unless another datum or fixture feature establishes orientation. An axial reference is also needed when the measurement depends on height.

Consequently, finding a dark circle and assigning its center as the origin may be insufficient. The visible circle must represent the required datum geometry, and another reference must establish the angular direction used for nominal pin coordinates.

If the cylinder can tilt, one visible cross-section does not establish its complete axis. Either constrain it through a qualified datum fixture or measure enough geometry to determine the axis. Do not silently replace a drawing datum with a convenient image feature.

The distinction between image coordinates and physical coordinates is covered in planar distance measurement with a calibrated camera. Here, the additional concern is that the relevant features may occupy different planes.

Choose views according to what must be observable

A single top view can measure lateral pin locations when every required feature is visible and height-dependent errors remain within the measurement budget. Different heights alone do not automatically require another camera.

Measurement need Suitable starting arrangement Main qualification
Visible centers at known, repeatable heights Top view with separate plane mappings Validate each height and its variation
Lateral centers across a range of heights Qualified object-side telecentric top view Check residual magnification change and focus
Tip height or pin lean Top view plus side view Define which coordinates each view measures
Feature hidden by a shoulder or neighboring pin Additional side or oblique view Confirm visibility throughout part variation
Full pin-axis position Views that establish the axis geometry Tip-center inspection alone is insufficient

A side image is not automatically a complete correction for the top image. It may provide only height and one lateral component. If you combine views into coordinates, calibrate their relationship and identify the same physical feature in each image.

For a fixed camera pair, extrinsic calibration checks beyond reprojection error explain why a good calibration fit still needs independent dimensional verification.

Estimate projection error before selecting optics

With conventional perspective imaging, a feature closer to the camera appears farther from the optical axis. A calibration made on the lower plane therefore assigns incorrect lateral coordinates to a higher feature unless the geometry is corrected.

How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.

For an approximately perpendicular camera, use this simplified projection estimate:

r_apparent = r × Z / (Z - Δz) e_projection = r_apparent - r = r × Δz / (Z - Δz)

Here, r is the feature's lateral distance from the optical axis, Z is the reference plane's distance from the effective projection center, and Δz is the height toward the camera. All lengths must use the same units.

This is an ideal perspective estimate, not a complete lens model. Do not substitute a mechanical working distance without checking its reference point.

Consider a feature 20 mm from the optical axis, with a reference distance of 200 mm and a height difference of 2 mm:

e_projection = 20 × 2 / (200 - 2) = 40 / 198 ≈ 0.202 mm

That apparent displacement can dominate a small position tolerance. Increasing image resolution does not remove it. Moving the feature closer to the optical axis reduces this particular error, but does not correct the whole field.

An object-side telecentric lens greatly reduces magnification change with object distance over its specified operating range. It does not remove occlusion or guarantee adequate focus across both heights.

Perspective with a standard lens compared with a telecentric lens Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.Standard lensfarnearsensorThe same part looks bigger when nearer:its measured size depends on distanceTelecentric lensOnly rays parallel to the axis enter:the same size at any distance
Perspective with a standard lens compared with a telecentric lens. Left: the same part at two distances appears at two sizes through a standard lens. Right: a telecentric lens accepts only rays parallel to its axis, so the part appears the same size at both distances.

Alternatively, calibrate separate image-to-coordinate mappings at each known height. This works only when height variation, part seating and camera geometry are sufficiently controlled. A mapping for a nominal height cannot compensate for an unknown height on every part.

Set image sampling without confusing it with accuracy

Choose the field of view to include the datum references, all required pins and a realistic loading margin. Cropping tightly around nominal positions can lose the features needed to detect misloaded parts.

For a perpendicular view with approximately uniform scale:

object sampling = field width / horizontal pixels feature width in pixels = feature width / object sampling

As an illustrative setup, a 40 mm field across 4000 pixels gives:

object sampling = 40 mm / 4000 = 0.010 mm/pixel = 10 micrometers/pixel pixels across a 0.4 mm feature = 0.4 / 0.010 = 40 pixels

Forty pixels across a feature can support useful center fitting when its boundary is stable. That is a sampling statement, not an accuracy guarantee. Reflections, asymmetric edges, focus and calibration can move the fitted center despite abundant pixels.

Camera resolution for the smallest feature
Units
Pixels needed
–
Sensor size
– MP
Smallest sensor that fits
–
Pixel on the part
– mm
Pixels across the feature, that sensor
–

Pixels needed = field / feature × pixels per feature on each axis (field incl. margin). The lens must resolve the pixels too: Nyquist = 1000 / (2 × pixel µm) lp/mm.

Find cameras with enough pixels Open the full calculator

Use the calculator to compare field coverage and feature sampling, then evaluate uncertainty separately. The object-space sampling explanation provides another route when magnification is known.

Subpixel repeatability also needs careful interpretation. If repeated fits vary by 0.2 pixel at the example sampling, their variation corresponds to 2 micrometers. It does not prove that the reported position is within 2 micrometers of the physical feature.

The resolution and measurement accuracy guide explains why pixel count must be considered alongside the rest of the acquisition system.

Work through a datum-relative position calculation

Assume the datum frame has been established, both feature planes have valid mappings, and the inspection concerns a defined cross-section center rather than an entire pin axis.

Suppose one center has nominal coordinates of 12.000 mm and 8.000 mm. After mapping its image location into the appropriate plane and datum frame, its measured coordinates are 12.030 mm and 7.960 mm.

Δx = 12.030 - 12.000 = 0.030 mm Δy = 7.960 - 8.000 = -0.040 mm radial deviation = sqrt(Δx² + Δy²) = sqrt(0.030² + 0.040²) = 0.050 mm

If the applicable drawing requirement is a diametrical position zone for that evaluated feature, the corresponding diametrical value is:

diametrical position value = 2 × radial deviation = 0.100 mm

Do not apply that conversion indiscriminately. The drawing's datum references, evaluated feature, material-condition requirements and applicable interpretation govern the actual acceptance calculation. A tip-center result cannot substitute for an axis requirement.

Repeat the calculation for the higher pin family using its own valid geometry. Both families must ultimately be expressed in the same datum coordinate system, even if they use different image mappings.

Maintain separate values for measured deviation, measurement uncertainty and the acceptance decision. For example, independent random standard deviations of 2, 3 and 3 micrometers combine as sqrt(2² + 3² + 3²), or approximately 4.7 micrometers. A persistent 20 micrometer projection bias is not another random contribution; correct it or bound it separately.

Select hardware around the validated geometry

Start with area scan cameras and the camera finder after establishing field coverage, sampling and whether the part will be stationary during exposure.

The LS-CMR-0053 is a GigE camera with a rolling shutter and a C-mount. It is a candidate for evaluation with a settled, stationary part. Do not assume rolling-shutter acquisition is suitable if the part or camera moves during readout.

Area scan cameras12 MP GigE area scan camera, IMX226, 1/1.7" rolling shutter, 9 fps (LS-CMR-0053)LS-CMR-0053
Sensor format
1/1.7"
Lens mount
C-mount
Interface
GigE
Resolution
12 MP
$560.00View partBuild a system with it

Choose machine vision lenses through the lens finder using coverage, magnification, working distance and measurement performance together.

The LS-TCL-0574 is listed as a fixed-magnification lens with 0.4x magnification, 227 mm WD and a C-mount. Its listing alone does not establish object-side telecentricity or an allowable magnification change with depth. Obtain the relevant optical performance information before treating it as a solution to height-dependent error.

Machine vision lensesFixed-magnification lens, 0.4x, 227 mm WD, 1.2" (LS-TCL-0574)LS-TCL-0574
Sensor format
1.2"
Mount
C-mount
Image circle
16-22 mm
$2,269.00View partBuild a system with it

For a bench evaluation, camera stands and the accessories finder help organize the mechanical setup. The LS-MNT-0040 is a slide-table camera stand. Qualify the assembled fixture for repositioning and stability rather than assuming the stand determines measurement performance by itself.

Camera standsMachine vision camera stand, professional slide-table type, height 700 mm, 400 x 450 mm base (LS-MNT-0040)LS-MNT-0040
Type
Camera stands
$629.00View partBuild a system with it

These are evaluation candidates, not a validated matched package. Check sensor coverage, mounting clearance, focus range, acquisition timing and actual image quality before committing to the arrangement.

Keep both heights sharp without moving the measurement

Set focus using the actual measurement features, not the most visually prominent surface. A crisp cylinder edge does not prove that the higher pin tip has a stable center estimate.

Depth of field around the focus plane Light from the lens converges on the focus plane. In front of and behind it, each point spreads into a blur circle; the zone where that blur stays below about a pixel or two is the depth of field. A smaller aperture gives a narrower cone and a deeper zone.depth of fieldfocus planeapertureoutside it, pointsblur into circleswide aperture: steep cone, shallow zonesmall aperture (high F#): deeper zone
Depth of field around the focus plane. Light from the lens converges on the focus plane. In front of and behind it, each point spreads into a blur circle; the zone where that blur stays below about a pixel or two is the depth of field. A smaller aperture gives a narrower cone and a deeper zone.

Evaluate at least the lower height, higher height and both extremes of permitted part variation. At each condition, record edge contrast, fitted center and fit residuals. A feature may remain recognizable while its measured center changes unacceptably.

Stopping down can increase depth of field, but it also reduces collected light and eventually increases diffraction blur. Choose the aperture through measurement trials rather than selecting the smallest opening automatically.

Avoid refocusing between pin families unless the complete method accounts for the resulting geometry changes. A focus adjustment can alter magnification or calibration. Separate cameras or independently calibrated focus states may be preferable when one optical setting cannot cover both planes.

Visibility must also be checked independently of sharpness. A shoulder can conceal the intended cross-section even in a perfectly focused image. Moving the camera sideways may reveal it, but introduces a different projection geometry requiring calibration.

When reflections obscure the true feature boundary, the connector contact lighting guide addresses that separate acquisition problem. Better lighting can stabilize an edge; it cannot make an occluded edge visible through solid material.

Validate with changes that expose hidden errors

A stationary image sequence measures only part of the problem. Validation should include the changes expected during actual inspection.

  1. Verify each feature plane. Use an independently characterized reference at the relevant heights and locations. A target on only the lower plane cannot validate the upper mapping.
  2. Traverse the field. Check central and outer positions. Projection and distortion errors often vary with distance from the optical axis.
  3. Reload the part. Remove and reseat it to expose fixture clearance, seating variation and datum-establishment errors.
  4. Exercise allowed rotation. After registration, physical deviations should remain consistent rather than rotate into a new apparent error pattern.
  5. Challenge the height range. Include expected height variation, not just the nominal separation between pin families.
  6. Compare independent measurements. Use reference measurements with suitable uncertainty, rather than verifying the camera against its own calibration output.

The calibration target coverage guide helps plan reference coverage without leaving the image edges untested.

Record repeatability before and after reloading separately. Also retain signed coordinate errors, not just a single radial magnitude. A consistent outward error at greater height suggests projection bias; an orientation-dependent error suggests registration or fixture problems.

Define how uncertain measurements near the tolerance limit will be handled. Inspection software should not silently convert borderline readings into confident acceptance decisions.

Check the exceptions before ordering

The usual top-view answer is wrong when the visible feature is not the specified feature, the datum axis is not established, or height variation creates excessive lateral error. Another view is also necessary when the task includes a height or lean measurement that the top image cannot observe.

An additional camera is not always the right correction. If the higher plane is known and repeatable, a separately validated plane mapping may be sufficient. If magnification stability is the limiting factor, qualified telecentric optics may be simpler than reconstructing coordinates from multiple views.

Before ordering, confirm:

  • Feature definition: every reported center corresponds to the drawing requirement.
  • Datum completeness: origin, orientation and required axial reference are established.
  • Visibility: loading variation cannot hide a required boundary.
  • Height handling: each plane has a justified mapping or qualified optical treatment.
  • Sampling and focus: the smallest relevant feature remains measurable throughout the allowed range.
  • Validation evidence: independent checks cover field position, height and reloading.
  • Reporting: coordinate deviation, uncertainty and acceptance rules remain distinguishable.

Take the field size, height range, datum scheme and tolerance to the camera configuration step. If visibility or datum interpretation remains unresolved, use application support before choosing more resolution or adding another view.

Questions

Can one top camera measure pins at different heights?

Yes, when the required features are visible and the imaging geometry is qualified for both elevations. A conventional lens may need separate mappings for known heights. Object-side telecentric optics can reduce scale changes, but still require checks for residual error, focus and occlusion across the permitted height range.

Is the center of a visible cylinder enough to define the datum?

A visible circular boundary provides an image feature, but not necessarily the complete datum required by the drawing. You must establish how that boundary relates to the cylinder axis. Another reference is generally needed to define rotation about the axis, and height-dependent measurements may require an axial reference.

When is a side camera necessary?

Use another view when the specified feature is hidden, or when you must measure height, lean or axis geometry that the top image cannot observe. Decide whether the side image supplies an independent check or contributes coordinates. Combining coordinates requires a calibrated relationship between the views.

Will a higher-resolution camera remove height-related position error?

No. More pixels can improve sampling, but they do not correct a wrong geometric model. A height-dependent scale error can remain unchanged in physical units even after resolution increases. Correct the geometry, constrain the height or qualify suitable optics before allocating more pixels to the measurement.

Does a pin-tip center measurement prove axis position compliance?

Only if the drawing and inspection definition explicitly concern that tip feature. A pin can have an acceptable tip center while leaning, or an unacceptable tip center despite a different evaluated axis result. Axis requirements need measurements that establish the relevant axis rather than a single visible point.