Straight spur gear end face visual measurement method and system based on improved zernike moment and two-step circle fitting

By improving the Zernike moment and two-step circle fitting methods, the problems of large computational load and poor stability in gear inspection are solved, realizing efficient and robust multi-parameter integrated inspection, meeting the online inspection needs of high-end equipment manufacturing, and applicable to gear inspection in fields such as new energy vehicles, aerospace and precision machine tools.

CN122244016APending Publication Date: 2026-06-19WENZHOU UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WENZHOU UNIV
Filing Date
2026-05-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies for gear inspection suffer from high computational load, poor stability, insufficient robustness, and low inspection efficiency, making it difficult to meet the online inspection requirements of high-end equipment manufacturing, especially for high-precision and rapid inspection of spur gears.

Method used

An improved Zernike moment combined with a two-step circle fitting method is adopted. Through system calibration, image preprocessing, edge detection and parameter calculation, subpixel-level measurement of gear end face geometric parameters is achieved. This includes weighted average grayscale conversion and median filtering in image preprocessing, improved Zernike moment calculation and two-step circle fitting in edge detection, and outlier removal to improve stability.

Benefits of technology

It achieves online detection with micron-level accuracy and second-level speed, meeting the detection requirements of gears with accuracy of grade 5 to 6 in GB/T 10095.1 and ISO 1328-1:2013. It improves computing efficiency, stability, and environmental adaptability, and realizes integrated measurement of multiple parameters. It is suitable for gear detection in fields such as new energy vehicles, aerospace and precision machine tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122244016A_ABST
    Figure CN122244016A_ABST
Patent Text Reader

Abstract

This invention discloses a visual measurement method and system for the end face of spur gears based on an improved Zernike moment and two-step circle fitting. The method includes: system calibration, image preprocessing, edge detection based on the improved Zernike moment, two-step circle fitting, and parameter calculation. The improved Zernike moment uses a weighted average of the Otsu global threshold and the local gradient mean to determine the step height threshold, and is calculated only within the neighborhood of the Canny edge candidate points. The two-step circle fitting employs an initial fitting of the extreme value neighborhood combined with an adaptive residual selection strategy. The system includes modules for image acquisition, calibration, preprocessing, edge detection, circle fitting, and parameter calculation. This invention achieves sub-pixel-level, high-efficiency, multi-parameter integrated measurement of spur gears with a module of 0.5–5 mm, with a single-piece measurement time ≤ 5 seconds and a total profile deviation expansion uncertainty ≤ 0.5 μm (k=2). It is suitable for online inspection of gears in fields such as new energy vehicles and aerospace.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of precision measurement technology, specifically to a visual measurement method and system for the end face geometric parameters of spur gears based on improved Zernike moment and two-step circle fitting. It is applicable to non-contact, high-precision, and rapid online geometric parameter detection of gears in new energy vehicle transmissions, aerospace precision gears, and precision machine tool transmission gears. Background Technology

[0002] Gears are core components of mechanical transmission systems, and their geometric accuracy directly determines transmission efficiency, operational stability, noise and vibration levels, and service life. With the development of high-end equipment manufacturing towards high speed, precision, and intelligence, gear inspection urgently needs to meet the requirements of high precision, high efficiency, and online operation. This is especially true for spur gears with a module of 0.5–5 mm, which are widely used in new energy vehicles, aerospace, and precision machine tools, where the requirements for inspection accuracy (level 5–6) and inspection speed (single piece ≤ 5 seconds) are even more stringent.

[0003] Traditional gear inspection mainly relies on contact-type equipment such as gear measuring centers and coordinate measuring machines. Although these can meet the accuracy requirements, they suffer from problems such as long inspection time, low efficiency, and difficulty in achieving online inspection on the production line. For small module and plastic gears, there is a potential risk of tooth surface deformation or scratches due to contact force, making them unsuitable for the online inspection needs of high-end equipment manufacturing.

[0004] For traditional Zernike moment subpixel detection methods, see Ghosal S, Mehrotra R. Orthogonalmoment operators for subpixel edge detection[J]. Pattern recognition, 1993,26(2): 295-306. Although existing machine vision detection methods attempt to solve the defects of contact detection, they still have the following prominent shortcomings: 1. Traditional Zernike moment subpixel detection requires full-image calculation, which is computationally intensive and results in slow detection speed, failing to meet the requirements of online detection; 2. Using a fixed threshold to determine the Zernike moment step height is difficult to adapt to actual detection scenarios such as mirror reflection of metal gears and complex lighting, resulting in poor robustness; 3. Conventional circle fitting directly fits all edge points, which is easily affected by tooth surface burrs, defects, and noise interference, and the stability of the circle center and radius positioning is insufficient; 4. It cannot achieve integrated high-precision measurement of multiple parameters such as tooth tip circle, tooth root circle, number of teeth, module, tooth pitch deviation, and tooth profile deviation, requiring multiple clamping and tooling switching, resulting in low detection efficiency.

[0005] To address the shortcomings of the existing technologies, this invention proposes an improved visual measurement method for gear end faces using Zernike moments combined with two-step circular fitting. This method effectively solves the technical problems of high computational load, poor stability, insufficient robustness, and low detection efficiency in the existing technologies, thus meeting the needs of online gear inspection for high-end equipment. Summary of the Invention

[0006] The purpose of this invention is to overcome the above-mentioned defects of the prior art and provide a visual measurement method and system for the end face geometric parameters of spur gears that is subpixel-level, highly efficient, robust, and integrates multiple parameters, achieving online detection with micron-level accuracy and second-level speed, and meeting the detection requirements for gears with accuracy levels of 5 to 6 in GB / T 10095.1 and ISO 1328-1:2013.

[0007] To address the aforementioned technical problems, this application provides the following technical solution: A visual measurement method for the end face geometric parameters of a spur gear includes the following steps: 1. System calibration: A 5μm-level ceramic checkerboard calibration plate was used. Based on Zhang Zhengyou's calibration method, the camera intrinsic parameters (focal length, principal point, distortion coefficient) were calibrated and distortion correction was completed. The transformation relationship between pixel coordinates and physical coordinates was established. The pixel equivalent after calibration is 4~5μm / pixel, and the root mean square error of reprojection is ≤0.04pixel. 2. Image Preprocessing: The color image of the gear end face is converted to grayscale using a weighted average method. The grayscale conversion formula is as follows: Then, a 5×5 window is used to perform median filtering on the grayscale image to remove salt and pepper noise while preserving the clarity and sharpness of the tooth contour edges to the greatest extent. 3. Edge detection: Canny edge detection is performed on the filtered image to obtain pixel-level edge candidate points. Improved Zernike moment calculation is performed only in the neighborhood of the pixel-level edge candidate points. The step height threshold of the Zernike moment is adaptively determined by weighting the Otsu global threshold and the local gradient mean, thereby obtaining sub-pixel edge points. The specific process can be as follows: Gaussian smoothing with a standard deviation σ=2 is applied to the filtered image; the horizontal and vertical gradients are calculated using a 3×3 template Sobel operator to obtain the gradient magnitude and direction; non-maximum suppression is performed along the gradient direction to refine the edges; and then a low threshold is applied. High threshold A dual-threshold strategy is used to filter and connect edges; improved Zernike moment calculation is performed only within the neighborhood of the pixel-level edge candidate points. The step height threshold of the Zernike moment is adaptively determined by weighting the global threshold and the local gradient mean. For the specular reflection characteristics of metal gears, α=0.8 is preferred, thereby obtaining the sub-pixel edge points. 4. Two-step circle fitting: Based on the sub-pixel edge points, firstly, extract extreme neighbor points to perform initial circle fitting, obtaining the initial circle center and initial radius; wherein, the extreme neighbor point extraction method for the tooth tip circle is: extract 3 neighbor points each from the maximum / minimum X coordinate region and the maximum / minimum Y coordinate region of the sub-pixel edge points (a total of 12 points), and the extreme neighbor point extraction method for the tooth root circle is: extract multiple neighbor points (preferably 6-8 points) from the extreme X and Y coordinate regions inside the contour of the sub-pixel edge points; then calculate the distance residual from each sub-pixel edge point to the initial circle center and obtain the standard deviation σ. For the tooth tip circle, retain the distance to the initial circle center within the range of σ. The edge points within the range, for the root circle retaining distance in Edge points within the range ( The initial fitting radius is used to adaptively remove abnormal points caused by burrs and tooth surface defects; the filtered edge points are then subjected to least squares fine fitting to obtain the precise parameters (center coordinates and radius) of the addendum circle and root circle. 5. Parameter Calculation: The sub-pixel edge points are converted to polar coordinates. The number of gear teeth is determined by peak and trough detection (peaks correspond to tooth tips, and the number of peaks is the number of teeth). The standard module m and theoretical pitch circle radius are determined by combining the addendum circle and root circle parameters with the national standard module series. The formula for calculating the pitch circle radius is: z represents the number of teeth; within the neighborhood corresponding to the theoretical pitch circle radius, SUSAN corner detection is used with a 37-pixel circular template, a similarity threshold of 20, and a geometric threshold of 28 to locate the intersection of the tooth profile and the pitch circle. Based on the intersection, the tooth pitch deviation and tooth profile deviation of the gear are calculated. The formula for calculating a single tooth pitch deviation is:

[0008] Actual tooth pitch calculation formula:

[0009] Theoretical tooth pitch: Tooth profile deviation includes total tooth profile deviation, tooth profile shape deviation, and tooth profile tilt deviation. By establishing a theoretical involute model based on the base circle, the formula for calculating the base circle radius is as follows: The involute starting angle is determined by least-squares optimization for the sub-pixel edge points of the tooth profile. Then, the starting angle deviation of each measurement point is calculated and converted into a linear deviation of the base circle tangent. The formula is as follows:

[0010] This refers to tooth profile deviation. .

[0011] Furthermore, the formula for determining the step height threshold of the Zernike moment in step S2 is as follows: Among them, The final step height threshold, for Global threshold The gradient magnitude is the average value of the 5×5 neighborhood of the pixel-level edge candidate point. α is an adjustment factor with a value range of 0.5~1.0. For the specular reflection characteristics of the end face of the metal gear, α=0.8 is preferred; for the weak edge characteristics of the plastic gear, α=0.6 is preferred.

[0012] Furthermore, the specific process of Canny edge detection in step S2 is as follows: Gaussian smoothing with a standard deviation σ=2 is applied to the filtered image to further suppress high-frequency noise; the horizontal and vertical gradients are calculated using a 3×3 template Sobel operator to obtain the gradient magnitude and direction; non-maximum suppression is performed along the gradient direction to refine the edges; and then a low threshold is applied... High threshold The dual threshold strategy is used to filter and connect edges, ultimately obtaining pixel-level edge candidate points.

[0013] Preferably, the adaptive filtering in step S3 specifically involves: calculating the distance residuals from each edge point to the initial circle center, obtaining the standard deviation σ, and retaining the points whose distance to the initial circle center is within a certain range. Edge points within the range are used for fine fitting, where R is the initial radius and σ is the standard deviation of the distance residual, which can effectively eliminate abnormal points caused by tooth tip burrs, tooth surface defects, noise, etc.

[0014] Preferably, the method for extracting extreme neighboring points in step S3 is as follows: for the tooth tip circle, extract 3 neighboring points from the region of maximum / minimum X coordinate and region of maximum / minimum Y coordinate in the sub-pixel edge points, forming a set of 12 points for initial fitting; for the tooth root circle, extract multiple neighboring points from the extreme X and Y coordinate regions inside the contour in the sub-pixel edge points to form a set of initial fitting points, ensuring the effectiveness of the initial fitting parameters.

[0015] Preferably, the SUSAN corner detection in step S4 is performed within an indexing circular band with a bandwidth of 0.1m to 0.2m, where m is the standard modulus determined in step S4.

[0016] It can reduce the amount of computation and suppress interference corner points far from the pitch circle; the SUSAN corner point detection uses a 37-pixel circular template, with a similarity threshold of 20 and a geometric threshold of 28, and has good adaptability to conditions such as reflection and uneven brightness on the end face of metal gears.

[0017] Preferably, before step S1, a system calibration step is also included: using a 5μm-level (ceramic) calibration plate, establishing the transformation relationship between pixel coordinates and physical coordinates based on Zhang Zhengyou's calibration method, with a pixel equivalent of 4~5μm / pixel; Based on Zhang Zhengyou's calibration method, the camera intrinsic parameters (focal length, principal point, distortion coefficient) were calibrated, and the conversion relationship between pixel coordinates and physical coordinates was established. The calibrated pixel equivalent is 4~5μm / pixel, and the root mean square error of reprojection is ≤0.04pixel, providing a high-precision traceability basis for the conversion from pixel scale to physical scale.

[0018] Preferably, the method is applicable to spur gears with a module of 0.5 to 5 mm, the measurement time for a single piece does not exceed 5 seconds, and the expanded uncertainty of the total tooth profile deviation is not greater than 0.5 μm.

[0019] Preferably, the tooth profile deviation in step S4 is calculated as follows: a theoretical involute model based on the base circle is established, and the involute starting angle is determined by least squares optimization for the sub-pixel edge points of the tooth profile; the starting angle deviation of each measurement point is calculated, and the starting angle deviation is converted into a linear deviation of the base circle tangent, which is the tooth profile deviation; within the contour evaluation length, the total tooth profile deviation is statistically obtained. F α , Tooth profile shape deviation f fα and tooth profile tilt deviation f Hα .

[0020] Preferably, the method is applicable to spur gears with a module of 0.5 to 5 mm, the overall measurement time of a single gear does not exceed 5 seconds, and the expanded uncertainty of the total tooth profile deviation is not greater than 0.5 μm (k=2); the computational workload of Zernike moments in step S2 is reduced to 5% to 15% of the total calculation; and the standard deviation of radius fitting in step S3 is reduced by more than 50% compared with direct least squares fitting.

[0021] This invention also provides a visual measurement system for the geometric parameters of the end face of a spur gear, comprising an image acquisition module, a system calibration module, an image preprocessing module, an edge detection module, a circle fitting module, and a parameter calculation module connected in sequence. The image acquisition module is used to acquire color images of the gear end face, including a CMOS industrial camera (resolution 2448×2048, pixel size 3.45μm), a 25mm low-distortion lens (distortion rate <0.5%), and a ring + coaxial combined light source (the ring light source highlights the tooth profile, and the coaxial light source suppresses specular reflection on the metal tooth surface). The system calibration module is used to perform the above-mentioned system calibration steps. The image preprocessing module is used to perform the above-mentioned image preprocessing steps. The edge detection module is used to perform the above-mentioned edge detection steps. The circle fitting module is used to perform the above-mentioned two-step circle fitting steps. The parameter calculation module is used to perform the above-mentioned parameter calculation steps.

[0022] This invention also provides the application of the above method in the manufacturing quality inspection of gearbox gears in new energy vehicles, precision gears in aerospace, and transmission gears in precision machine tools. It can realize online full inspection / sampling inspection of the production line, match the inspection cycle with the production line speed, detect processing deviations in a timely manner, and realize closed-loop control of processing-inspection-compensation.

[0023] Compared with the prior art, the present invention has at least the following beneficial effects: 1. Significantly improved computational efficiency: The improved Zernike moment is calculated only within the Canny edge candidate zone, reducing the computational load to 5% to 15% of the full-map calculation. Combined with the optimized design of each step, the overall measurement time for a single gear does not exceed 5 seconds, fully meeting the requirements of online inspection on the production line. 2. Significantly improved measurement stability: The two-step circle fitting strategy, which uses extreme value neighborhood initial fitting + residual adaptive point screening + least squares fine fitting, effectively eliminates outliers. The standard deviation of the radius fitting is reduced by more than 50% compared with direct least squares fitting, and the positioning of the circle center and radius is more accurate and stable. 3. Strong environmental adaptability: The adaptive thresholding strategy, which uses Otsu's global threshold and local gradient mean weighting, can effectively adapt to actual detection scenarios such as mirror reflection of metal gears and complex lighting, and its robustness is significantly better than existing fixed threshold methods. 4. Enables integrated measurement of multiple parameters: A single measurement can simultaneously output all key geometric parameters such as addendum circle, dedendum circle, number of teeth, module, pitch deviation, and tooth profile deviation, eliminating the need for multiple clamping and tooling switching, thus significantly improving inspection efficiency; 5. High measurement accuracy: The expanded uncertainty of the total deviation of the tooth profile is no greater than 0.5μm (k=2), and the measurement deviation from the gear measurement center is ≤2~3μm, which meets the inspection requirements of gears with a precision of grade 5~6 in GB / T 10095.1 and can be adapted to the inspection needs of gears in high-end equipment; 6. High practicality: The system is simple to set up and the cost is controllable. It is suitable for spur gears with a module of 0.5 to 5 mm and can be widely used in online inspection of gear manufacturing quality in new energy vehicles, aerospace, precision machine tools and other fields. It has broad application prospects.

[0024] The following description, in conjunction with the accompanying drawings, further illustrates the visual measurement method and system for gear end faces based on improved Zernike moments and two-step circular fitting. Attached Figure Description

[0025] Figure 1 (a) Figure 1 (b) Figure 1 (c) Figure 1 (d) shows a comparison of the filtering effects of gear images, namely the original gear image, the mean filtered image, the Gaussian filtered image, and the median filtered image; Figure 2 This is an overall flowchart of the method of the present invention; Figure 3 A diagram of the Zernike moment ideal edge step model; Figure 4 (a) Figure 4 (b) is an idealized model diagram of Zernike's subpixel edge localization, where Figure 4 (a) is the original edge image. Figure 4 (b) is the rotated image; Figure 5 Comparison of subpixel edge detection results; Figure 6 The diagram shows the results of the two-step circle fitting for the tooth tip circle and the tooth root circle. Figure 7 This is a distance curve diagram of the extreme diameter of the gear profile; Figure 8 (a) Figure 8 (b) is a diagram showing the detection of the pitch circle and pitch circle corner points, where... Figure 8 (a) is the pitch circle. Figure 8 (b) shows the detection results of the graduation fillet point; Figure 9 This is a schematic diagram illustrating the principle of tooth pitch deviation measurement. Figure 10 (a) Figure 10 (b) is a model diagram for extracting tooth profile deviation data, where (a) is a three-dimensional theoretical model of tooth profile and (b) is a model for extracting tooth pitch deviation data; Figure 11 This is a model diagram of an involute gear. Figure 12 (a) Figure 12 (b) is a comparison diagram of the deviation between the ideal tooth profile and the actual tooth profile of the gear, in which... Figure 12 (a) represents the ideal tooth profile. Figure 12 (b) represents the actual tooth profile deviation; Figure 13 This is a curve diagram showing the tooth profile deviation. Figure 14 This is a graph showing the distribution of gear tooth pitch deviation. Figure 15 This is a graph showing the distribution of gear tooth profile deviation. Figure 16 This is a comparison chart of the tooth profile deviation detection results of the three methods. Detailed Implementation

[0026] The following is in conjunction with the appendix Figures 1-16 The present invention will be further described in detail below. The following embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the present invention.

[0027] Example 1: Construction of a Visual Measurement System The visual measurement system for the end face geometric parameters of spur gears constructed in this embodiment includes an image acquisition module, a system calibration module, an image preprocessing module, an edge detection module, a circle fitting module, and a parameter calculation module connected in sequence. The specific configuration of each module is as follows: 1. Image acquisition module: It adopts a CMOS industrial camera with a resolution of 2448×2048 and a pixel size of 3.45μm. It is equipped with a 25mm low-distortion lens with a lens distortion rate of <0.5%. The light source adopts a combination of ring light source and coaxial light source. The ring light source uses low-angle lighting to highlight the tooth profile, and the coaxial light source uses vertical illumination to suppress specular reflection on the metal tooth surface, ensuring that the acquired gear end face image is clear and free of reflection interference. 2. System Calibration Module: A 5μm-level ceramic checkerboard calibration plate is used. Based on Zhang Zhengyou's calibration method, the camera's intrinsic parameters (focal length, principal point, distortion coefficient) are calibrated and distortion is corrected. A high-precision conversion relationship between pixel coordinates and physical coordinates is established. After calibration, the pixel equivalent is 4~5μm / pixel, and the root mean square error of reprojection is ≤0.04pixel, providing a reliable metrological traceability basis for subsequent high-precision measurements. 3. Data Processing Module: The image preprocessing module, edge detection module, circle fitting module, and parameter calculation module are all deployed in an industrial computer, running the relevant algorithm programs of this invention to automate image preprocessing, edge detection, circle fitting, and parameter calculation, ensuring detection efficiency and accuracy.

[0028] Example 2: Image Preprocessing and Improved Zernike Moment Edge Detection See Figure 2 , Figure 3 , Figure 4 , Figure 5Now, in conjunction with the appendix Figure 2 The overall process of the method involves the following steps: The markings and meanings of each step in this embodiment are as follows: S0—System Calibration: A 5μm-level ceramic checkerboard calibration plate was used, based on the Zhang Zhengyou calibration method; S1—Image preprocessing: weighted average grayscale conversion and 5×5 median filtering; S2—Edge Detection: Includes Canny coarse localization (S2-1) and improved Zernike matrix subpixel fine localization (S2-2); S2-1—Canny Edge Detection: Gaussian smoothing with standard deviation σ=2, 3×3 Sobel operator gradient calculation, nonmaximum suppression and dual threshold screening; S2-2—Improved Zernike Moment: The step height threshold is adaptively determined by weighting the Otsu global threshold and the local gradient mean, and is calculated only in the neighborhood of the Canny edge candidate point; S3—Two-step circle fitting: including initial fitting of extreme value neighborhood (S3-1), adaptive sieving of residual points (S3-2), and fine fitting of least squares (S3-3). S3-1—Initial Fitting of Extreme Neighborhood: Extract neighborhood points of the extreme value region of X / Y coordinates to obtain the initial center and initial radius R0; S3-2—Adaptive Screening Points: For the addendum circle, retain edge points whose distance to the initial center is within the range; for the root circle, retain edge points whose distance is within the range. S3-3—Least squares fine fitting: Obtains precise parameters of addendum circle / root circle; S4—Parameter Calculation: Polar coordinate transformation, peak and valley detection, SUSAN corner point positioning, and tooth pitch / tooth profile deviation calculation.

[0029] S1. Image Preprocessing Figure 1 The image shows a comparison of the filtering effects on gear images. (a) is the original color image of the gear end face, exhibiting slight salt-and-pepper noise and uneven illumination; (b) is the result of mean filtering, where the tooth profile edges are severely blurred, losing fine tooth structure; (c) is the result of Gaussian filtering, where the edges are smooth but slightly blurred, and insufficient tooth profile details are preserved; (d) is the result of median filtering using the 5×5 window method employed in this invention. The comparison shows that median filtering effectively removes salt-and-pepper noise while preserving the clarity and sharpness of the tooth profile edges to the greatest extent possible. Therefore, this invention uses median filtering as the preferred preprocessing method. During preprocessing, the original color image is first converted to grayscale using a weighted average method. The grayscale conversion formula is: Then perform median filtering to remove noise.

[0030] S2. Canny edge coarse positioning For images after median filtering ( Figure 1 d) Perform Canny edge detection, specifically: apply Gaussian smoothing with a standard deviation of σ=2 to the filtered image to further filter out high-frequency noise; calculate the horizontal and vertical gradients using a 3×3 template Sobel operator to obtain the gradient magnitude and direction; perform non-maximum suppression along the gradient direction to refine edge pixels and remove redundant edges; and apply a low threshold. High threshold The dual threshold strategy of T filters and connects strong edges, ultimately obtaining a pixel-level edge candidate point set, laying the foundation for subsequent sub-pixel fine localization.

[0031] S3. Improved Zernike subpixel precision positioning like Figure 3 , Figure 4 , Figure 5 As shown: Appendix Figure 3 This is a diagram of the Zernike moment ideal edge step model. This model is described by four parameters: background grayscale h, step height k, edge distance l, and edge direction φ. It clearly reflects the core principle of Zernike moment sub-pixel localization. (Attached) Figure 4 This diagram presents an idealized model for Zernike moment subpixel edge localization, demonstrating the rotational invariance of Zernike moments and enabling precise localization of tooth profile edges at arbitrary angles. This invention improves upon traditional Zernike moments, with the core improvement being: calculating Zernike moments only within the aforementioned Canny edge candidate band, rather than performing full-image calculations, reducing the computational load to 5%–15% of full-image calculations and significantly improving processing speed; simultaneously, an adaptive step height threshold is employed, with the threshold formula as follows: in The final step height threshold, for Global threshold The gradient magnitude is the average value of the 5×5 neighborhood of the pixel-level edge candidate point. α is an adjustment factor with a value range of 0.5 to 1.0. In this embodiment, α = 0.8 is used to ensure accurate edge positioning under complex lighting conditions, considering the specular reflection characteristics of metal gears.

[0032] Figure 5 The image shows the subpixel edge detection results. It can be seen that the final output subpixel edges are continuous and smooth, with no false edges generated, providing high-quality basic data points for subsequent circle fitting.

[0033] Example 3: Two-step circle fitting (step S3) Based on the high-precision sub-pixel edge points obtained in Example 2, a two-step circle fitting is performed on the addendum circle and root circle of the gear. See [link to example]. Figure 6 The fitting results show that the addendum circle and dedendum circle coincide with the actual tooth profile height, and the fitting accuracy and stability are significantly better than conventional methods. The specific steps are as follows: 1. Initial fitting of the extreme value neighborhood As attached Figure 6 As illustrated on the left, for the tooth tip circle, three neighboring points are extracted from the maximum / minimum X-coordinate region and the maximum / minimum Y-coordinate region of the sub-pixel edge points, for a total of 12 points. Initial circle fitting is performed on these 12 points to obtain the initial circle center and initial radius R0. For the tooth root circle, six neighboring points are extracted from the extreme X-coordinate and Y-coordinate regions inside the contour of the sub-pixel edge points, and initial circle fitting is performed to obtain the initial circle center and initial radius R0. 2. Adaptive Point Screening: Calculate the distance residuals from all sub-pixel edge points to the initial circle center, determine the standard deviation σ of the distance residuals, and retain the distances to the initial circle center within the range specified in the standard deviation σ. The edge points within the range are then removed to eliminate abnormal points caused by tooth surface defects, edge burrs, and noise, resulting in a pure set of edge points. 3. Least Squares Fine Fitting: A least squares fine fitting is performed on the filtered set of pure edge points to output the precise center coordinates and radii of the addendum and dedendum circles. (See attached image) Figure 6 As shown in the fitting results on the right, the fitted circle coincides with the actual tooth profile height of the gear, the center of the circle is accurately positioned, and the radius stability is significantly better than that of the conventional direct least squares fitting method. The standard deviation of the radius fitting is reduced by more than 50% compared with the direct least squares fitting.

[0034] Comparative experiments show that the standard deviation of the tooth tip circle radius fitting method of the present invention is 0.8 μm, which is 50% lower than the standard deviation of 1.6 μm of the least square fitting method for all edge points.

[0035] Example 4: Tooth count identification and pitch circle determination (see Figure 7 , Figure 8 ) Based on the tooth tip circle and tooth root circle parameters obtained in Example 3, and combined with sub-pixel edge points, the tooth count recognition and pitch circle determination steps are performed as follows: 1. Tooth count calculation (see...) Figure 7 Appendix Figure 7 The extreme radius distance curve of the gear profile is generated by converting the sub-pixel edge points obtained in Example 2 to the polar coordinate system (r, θ) and sorting them by polar angle. The curve exhibits obvious periodic fluctuations, where the peaks correspond to the gear tooth tips and the troughs correspond to the gear tooth roots. The number of gear teeth can be obtained by counting the number of peaks. In this example, the number of gear teeth z=28 was successfully identified through peak and trough detection.

[0036] 2. Determination of Module and Pitch Circle: Based on the addendum circle radius Ra and dedendum circle radius Rf obtained from Example 3, the gear module is estimated, and then matched with the national standard module series to determine the standard module m; in this example, the standard module m=3 is determined, and the pitch circle radius is calculated according to the formula. The theoretical pitch circle radius is calculated. r =42mm.

[0037] 3. SUSAN Corner Detection: Figure 8 (a) Figure 8 (b) shows the pitch circle and SUSAN corner detection diagram, where, Figure 8 (a) is a schematic diagram of the theoretical pitch circle. Figure 8 (b) is the SUSAN corner detection result image; within the neighborhood corresponding to the theoretical pitch circle radius, a pitch circle annular region with a radial width of 0.1m~0.2m (m=3mm in this embodiment, and the radial width is 0.3mm~0.6mm) is constructed. SUSAN corner detection is performed using a 37-pixel circular template, a similarity threshold of 20, and a geometric threshold of 28 to accurately locate the intersection of the tooth profile and the pitch circle. This intersection serves as the reference point for subsequent tooth pitch deviation and tooth profile deviation calculations to ensure the accuracy of deviation calculations.

[0038] Example 5: Tooth pitch deviation calculation (see Figure 9 , Figure 10 , Figure 14 ) Based on the pitch circle intersection point obtained in Example 4, the tooth pitch deviation calculation step is performed as follows: 1. Measurement principle (see...) Figure 9 , Figure 10 ): Figure 9 The diagram illustrates the principle of tooth pitch deviation measurement, clearly showing the geometric relationship for measuring tooth pitch deviation. Figure 10 As shown in the model diagram for tooth pitch deviation data extraction, this invention extracts the intersection point and calculates the tooth pitch only within the gear meshing area of ​​the pitch circle neighborhood, effectively avoiding interference from the edge of the non-meshing area and improving the anti-interference ability and accuracy of the measurement.

[0039] 2. Calculation steps: (1) Extraction Figure 8 The polar angle difference Δ between the intersection points of two adjacent tooth profiles and the pitch circle θ i ; (2) According to the formula (where r is the theoretical pitch circle radius), calculate the actual tooth pitch corresponding to each adjacent intersection point. p i ; (3) Calculate the pitch deviation of a single tooth The calculation formula is: ,in Standard tooth pitch; (4) Calculate based on the single tooth pitch deviation. k Cumulative deviation of tooth pitch F pk and cumulative total deviation of tooth pitch F p Complete the comprehensive assessment of tooth pitch deviation.

[0040] 3. Result Verification: Figure 14 The diagram shows the gear pitch deviation distribution, which is based on the measured data of this embodiment. Experimental verification shows that the pitch deviation obtained by this method is ≤2~3μm different from the measurement result of the gear measurement center. The measurement repeatability is good and fully meets the inspection requirements of grade 6 precision gears in GB / T 10095.1.

[0041] Example 6: Tooth profile deviation calculation, see Figure 11 , Figure 12 (a) Figure 12 (b) Figure 13 , Figure 15 , Figure 16 Based on the intersection of the indexing circles and the sub-pixel edge points obtained in Example 4, the tooth profile deviation calculation step is performed as follows: 1. Theoretical involute modeling: such as Figure 11 The diagram shown is a theoretical diagram of the involute of a gear, based on the theoretical pitch circle radius r, and calculated according to the base circle radius formula. (In this embodiment) r b =42×cos20°≈39.47mm), generating a theoretical involute, which serves as the benchmark model for tooth profile deviation evaluation.

[0042] 2. For tooth profile deviation calculation, see... Figure 12 (a) Figure 12 (b) Figure 13 : Figure 12 (a) Figure 12 (b) is a comparison diagram of the deviation between the ideal tooth profile and the actual tooth profile, in which... Figure 12 (a) is an ideal involute tooth profile. Figure 12 (b) is a schematic diagram of the deviation between the actual tooth profile and the ideal tooth shape; the sub-pixel edge points of the tooth profile obtained in Example 2 are compared with the theoretical involute, and the starting angle of the involute is determined by the least squares optimization method. The starting angle deviation Δ at each measurement point is calculated. δi Then according to the formula The initial angle deviation is converted into a linear deviation along the base circle tangent to obtain the tooth profile deviation at each measurement point. Within the tooth profile evaluation length, the total tooth profile deviation is extracted. F α, Tooth profile shape deviation f fα and tooth profile tilt deviation f Hα Complete the comprehensive assessment of tooth profile deviation. (Attachment) Figure 13 The figure shows the tooth profile deviation curve. As can be seen from the figure, the curve is smooth and has good repeatability, indicating that the measurement accuracy of this method is stable. f fi Indicates the first tooth profile i The tooth profile deviation at the measurement point, and the total tooth profile deviation are denoted as... F α .

[0043] 3. Stability comparison, see Figure 15 , Figure 16 : Figure 15 The diagram shows the distribution of gear tooth profile deviations, indicating that the deviations are evenly distributed with no obvious abnormalities. Figure 16 The diagram shows a comparison of tooth profile deviation among the three detection methods. The method of this invention is compared with two existing visual measurement systems, SGVS and GVMS. The experimental data shows that the method of this invention has the smallest measurement standard deviation (0.09 μm), which is far superior to the SGVS system (0.15 μm) and the GVMS system (0.13 μm), proving that the invention has a significant advantage in measurement stability.

[0044] Example 7: Evaluation of Measurement Uncertainty The measurement accuracy, efficiency, and uncertainty of the method of this invention were comprehensively evaluated, and the results are as follows: 1. Scope of application: The method of this invention is applicable to spur gears with a module of 0.5 to 5 mm, and can be widely used in gear inspection in fields such as new energy vehicles, aerospace, and precision machine tools; 2. Measurement efficiency: The overall measurement time for a single gear does not exceed 5 seconds, meeting the efficiency requirements of online inspection on the production line; 3. Measurement accuracy: Expanded uncertainty of total profile deviation U=0.42μm (k=2) The measurement deviation from the gear measurement center is ≤2~3μm, which meets the inspection requirements for gears of accuracy grade 5~6 in GB / T 10095.1; 4. Stability: In step S2, the computational cost of the improved Zernike moments is reduced to 5% to 15% of the computation cost of the whole map. In step S3, the standard deviation of the radius fitting is reduced by more than 50% compared with the direct least squares fitting. The overall measurement stability is significantly better than the existing methods.

[0045] Tests showed that when α=0.8 is used, the computational load is reduced to 12% of the full image computation when calculating Zernike moments in the 5×5 neighborhood of pixel-level edge candidate points, and the processing time is reduced from 120ms to 15ms.

[0046] Example 8: Measurement Applications of Different Types of Gears Plastic gear measurement To address the significant diffuse reflection characteristics and wide edge transition zone of plastic gear surfaces, the adjustment factor α in step S2 was adjusted to 0.6 to lower the step height threshold and enhance the detection capability of weak edges. Measurements were performed on polyoxymethylene (POM) gears with a module m=1, successfully obtaining clear edges, and the repeatability of the tooth pitch deviation measurement was better than 2μm.

[0047] Small module gear measurement For a miniature gear with a module m=0.5 and number of teeth z=40, a 10x magnifying lens was used, and the pixel equivalent was adjusted to 1.2μm / pixel, while keeping the other measurement steps consistent. The measurement uncertainty of the total tooth profile deviation was found to be approximately 0.3μm, which meets the inspection requirements for gears with a precision of grade 7.

[0048] All contents not described in detail in this invention are existing technologies or can be implemented using existing technologies.

[0049] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A visual measurement method for the end face geometric parameters of a spur gear, characterized in that, Includes the following steps: S1. Image preprocessing: The color image of the gear end face is converted to grayscale using a weighted average method, and then the grayscale image is denoised by median filtering using a 5×5 window; S2. Edge detection: Perform Canny edge detection on the filtered image to obtain pixel-level edge candidate points. Perform improved Zernike moment calculation only in the neighborhood of the pixel-level edge candidate points. Adaptively determine the step height threshold of the Zernike moment by weighting the Otsu global threshold and the local gradient mean, and then obtain sub-pixel edge points. S3. Two-step circle fitting: Based on the sub-pixel edge points, firstly extract the extreme value neighborhood points to perform initial circle fitting, and obtain the initial circle center and initial radius R0. Then calculate the distance residual from each sub-pixel edge point to the initial circle center and obtain the standard deviation. Adaptively remove outliers according to the standard deviation. Perform least squares fine fitting on the filtered edge points to obtain the accurate parameters of the tooth tip circle and tooth root circle. S4. Parameter Calculation: The sub-pixel edge points are converted to polar coordinates. The number of gear teeth is determined by peak and valley detection. The standard module m and theoretical pitch circle radius are determined by combining the addendum circle and root circle parameters with the national standard module series. The intersection point of the tooth profile and the pitch circle is located in the neighborhood corresponding to the theoretical pitch circle radius using SUSAN corner detection. The tooth pitch deviation and tooth profile deviation of the gear are calculated based on the intersection point.

2. The visual measurement method for the end face geometric parameters of spur gears according to claim 1, characterized in that, The formula for determining the step height threshold of the Zernike moment in step S2 is as follows: in The final step height threshold, for Global threshold The average gradient magnitude within a 5×5 neighborhood of a pixel-level edge candidate point. This is an adjustment factor, with a value range of 0.5 to 1.

0.

3. The visual measurement method for the end face geometric parameters of spur gears according to claim 1, characterized in that, The specific process of Canny edge detection in step S2 is as follows: Gaussian smoothing with a standard deviation σ=2 is applied to the filtered image; the gradient is calculated using the Sobel operator with a 3×3 template; non-maximum suppression is performed along the gradient direction; and then a low threshold is applied. High threshold The dual threshold strategy is used to filter and connect edges to obtain pixel-level edge candidate points.

4. The visual measurement method for the end face geometric parameters of spur gears according to claim 1, characterized in that, The specific method of adaptive filtering in step S3 is as follows: For the tooth tip circle, retain the distance to the initial circle center within... The edge points within the range, for the root circle retaining distance in Edge points within the range are used for fine fitting, where Let σ be the initial radius, and σ be the standard deviation of the residual distance from each sub-pixel edge point to the initial center.

5. The visual measurement method for the end face geometric parameters of spur gears according to claim 1, characterized in that, The method for extracting extreme neighboring points in step S3 is as follows: For the tooth tip circle, extract three neighboring points each from the region with the maximum / minimum X coordinate and the region with the maximum / minimum Y coordinate in the sub-pixel edge points; for the tooth root circle, extract multiple neighboring points from the extreme X and Y coordinate regions inside the contour in the sub-pixel edge points.

6. The visual measurement method for the end face geometric parameters of spur gears according to claim 1, characterized in that, The SUSAN corner detection in step S4 is performed within a graduated circular band with a bandwidth of 0.1m to 0.2m, where m is the standard modulus determined in step S4, in mm; the SUSAN corner detection uses a 37-pixel circular template, with a similarity threshold of 20 and a geometric threshold of 28.

7. The visual measurement method for the end face geometric parameters of spur gears according to claim 1, characterized in that, Before step S1, there is also a system calibration step S0: using a 5μm-level ceramic checkerboard calibration plate, the camera intrinsic parameters are calibrated and distortion is corrected based on the Zhang Zhengyou calibration method. The camera intrinsic parameters include focal length, principal point, and distortion coefficient. The conversion relationship between pixel coordinates and physical coordinates is established. The calibrated pixel equivalent is 4~5μm / pixel, and the root mean square error of reprojection is ≤0.04pixel.

8. The visual measurement method for the end face geometric parameters of spur gears according to claim 1, characterized in that, The tooth pitch deviation mentioned in step S4 includes a single tooth pitch deviation, the cumulative deviation of k tooth pitches, and the total cumulative tooth pitch deviation; the tooth profile deviation includes the total tooth profile deviation, the tooth profile shape deviation, and the tooth profile tilt deviation; the tooth profile deviation is obtained by establishing a theoretical involute model, using least squares optimization to determine the involute starting angle, and then calculating the starting angle deviation of the measurement point and converting it into a linear deviation.

9. The visual measurement method for the end face geometric parameters of spur gears according to any one of claims 1-8, characterized in that, The method is applicable to spur gears with a module of 0.5 to 5 mm. The overall measurement time for a single gear does not exceed 5 seconds, and the expanded uncertainty of the total tooth profile deviation is not greater than 0.5 μm (k=2). In step S2, the improved Zernike moment calculation is performed only in the neighborhood of the pixel-level edge candidate points. In step S3, the standard deviation of the radius fitting is reduced by more than 50% compared with the direct least squares fitting.

10. A visual measurement system for the end face geometric parameters of a spur gear, characterized in that, It includes an image acquisition module, a system calibration module, an image preprocessing module, an edge detection module, a circle fitting module, and a parameter calculation module, which are connected in sequence. The image acquisition module is used to acquire color images of the gear end face, including a CMOS industrial camera, a 25mm low distortion lens, and a ring + coaxial combined light source. The system calibration module is used to complete camera intrinsic parameter calibration and distortion correction based on the Zhang Zhengyou calibration method using a 5μm-level ceramic checkerboard calibration plate, and to establish the conversion relationship between pixel coordinates and physical coordinates. The image preprocessing module is used to perform weighted average grayscale processing on the color image of the gear end face, and then use a 5×5 window to perform median filtering to denoise the grayscale image; The edge detection module is used to perform Canny edge detection on the filtered image to obtain pixel-level edge candidate points. Improved Zernike moment calculation is performed only in the neighborhood of the pixel-level edge candidate points. The step height threshold of the Zernike moment is adaptively determined by weighting it with the local gradient mean, thereby obtaining sub-pixel edge points. The circle fitting module is used to first extract extreme neighbor points based on the sub-pixel edge points to perform initial circle fitting to obtain the initial circle center and initial radius, then calculate the distance residual from each sub-pixel edge point to the initial circle center and obtain the standard deviation, adaptively remove outliers based on the standard deviation, and perform least squares fine fitting on the filtered edge points to obtain the accurate parameters of the tooth tip circle and tooth root circle. The parameter calculation module is used to convert the sub-pixel edge points to polar coordinates, determine the number of gear teeth through peak and valley detection, determine the standard module and theoretical pitch circle radius by combining the tooth tip circle and tooth root circle parameters with the national standard module series, locate the intersection point of the tooth profile and the pitch circle in the neighborhood corresponding to the theoretical pitch circle radius using SUSAN corner point detection, and calculate the tooth pitch deviation and tooth profile deviation of the gear based on the intersection point.