A Parameter-Free Visual Measurement Method for Multi-Type Spur Gears

In modern manufacturing, particularly for fine-pitch spur gears, production lines are characterized by high flexibility. It is common for multiple machines on a single line to simultaneously produce various spur gears with different specifications. These components are often conveyed together on the same belt, creating a mixed stream. Despite this advanced production capability, a significant bottleneck remains in quality control. Traditional gear measurement instruments, including coordinate measuring machines (CMMs) and specialized gear testers, typically require prior knowledge of the gear’s fundamental parameters—such as module, number of teeth, and pressure angle—to configure the measurement program. Furthermore, they are designed for sequential, single-workpiece inspection and often involve complex, time-consuming fixturing. This makes them entirely unsuitable for the inline, real-time, 100% inspection of a mixed batch of unknown spur gears. Consequently, manufacturers frequently resort to manual sampling, which is slow, subjective, and risks allowing defective parts to proceed.

The measurement of spur gears involves a comprehensive set of parameters: the number of teeth (z), module (m), pressure angle (α), tip diameter (d_a), root diameter (d_f), whole tooth depth (h), face width (b), base tangent length (W_k), profile deviation, and geometric errors like concentricity. Manual measurement using calipers, micrometers, and gauges is not only inefficient but also highly dependent on operator skill, especially for complex parameters or gears with an odd number of teeth. For very small spur gears (module m ≤ 1 mm), the challenge is even greater due to their miniature size and narrow tooth spaces, which are often inaccessible to traditional contact probes.

Machine vision technology offers a compelling alternative for measuring spur gears. It is non-contact, fast, capable of capturing full-field data, and inherently suitable for automation. Recent research has demonstrated the feasibility of using vision for gear inspection, including sub-pixel edge detection to extract precise profiles and algorithms for measuring specific parameters like pitch deviation. However, existing vision-based methods are predominantly developed for measuring a single, known type of spur gear. They lack a systematic framework for the simultaneous, parameter-free measurement of multiple, intermixed spur gear types directly on a production line. The measurement items are also often limited, failing to provide a complete geometric and tolerance evaluation.

This article addresses this critical gap by presenting a comprehensive, parameter-free, parallel fast measurement methodology for fine-pitch spur gears based on machine vision. We develop novel image processing algorithms and integrate them with gear design theory to enable the simultaneous inspection of various unknown spur gears. The core contributions include a robust sub-pixel edge localization algorithm, a reliable gear center fitting method resilient to outliers, efficient techniques for locating intersection points between circles and gear profiles, and innovative methods for deducing fundamental gear parameters directly from the captured image. If integrated with appropriate feeding and positioning mechanisms, this method allows for the mixed inspection of various spur gears without any prior parameter input or fixturing, achieving high throughput. It is capable of measuring a full suite of parameters and errors, positioning it as a transformative solution for flexible manufacturing lines producing spur gears.

Core Image Processing Algorithms for Spur Gear Measurement

The proposed measurement methodology for spur gears relies on a sequence of sophisticated image processing steps to extract accurate geometric information from a 2D projection of the gear.

Multi-Target Segmentation for Parallel Measurement

Given the small size of fine-pitch spur gears, a single camera field of view can encompass multiple components. This enables the parallel measurement of several spur gears in one image capture cycle, drastically improving efficiency. To facilitate this, a backlight illumination scheme is used, which produces high-contrast images with sharp, well-defined silhouettes of the spur gears. Standard thresholding segmentation techniques are then effectively applied to separate each individual spur gear from the background and from one another. Each segmented region, representing a single spur gear, is subsequently processed independently. This approach forms the foundation for the parallel inspection of mixed spur gear types.

Sub-Pixel Edge Localization Based on the Facet Model

The accuracy of all subsequent geometric calculations for the spur gear hinges on the precision of the extracted contour. Pixel-level edge detection is insufficient for metrology-grade measurement. We employ a sub-pixel edge localization algorithm based on the Facet model. In this model, the image intensity in a small neighborhood around an edge pixel is approximated by a bicubic polynomial:
$$f(x, y) = a_0 + a_1 x + a_2 y + a_3 x^2 + a_4 xy + a_5 y^2 + a_6 xy^2 + a_7 x^2 y + a_8 x^3 + a_9 y^3.$$
The coefficients $a_0$ to $a_9$ are determined using least-squares fitting on the intensity values within a local window (e.g., 5×5 pixels) centered on a pixel identified by a primary edge detector like the Canny operator.

The unit normal vector $(n_x, n_y)$ of the edge at point $(x_i, y_i)$ is derived from the gradient of the fitted polynomial. The intensity profile along this normal direction is then modeled using a second-order Taylor expansion. The sub-pixel offset $t$ along the normal direction to the true edge location (where the first derivative of this profile is zero) is calculated as:
$$t = – \frac{n_x r_x + n_y r_y}{n_x^2 r_{xx} + 2n_x n_y r_{xy} + n_y^2 r_{yy}},$$
where $r_x, r_y$ are the first-order and $r_{xx}, r_{xy}, r_{yy}$ are the second-order partial derivatives of $f(x, y)$ at $(x_i, y_i)$. The final sub-pixel coordinate of the spur gear’s edge point is:
$$\begin{cases} x = x_i + t n_x \\ y = y_i + t n_y \end{cases}.$$
This method achieves a localization precision significantly better than one pixel, which is critical for accurately measuring the fine features of small-module spur gears.

Robust Gear Center Fitting Using Iteratively Reweighted Least Squares

The center of the spur gear is a fundamental reference point for all parametric calculations. While it could be derived from the tip or root circle, the bore (center hole) is typically a continuous, machined feature with a well-defined circular form, making it the most reliable reference for establishing the gear’s datum axis in the 2D projection. Standard least-squares circle fitting is sensitive to outliers caused by imaging noise, dust, or minor imperfections on the bore edge.

To mitigate this, we use an Iteratively Reweighted Least Squares (IRLS) approach. The circle is defined by $(x – x_0)^2 + (y – y_0)^2 = r^2$, where $(x_0, y_0)$ is the center and $r$ is the radius. This can be reformulated into a linear model:
$$x_i^2 + y_i^2 + A x_i + B y_i + C = 0,$$
with $A = -2x_0$, $B = -2y_0$, and $C = x_0^2 + y_0^2 – r^2$. The weighted error function to minimize is:
$$S = \sum_{i=1}^{n} w_i (x_i^2 + y_i^2 + A x_i + B y_i + C)^2.$$
The IRLS procedure starts with an initial fit using standard least squares ($w_i = 1$). In subsequent iterations, weights $w_i$ are assigned to each contour point $(x_i, y_i)$ using a robust function like Huber’s:
$$w(\delta_i) = \begin{cases} 1, & |\delta_i| \le \gamma \\ \gamma / |\delta_i|, & |\delta_i| > \gamma \end{cases},$$
where $\delta_i$ is the radial distance residual of the point from the current circle fit, and $\gamma$ is a tuning parameter. This down-weights the influence of outliers, leading to a more accurate and reliable estimation of the bore center and radius, which is crucial for all subsequent measurements on the spur gear.

Fast Intersection Point Location Between Circles and Profiles

Determining the intersection points between key theoretical circles (e.g., pitch circle, base circle) and the actual tooth profile of the spur gear is essential for parameter calculation. We employ an efficient image-based method. Two separate single-pixel-width binary images are created: one containing the thinned sub-pixel tooth profile (value=80), and another containing the desired theoretical circle (value=80). Superimposing these images produces intersection patterns. Points where the profile and circle cross directly appear with a summed value of 160. Other intersection configurations, where lines cross between pixel centers, form specific 2×2 patterns (e.g., four pixels with value 80 forming a square, or two diagonal pixels with value 160). These patterns are detected algorithmically, and the precise intersection coordinate is calculated as the center of the pattern. This method provides a fast and effective way to locate critical points on the spur gear profile needed for parameter deduction.

Contour Segmentation for Targeted Analysis

For detailed analysis, such as profile deviation evaluation, the continuous contour of the spur gear must be segmented into logical sections: the tip land, the active flank profile, and the root/fillet region. Using the intersection location method described above, points where the profile intersects the “start of active profile” circle (often based on the base circle) and the “tip circle” are identified. These intersection points serve as demarcation points to split the global contour into individual segments corresponding to each tooth’s features. This allows for isolated analysis of the functional flank geometry of the spur gear.

Parameter and Tolerance Measurement for Unknown Spur Gears

By combining the precise geometric data extracted via the image processing pipeline with fundamental gear theory, we can deduce all critical parameters of an unknown spur gear without any prior input.

Module (m)

The module is the most fundamental parameter of a spur gear. It can be derived from the whole tooth depth (h), which is measured directly as the radial distance between the tip and root circles from the image. For standard spur gears with a tooth depth factor of 2.25 (assuming a addendum coefficient of 1 and a dedendum coefficient of 1.25), the module is calculated as:
$$m = \frac{h}{2.25}.$$
The calculated value is then standardized to the nearest preferred module from relevant standards (e.g., 0.5 mm, 0.8 mm, 1.0 mm).

Number of Teeth (z)

We propose two robust methods for counting teeth on spur gears. The first, the Intersection Method, counts the points where the pitch circle intersects the left and right flanks. Since each tooth creates two intersections (one per flank), the number of teeth is half the total intersection count: $z = n_{intersections} / 2$. This method is very fast.

The second, more robust Sine Fitting Method, is used when the profile may have defects. The polar coordinates $(\rho, \theta)$ of the entire gear contour are computed relative to the gear center. When the radial distance $\rho$ is plotted against the unfolded angle $\theta$, it resembles a periodic sinusoidal curve. This curve is fitted with a function:
$$a \sin(\omega \theta + \phi) + b.$$
The number of teeth is then derived from the period $T_0$ of this sinusoid: $z = 2\pi / T_0$ (rounded to the nearest integer). This method is highly resilient to local contour imperfections.

Pressure Angle (α)

The standard pressure angle for spur gears is typically 20°, but others exist. Without knowing the base circle, it cannot be calculated directly from $α = \arccos(r_b / r)$. We introduce a Profile Approximation Method. A search is conducted within a plausible range of pressure angles (e.g., 14.5° to 25°). For each candidate $α_i$, the corresponding base radius $r_{b,i}$ is calculated from the estimated pitch radius. The theoretical involute profile is then generated from each intersection point of this base circle with the actual profile. The sum of squared perpendicular distances from all actual flank points to this theoretical involute is computed. The pressure angle $α$ that minimizes this sum of squared errors is selected as the correct value for the spur gear.

Basic Dimensions and Geometric Tolerances

Direct measurement from the sub-pixel contour yields several key dimensions of the spur gear:

  • Tip Diameter (d_a) & Root Diameter (d_f): Obtained by fitting circles to the tip and root edge points.
  • Bore Diameter (d_o): From the fitted bore circle.
  • Whole Tooth Depth (h): $h = (d_a – d_f)/2$.
  • Face Width (b): Measured from a separate side-view image of the spur gear.

Geometric tolerances are also evaluated relative to the datum established by the bore:

  • Concentricity (of tip circle to bore): $e_c = 2 \times \sqrt{(x_{0,bore} – x_{0,tip})^2 + (y_{0,bore} – y_{0,tip})^2}$.
  • Bore Circularity (Roundness): $e = 1 – \frac{4\pi \cdot Area}{Perimeter^2}$. A perfect circle has $e=0$.
  • Bore Radial Runout: $e_r = r_{max} – r_{min}$, where $r_{max}$ and $r_{min}$ are the maximum and minimum radial distances from the bore center to its contour.

Base Tangent Length (W_k) and its Variation (F_w)

The base tangent length is a critical measure of tooth thickness variation. First, the span number of teeth (k) is estimated. Two points are found where a line tangent to the base circle intersects k teeth apart. The distance between these two tangent points on the flanks is the base tangent length $W_k$. This process is repeated for different teeth around the spur gear. The variation in base tangent length, $F_w$, is a key indicator of gear quality and is calculated as:
$$F_w = W_{k,\ max} – W_{k,\ min}.$$

Profile Shift Coefficient (x)

For modified spur gears, the profile shift (or addendum modification) coefficient is calculated. Using the accurately measured tip radius $r_a$ and the estimated pitch radius $r$, the coefficient is given by:
$$x = \frac{r_a – r + h_a^* m}{m},$$
where $h_a^*$ is the addendum coefficient (usually 1). This formula effectively measures how far the actual tip circle deviates from that of a standard spur gear.

Tooth Profile Deviation and Modification Analysis

To evaluate the accuracy of the involute form or to quantify intentional profile modification (tip or root relief) on the spur gear, the actual flank profile is compared to its theoretical involute. For a measured flank point $A(\rho, \theta)$, the corresponding point on the theoretical involute is found via the involute function. The profile deviation $e_i$ at point A is the length of the perpendicular from A to the theoretical involute curve. The sign of $e_i$ is determined by whether point A lies outside (positive) or inside (negative) the theoretical profile. By calculating $e_i$ for all points along the active profile of each tooth, the total profile deviation $F_α$, form deviation $f_fα$, and slope deviation $f_Hα$ can be determined according to gear accuracy standards (e.g., ISO 1328-1).

Experimental Verification and Results

A Gear Vision Measurement System (GVMS) was constructed to validate the proposed methodology for spur gears. The system comprised a high-resolution monochrome CMOS camera, a precision lens, a red LED backlight, and a computer. The system was calibrated using a precision dot target, yielding a pixel scale factor of λ = 7.71 µm/pixel.

Table 1: GVMS Hardware Configuration
Component Specification
Camera CMOS, 20 MP (5472×3648), Monochrome, GigE Interface
Lens Magnification 0.31x, Low Distortion (<0.006%)
Lighting LED Backlight (Red)
Calibrated Resolution 7.71 µm/pixel

Algorithm Precision Test

The sub-pixel edge localization algorithm’s precision was tested on a high-accuracy master spur gear (module 1.0 mm, 38 teeth). The bore contour was extracted using both a standard Canny (pixel-level) operator and the proposed Facet-based sub-pixel method. The standard deviation of the radial distance error from a perfect circle was used as the metric. The Canny operator resulted in a standard deviation of 28.77 µm, while the Facet-based method achieved 3.58 µm, corresponding to a localization precision of approximately 0.46 pixels—an 8-fold improvement, which is essential for measuring fine-pitch spur gears.

Mixed-Type Spur Gear Measurement Experiment

Three different spur gears were selected for a mixed-batch measurement test: two plastic injection-molded gears and one powder metallurgy gear. Their nominal parameters are listed below.

Table 2: Nominal Parameters of Test Spur Gears
Parameter Spur Gear A Spur Gear B Spur Gear C
Type Plastic Plastic Powder Metal
Number of Teeth (z) 22 21 17
Module (m) [mm] 1.0 0.8 0.5
Pressure Angle (α) [°] 20 20 20
Profile Shift (x) 0 0 +0.15

The GVMS performed 20 repeated measurements on each spur gear without any prior parameter input. The repeatability (max range of results) for all dimensional parameters was within 4 µm. The results were then compared against measurements from a high-precision gear measuring center (GMC) and manual tools. The comparison for key parameters is summarized below.

Table 3: Comparative Measurement Results for Spur Gears
Spur Gear & Parameter GVMS Result Reference (GMC/Manual) Difference
Gear A – Tip Diameter 23.995 mm 23.991 mm +0.004 mm
Gear A – Base Tangent Var. (F_w) 0.035 mm 0.042 mm -0.007 mm
Gear B – Whole Tooth Depth (h) 1.801 mm 1.799 mm +0.002 mm
Gear C – Module (m) 0.5 mm 0.5 mm 0.0 mm
Gear C – Profile Shift (x) +0.11 +0.15 -0.04
Gear C – Bore Concentricity 7.6 µm 4.6 µm +3.0 µm

Furthermore, the tooth profile deviations of the smallest module spur gear (Gear C, m=0.5 mm) were measured and compared with the GMC results. The maximum differences between the GVMS and GMC for total profile deviation ($F_α$), profile form deviation ($f_{fα}$), and profile slope deviation ($f_{Hα}$) were 4.5 µm, 1.9 µm, and 3.9 µm, respectively, demonstrating good agreement for spur gear quality evaluation.

Conclusion

This article presents a comprehensive, parameter-free, and parallel machine vision methodology for the rapid and complete measurement of fine-pitch spur gears. The developed system integrates novel algorithms for high-precision sub-pixel edge detection, robust center fitting, and intelligent geometric deduction to measure a full suite of parameters—including module, number of teeth, pressure angle, all critical diameters, tooth depth, face width, base tangent length variation, profile shift coefficient, tooth profile deviations, and key geometric tolerances—without any prior knowledge of the spur gear’s design.

The experimental results demonstrate the method’s high repeatability (within 4 µm) and its strong correlation with measurements from a traditional gear measuring center for spur gears with modules ranging from 0.5 to 1.0 mm. The ability to process multiple, different spur gears simultaneously in a single field of view, coupled with the complete lack of need for fixturing or manual parameter input, makes this approach uniquely suited for integration into flexible, high-volume production lines. It provides a practical solution for achieving 100% inline inspection of mixed spur gear batches, a capability that has been lacking in traditional metrology. This represents a significant advancement towards intelligent and fully automated manufacturing systems for precision spur gears.

Scroll to Top