1. Introduction
Spur gear, as fundamental transmission components, are widely utilized in equipment manufacturing, aerospace, and instrumentation. The precision of spur gear parameters directly impacts the performance and lifespan of mechanical systems. Traditional contact-based measurement methods, such as gear measurement centers and coordinate measuring machines (CMMs), face challenges like low efficiency, high costs, and potential surface damage. In contrast, non-contact machine vision techniques offer advantages in speed, accuracy, and adaptability, making them a promising alternative for spur gear measurement.
This study proposes a vision-based measurement system for spur gear, focusing on geometric parameters (e.g., addendum circle diameter, root circle diameter, module) and (e.g., tooth profile deviation, pitch deviation). Key contributions include:
- Design of a hardware-software integrated measurement platform.
- Development of autofocus algorithms and edge detection optimization.
- Experimental validation of system accuracy and repeatability.

2. Overall Design of the Spur Gear Parameter Measurement System
2.1 System Architecture
The system comprises hardware components (industrial camera, lens, lighting, motion control) and software modules (image processing, parameter calculation). Figure 1 illustrates the workflow:
Step | Description |
---|---|
Autofocus | Adjust camera position for optimal image clarity. |
System Calibration | Correct lens distortion and determine pixel equivalent. |
Image Acquisition | Capture high-resolution spur gear images. |
Edge Detection | Extract subpixel-level gear edges using Canny and Zernike moment algorithms. |
Parameter Calculation | Convert pixel-based measurements to physical dimensions. |
2.2 Hardware Configuration
Critical hardware components and their specifications are summarized below:
Component | Model | Key Parameters |
---|---|---|
Industrial Camera | MER-630-60U3C | Resolution: 3088×2064; Pixel size: 2.4μm×2.4μm |
Lens | H0514-MP2 | Focal length: 5mm; Minimum object distance: 0.1m |
Light Source | OPT-FL175175-W | Parallel backlight with adjustable intensity (5–30 levels) |
Motion Stage | PX1204-200 | Travel range: 200mm; Stepper motor control |
3. Calibration of the Measurement System
3.1 Camera Model and Distortion Correction
The pinhole camera model relates world coordinates (Xw,Yw,Zw)(Xw,Yw,Zw) to pixel coordinates (u,v)(u,v):s[uv1]=[fx0u00fyv0001][Rt][XwYwZw1]suv1=fx000fy0u0v01[Rt]XwYwZw1
Radial and tangential distortions are modeled as:{x′=x(1+k1r2+k2r4)+2p1xy+p2(r2+2×2)y′=y(1+k1r2+k2r4)+p1(r2+2y2)+2p2xy{x′=x(1+k1r2+k2r4)+2p1xy+p2(r2+2x2)y′=y(1+k1r2+k2r4)+p1(r2+2y2)+2p2xy
Calibration results using a checkerboard are:
Parameter | Value |
---|---|
fxfx (mm/pixel) | 1393.6108 |
fyfy (mm/pixel) | 1394.0418 |
k1k1 (Radial) | -0.1488 |
k2k2 (Radial) | 0.2047 |
p1,p2p1,p2 (Tangential) | −1.4136×10−4−1.4136×10−4, −1.6984×10−4−1.6984×10−4 |
3.2 Pixel Equivalent Calibration
A 7×7 circular calibration board with known center distances (7mm) was used. The pixel equivalent KK is calculated as:K=L1n∑i=1nliK=n1∑i=1nliL
Calibration Round | Physical Distance (mm) | Pixel Distance | Pixel Equivalent (mm/pixel) |
---|---|---|---|
1 | 7.0000 | 81.0376 | 0.0864 |
5 | 7.0000 | 80.9989 | 0.0864 |
4. Development of Autofocus Function
4.1 Sharpness Evaluation Functions
Modified Brenner, Tenengrad, and Laplace functions were compared:
Function | Sensitivity | Robustness | Computation Time (ms) |
---|---|---|---|
Improved Brenner | High | High | 45.2 |
Tenengrad | Medium | Medium | 78.9 |
Laplace | Low | Low | 92.4 |
The improved Brenner function, incorporating multi-directional gradients, was selected for its balance of speed and accuracy.
4.2 Focus Position Search Algorithm
A hybrid algorithm combining Gaussian curve fitting (coarse tuning) and hill-climbing search (fine tuning) was proposed:
- Coarse Tuning: Fit Gaussian curve to sharpness values at 3mm intervals.
- Fine Tuning: Refine position with adaptive step sizes (0.64mm → 0.01mm).
Gear Type | Manual Focus (Sharpness) | Autofocus (Sharpness) | Accuracy Improvement |
---|---|---|---|
A | 1.02×10⁶ | 1.07×10⁶ | 4.9% |
B | 0.83×10⁶ | 0.89×10⁶ | 7.2% |
5. Image Preprocessing and Edge Detection
5.1 Preprocessing Pipeline
- Grayscale Conversion:Gray=0.2989R+0.5870G+0.1140BGray=0.2989R+0.5870G+0.1140B
- Median Filtering: 3×3 kernel for noise reduction.
- Threshold Segmentation: Otsu’s method for binarization.
5.2 Edge Detection Algorithms
Canny operator outperformed Sobel, Prewitt, and Laplacian in edge localization:
Algorithm | Edge Width (pixels) | Noise Robustness | Computation Time (ms) |
---|---|---|---|
Canny | 1–2 | High | 33.1 |
Sobel | 3–4 | Medium | 28.5 |
Laplacian | 2–3 | Low | 41.7 |
5.3 Subpixel Edge Localization
A Zernike moment-based algorithm achieved subpixel precision:[xsys]=[xy]+N2l[cosθsinθ][xsys]=[xy]+2Nl[cosθsinθ]
Validation on a laser-cut standard circle (30.0125mm radius):
Method | Measured Radius (mm) | Absolute Error (mm) |
---|---|---|
Canny | 30.0492 | 0.0367 |
Zernike (Traditional) | 30.0356 | 0.0231 |
Zernike (Optimized) | 30.0298 | 0.0173 |
6. Experimental Results
6.1 Geometric Parameter Measurement
Results for a spur gear (module=3mm, 20 teeth):
Parameter | Design Value | Proposed System | Gear Measurement Center |
---|---|---|---|
Addendum Diameter (mm) | 66.0000 | 66.0261 | 66.0129 |
Root Diameter (mm) | 52.5000 | 52.5307 | 52.5134 |
Module (mm) | 3.0000 | 3.0000 | 3.0000 |
6.2 Measurement
Tooth profile deviation and pitch deviation results:
Error Type | Proposed System (mm) | Gear Measurement Center (mm) | Deviation |
---|---|---|---|
Tooth Profile Deviation | 0.0305 | 0.0160 | 0.0145 |
Single Pitch Deviation | 0.0228 | 0.0171 | 0.0057 |
Total Cumulative Pitch | 0.0455 | 0.0303 | 0.0152 |
6.3 Repeatability Test
Five consecutive measurements demonstrated system stability:
Parameter | Max-Min Deviation (mm) |
---|---|
Tooth Profile Deviation | 0.0077 |
Single Pitch Deviation | 0.0083 |
Total Cumulative Pitch | 0.0075 |
7. Conclusion
This study presents a vision-based measurement system for spur gear, achieving non-contact, high-precision parameter detection. Key innovations include:
- Autofocus Optimization: Improved Brenner function + hybrid search algorithm.
- Edge Detection: Canny + Zernike moment subpixel localization.
- System Calibration: Pixel equivalent determination and distortion correction.
Experimental results confirm that the system meets ISO 1328-1:2013 requirements for Grade 9 spur gear, with measurement errors below 0.03mm. Future work will extend the system to helical and bevel gears.