In modern industrial applications, helical gears are widely used due to their superior performance compared to spur gears, including smoother operation, higher load capacity, and reduced noise. However, the measurement of the helix angle in helical gears presents significant challenges, such as high complexity, intricate measurement setups, excessive time consumption, and difficulties in achieving online detection. Traditional contact-based methods, like universal bevel protractors and lead testers, often require manual intervention and are not suitable for high-speed production lines. To address these issues, we propose a machine vision-based approach combined with curve fitting for the online detection of the helix angle in helical gears. This method leverages image processing techniques to extract gear features and compute the helix angle efficiently, enabling integration with existing gear inspection systems for rapid online measurement.
Our research focuses on developing a non-contact measurement system that can accurately determine the helix angle and direction of helical gears in real-time. We designed and built a visual measurement system incorporating a dual telecentric lens camera to capture side images of helical gears. The system includes components such as ring lights, bar lights, CCD and CMOS cameras, lens assemblies, camera mounts, and a computer for processing. The dual telecentric lens offers advantages like deep depth of field, low distortion, and no perspective error, which are crucial for precise measurements. The workflow involves system installation and calibration, image preprocessing, determination of gear direction, and computation of the helix angle using advanced algorithms.

The theoretical foundation of our method is based on the mathematical modeling of the tooth profile of helical gears. The tooth line of a helical gear consists of a series of helices on a cylindrical surface. In a three-dimensional Cartesian coordinate system, the parametric equations of a helix can be expressed as:
$$ x = r \times \cos \left( \theta + \frac{2(n-1)\pi}{c} + \theta_0 \right) $$
$$ y = r \times \sin \left( \theta + \frac{2(n-1)\pi}{c} + \theta_0 \right) $$
$$ z = \pm b\theta = \pm r\theta \cot(\beta) = \pm \frac{r\theta}{\tan(\beta)} $$
where \( r \) is the radius, \( \theta \) is the angular parameter ranging from \( -\frac{b}{2r} \) to 0 radians, \( c \) is the number of teeth, \( n \) is an integer starting from 1, \( \theta_0 \) is the initial angle, \( \beta \) is the helix angle, and \( b \) is the thickness of the gear. The sign of \( z \) determines the direction of the helix: positive for right-handed helical gears and negative for left-handed ones. The projection of these helices onto the xoz plane forms curves that are approximately linear near the center, but strictly non-linear. By analyzing these projections, we can derive unique curves for different helix angles, enabling accurate measurement.
To compute the helix angle \( \beta \) at the reference circle from the measured helix angle at the tip circle \( \beta_y \), we use the following relationships:
$$ \tan(\beta) = \frac{\pi}{P} d $$
$$ \tan(\beta_y) = \frac{\pi}{P} d_y $$
where \( P \) is the lead of the helical surface, \( d \) is the reference circle diameter, and \( d_y \) is the tip circle diameter. Solving for \( \beta \), we get:
$$ \beta = \arctan \left( \frac{d}{d_y} \tan(\beta_y) \right) $$
This transformation is essential for standard gears where the tip circle diameter is typically the reference circle diameter plus twice the module.
Our measurement system is integrated with an end-face measurement setup commonly used in industrial settings for online gear inspection. The system configuration includes a ring light for top illumination and a bar light for side illumination to enhance contrast on the gear side surface. The CCD camera, fixed horizontally, captures images of the gear side, and its orientation is adjusted using two spirit levels to minimize tilt errors. The computer, equipped with an AMD R5-4600H CPU, processes the images using algorithms developed in MATLAB 2020a. The overall workflow encompasses system calibration, image acquisition, region of interest (ROI) extraction, grayscale conversion, edge detection, morphological processing, and curve fitting to determine the helix angle and direction.
Image preprocessing begins with camera calibration using the Zhang’s method and distortion correction. The ROI is automatically extracted based on the tip circle diameter measured by the top camera in the end-face system. This integration allows for simultaneous measurement of gear parameters like the number of teeth, tip circle diameter, and reference circle diameter. Grayscale conversion and tilt compensation are performed by analyzing the gear shaft image to compute the inclination angle and align the coordinate system. The transformation from image coordinates to world coordinates is given by:
$$ x_{\text{real1}} = y_{\text{img}} – x_0 $$
$$ y_{\text{real1}} = x_{\text{img}} – y_0 $$
where \( (x_{\text{img}}, y_{\text{img}}) \) are the pixel coordinates, and \( (x_0, y_0) \) is the origin. After tilt correction, the coordinates are adjusted as:
$$ x_{\text{real2}} = x_{\text{real1}} \cos(\theta_{\text{rotate}}) – y_{\text{real1}} \sin(\theta_{\text{rotate}}) + x_0 $$
$$ y_{\text{real2}} = x_{\text{real1}} \sin(\theta_{\text{rotate}}) + y_{\text{real1}} \cos(\theta_{\text{rotate}}) + y_0 $$
where \( \theta_{\text{rotate}} \) is the tilt angle. This ensures accurate mapping for subsequent analysis.
Determining the direction of helical gears is crucial for correct interpretation of the helix angle. We use a statistical approach based on morphological structural elements to classify the gear as left-handed or right-handed. The structural elements are defined as:
| Element Code | Definition | Description |
|---|---|---|
| 1 | [0 1; 1 0] | +45° slope element |
| 2 | [1 0; 0 1] | -45° slope element |
| 3 | [0 1; 1 0; 1 0] | Extended +45° element |
| 4 | [1 0; 0 1; 0 1] | Extended -45° element |
| 5 | [1 1 1 1] | Horizontal element |
By counting the occurrences of these elements in the edge image after Gaussian filtering, we can infer the dominant slope direction. For example, left-handed helical gears exhibit more negative slopes, resulting in higher counts of element 2. This method is robust to variations in lighting and surface conditions, as demonstrated in tests with gears of different helix angles and states (e.g., rusted or overexposed). The algorithm processes a 781 × 1558 pixel ROI image in approximately 27.3 ms, making it suitable for online applications.
Edge detection is a critical step in extracting the tooth lines from the gear side image. Due to uneven illumination and low contrast in certain regions, standard edge detectors like Sobel or basic Canny operators produce fragmented edges. We employ a homomorphic filtering-based Canny operator to enhance contrast and extract continuous edges. Homomorphic filtering improves illumination uniformity by operating in the frequency domain, and when combined with the Canny algorithm, it yields superior results compared to other methods like high-pass filtering or HDR-based techniques. The execution time is under 0.3 seconds, balancing speed and accuracy. The table below compares the performance of various edge detection algorithms on helical gear images:
| Algorithm | Edge Continuity | Execution Time (s) | Remarks |
|---|---|---|---|
| Sobel | Poor (multiple breaks) | <0.1 | Inadequate for low-contrast areas |
| Canny with High-Pass Filter | Moderate | <0.1 | Improved but still fragmented |
| Canny with Phase Consistency | Good | ~0.1 | Similar to Gaussian Canny |
| HDR-based Canny | Poor in bright regions | Over-enhancement issues | |
| Ant Colony Optimization | Smooth but discontinuous | Slow and not suitable for online use | |
| Homomorphic Filtering + Canny | Excellent | <0.3 | Best balance for our application |
Morphological processing is applied to the edge image to isolate the tooth lines from redundant edges. We use an improved hit-or-miss transform with custom structural elements to filter edges based on slope. The process involves iteratively applying structural elements to remove horizontal and vertical lines while preserving the slanted tooth lines. The steps include connected component analysis to remove small regions, slope-based filtering, and gap filling to ensure continuity. This method effectively compensates for defects in edge extraction, as shown in the processed images where tooth lines are clearly delineated without extraneous edges.
Curve fitting is the final step to compute the helix angle. The extracted edge points are transformed into a coordinate system where the gear axis aligns with the y-axis and the top face with the x-axis. The coordinates are adjusted for tilt, and the points are sorted based on their horizontal positions at the image center. The longest edge is selected for initial fitting using the MATLAB fit function, with the model derived from the projection equation:
$$ x – x_0 = r \times \cos \left( \frac{m(z – z_0) \tan(\beta)}{r} + \frac{2n\pi}{c} + \theta_0 \right) $$
where \( (x_0, z_0) \) is the intersection point of the gear axis with the top face, \( m \) is the module, and other parameters are as defined earlier. The fitting process involves optimizing \( \beta \) by minimizing the variance between the fitted curve and the edge points from other tooth lines. If the variance exceeds a threshold, the index \( n \) is adjusted to correct for potential off-by-one errors. The optimal \( \beta \) is found by iterating over possible values with a step size of 0.00029 radians and selecting the one with the least variance. This approach reduces errors compared to methods that use straight-line approximations between endpoints.
We validated our method through experiments on various helical gears, including left-handed and right-handed types with different modules and helix angles. The results were compared to design values, and the errors were analyzed. The table below summarizes the measurement outcomes:
| Gear Specification | Design Value | Measured Value | Absolute Error | Relative Error |
|---|---|---|---|---|
| 45° 1.5m 26z Left-Handed 1 | 45.00° | 45.1057° | 6.34′ | 0.23% |
| 45° 1.5m 26z Left-Handed 2 | 45.00° | 45.1255° | 7.53′ | 0.28% |
| 19° 1.25m 25z Left-Handed 3 | 19.524° | 19.4510° | 4.38′ | 0.37% |
| 19° 1.25m 25z Left-Handed 4 | 19.524° | 19.6172° | 5.59′ | 0.48% |
| 45° 1.5m 26z Right-Handed 5 | 45.00° | 44.8710° | 7.74′ | 0.29% |
The average measurement time is approximately 1 second, which is significantly faster than traditional methods like universal bevel protractors (around 18 seconds) and other vision-based approaches that require manual intervention. The accuracy is comparable to contact methods, with errors as low as 4.38 arcminutes. The use of a dual telecentric lens reduces errors due to parallax, which can be as high as 5% in systems with standard lenses. However, limitations include sensitivity to assembly errors, tilt compensation inaccuracies, surface defects, and gear chamfers. For instance, chamfers cause deviations in the edge points, and their removal can improve accuracy by about 0.1° for 45° helical gears. Our method is particularly effective for helical gears without chamfers, where initial parameters like \( \theta_0 \) can be determined via corner detection, simplifying the fitting process.
In conclusion, we have developed a machine vision-based system for online detection of the helix angle in helical gears. Our approach combines advanced image processing, morphological operations, and curve fitting to achieve high accuracy and speed. The integration with end-face measurement systems allows for comprehensive gear inspection in industrial environments. The key advantages include non-contact measurement, robustness to lighting variations, and the ability to determine gear direction automatically. Future work will focus on reducing dependency on multiple light sources, optimizing the fitting algorithm to handle outliers better, and improving execution speed through code optimization in C or matrix-based implementations. This method holds promise for applications in gear manufacturing, quality control, and automated sorting, where rapid and reliable measurement of helical gears is essential.
