Grinding tooth surface roughness measuring method based on machine vision
Through multi-angle image processing technology based on machine vision, the non-contact, fast, accurate and low-cost problems of tooth surface roughness measurement in tooth grinding processing are solved, and efficient and reliable roughness measurement is achieved.
Patent Information
- Application Number
- CN202510113523.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The prior art is difficult to achieve non-contact, fast, accurate and costly measurement of tooth surface roughness during tooth grinding processing.
Using a machine vision-based method, the tooth surface roughness measurement model is constructed through multi-angle image acquisition and processing, including grayscale processing, pixel point energy analysis, adaptive Gaussian filtering, feature point extraction and matching, splicing and texture feature extraction.
It realizes rapid and accurate measurement of the roughness of the grinding tooth surface, reduces costs, and improves the stability and reliability of the measurement results.
Smart Images

Figure CN119559229A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of gear grinding quality detection, and in particular to a method for measuring the roughness of a gear grinding tooth surface based on machine vision. Background Art
[0002] In the process of gear grinding, tooth surface roughness is one of the important indicators to measure the quality of gear processing. Tooth surface roughness not only affects the transmission accuracy, noise and vibration level of the gear, but also has an important impact on the service life and reliability of the gear. Traditional tooth surface roughness measurement methods, such as the stylus method, require contact measurement with the tooth surface. The measurement process is time-consuming and may cause damage to the tooth surface. Although the optical interferometry method has high accuracy, the equipment is expensive, the operation is complicated, and the measurement environment is demanding. Therefore, it is of great practical significance to develop a non-contact, fast, accurate and low-cost method for measuring the roughness of ground gear teeth. Summary of the invention
[0003] In order to solve the above technical problems, the object of the present invention is to provide a method for measuring the roughness of a grinding tooth surface based on machine vision, comprising the following steps: Step s1: fix the grinding tooth to be tested on a rotating platform, set the positions of the camera, lens and light source to ensure that the tooth surface can be clearly photographed at the initial angle, start the rotating platform, and rotate it in sequence according to the preset angles. After each rotation, trigger the camera to collect images, obtain multi-angle tooth surface images of the grinding tooth to be tested, grayscale the multi-angle tooth surface images, convert the multi-angle tooth surface images into multi-angle tooth surface grayscale images, perform pixel point energy analysis on the multi-angle tooth surface images, and divide each pixel point in the multi-angle tooth surface grayscale image into a first feature point and a featureless point; Step s2: performing regional clustering on each featureless point to obtain a number of local regions, and performing an adaptive Gaussian filtering operation on the multi-angle tooth surface grayscale image according to the average local variance of each local region and the local variance of each featureless point and the first feature point to obtain the multi-angle tooth surface grayscale image after noise removal; Step s3: extracting feature points from the tooth surface grayscale images at each angle in the multi-angle tooth surface grayscale images after noise removal, then matching the feature points of the tooth surface grayscale images at each angle, and splicing the tooth surface grayscale images at each angle to generate a complete tooth surface grayscale image; Step s4: construct a tooth surface roughness measurement model, extract texture features from the complete tooth surface grayscale image, and obtain the tooth surface roughness value of the complete tooth surface grayscale image.
[0004] Furthermore, the process of performing pixel energy analysis on the multi-angle tooth surface image and dividing each pixel in the multi-angle tooth surface grayscale image into a first feature point and a featureless point includes: Obtain the local variance of each pixel in the multi-angle tooth surface grayscale image; Among them, the calculation formula for obtaining the local variance of each pixel in the multi-angle tooth surface grayscale image is: ; ; in, represents the local variance, d represents the gray value, Represents pixel The gray value at, W represents the set of all pixels in the neighborhood, and n1 represents the total number of pixels in the neighborhood; The gray-level co-occurrence matrix of each pixel is constructed by using the gray-level co-occurrence matrix technology. The specific details include quantizing the gray-level of the surface image data into discrete gray-levels, dividing the gray-level value range into several levels, for example, an 8-bit image can be divided into 16, 32, and 64 levels, and defining the parameters required for the gray-level co-occurrence matrix, including distance (d) and direction (θ), which are determined according to the actual application requirements. The specific steps are not repeated here. Then, the gray-level co-occurrence matrix of each pixel is subjected to feature extraction to obtain the energy of each pixel (used to describe the uniformity of the gray-level distribution of pixels in the image, measure the randomness contained in the image, and express the complexity of the image), preset the energy upper limit threshold, compare the energy of each pixel with the energy upper limit threshold, mark the pixel whose energy is greater than the energy upper limit threshold as the first feature point, and mark the pixel whose energy is less than or equal to the energy upper limit threshold as a featureless point; The lower the energy, the simpler and more regular the texture and the smoother the region, that is, the pixel value changes in the region are mainly caused by noise. Therefore, the local noise level is subsequently reflected by the average local variance in the local region without feature point merging, thereby improving the accuracy of the noise denoising result.
[0005] Furthermore, the process of performing regional clustering on each featureless point and obtaining several local regions includes: Select a featureless point, compare the local variance of the featureless point with the local variances of other featureless points, obtain the local variance difference between the featureless point and the other featureless points, compare the local variance difference with a preset local variance difference threshold, merge other featureless points whose local variance differences are less than or equal to the local variance difference threshold with the featureless point into a local area, and repeat the above steps until all featureless points are merged into the local area; According to the local variances of the featureless points included in each local area, the average local variance of each local area is obtained.
[0006] Furthermore, the process of performing an adaptive Gaussian filtering operation on the multi-angle tooth surface grayscale image according to the average local variance of each local area and the local variance of each featureless point and the first feature point includes: Constructing a filter parameter matching model, obtaining the average local variance of the local area to which each featureless point belongs, obtaining the difference between the local variance of each featureless point and the average local variance of the local area to which each featureless point belongs, and marking the difference as noise fluctuation; Obtaining an average local variance of local regions adjacent to each first feature point, obtaining a difference between the local variance of each first feature point and the average local variance of the adjacent local region, and marking the difference as noise fluctuation; According to the noise fluctuation of each first feature point and the noise fluctuation of each featureless point, the filter parameter matching model is input to obtain the filter parameters of each first feature point and each featureless point, and the Gaussian filtering method is used to perform Gaussian filtering on each first feature point and each featureless point of the multi-angle tooth surface grayscale image according to the filter parameters of each first feature point and each featureless point to obtain the multi-angle tooth surface grayscale image after noise removal. The filtering parameters include Gaussian kernel size and standard deviation. When the local variance is close to the average local variance, it means that this area is mainly composed of noise, and the filter parameter matching model increases the standard deviation to enhance the smoothing effect; conversely, if the local variance is much larger than the average local variance, it indicates that there may be important image features such as edges here, and the filter parameter matching model reduces the standard deviation to reduce the impact on these features.
[0007] Furthermore, the process of extracting feature points from the tooth surface grayscale images at each angle in the multi-angle tooth surface grayscale images after noise removal includes: Construct the Hessian matrix of each pixel in the grayscale image of the tooth surface at each angle, obtain the Hessian matrix determinant value of each pixel, and compare the Hessian matrix determinant value of each pixel with the Hessian matrix determinant values of eight neighboring pixels of each pixel; Among them, for a pixel point, the Hessian matrix is defined as: ; Among them, , and are the convolution of the Gaussian second-order derivative and I(x,y), I(x,y) is the grayscale value of the angle tooth surface grayscale image at the pixel point (x,y), is the scale parameter of the Gaussian kernel; The formula for calculating the determinant of the Hessian matrix is: ; in, Represents the Hessian matrix determinant value; If the Hessian matrix determinant values of the pixel point are all greater than the Hessian matrix determinant values of the eight neighboring pixel points, the pixel point is marked as the second feature point; In order to make the feature points rotationally invariant, the main direction of each feature point is calculated in advance, and the Haar wavelet response in the neighborhood of the second feature point is obtained. The specific process is: with each feature point as the center, the Haar wavelet response in the horizontal and vertical directions is calculated in its neighborhood; the calculation formulas of the Haar wavelet response in the horizontal direction and the Haar wavelet response in the vertical direction are respectively: ; ; Where W is a rectangular window centered on the feature point, and s is the size of the window; The directional histogram of the Haar wavelet response in the neighborhood of the second feature point is calculated. The specific process is to calculate the amplitude m and direction of the Haar wavelet response for each pixel. : ; ; Then the direction is quantized to the range of 0 to 360 degrees, and the amplitude m is assigned to the corresponding direction interval, and the direction histogram is statistically calculated; Find the direction interval with the largest amplitude in the direction histogram of the second feature point, take the central direction of the direction interval as the main direction of the second feature point, obtain the main direction of the second feature point, construct a sub-region of the neighborhood of the second feature point, and construct a sub-region of size centered on each feature point in its neighborhood. (where s is the size of the scale of the second feature point) and divide the rectangular area into Sub-regions of equal size are obtained to obtain the Haar wavelet response statistics in each sub-region. The specific process is: calculate the sum of the amplitudes of the horizontal Haar wavelet responses in each sub-region respectively , the sum of the amplitudes of the vertical Haar wavelet response , the absolute value of the amplitude of the Haar wavelet response in the horizontal direction And the absolute value of the amplitude of the vertical Haar wavelet response , arrange the Haar wavelet response statistics calculated in each sub-region in a certain order to obtain the feature descriptor vector of the second feature point; this feature descriptor vector comprehensively describes the image feature information in the neighborhood of the feature point, has good uniqueness and stability, and can be effectively used in computer vision tasks such as feature matching and target recognition.
[0008] Furthermore, the process of matching feature points of the tooth surface grayscale images at various angles and splicing the tooth surface grayscale images at various angles to generate a complete tooth surface grayscale image includes: Matching the feature descriptor vector of the second feature point in the angle tooth surface grayscale image with the feature descriptor vectors of all the second feature points in other angle tooth surface grayscale images, and obtaining the Euclidean distance between the feature descriptor vectors of the second feature point in the angle tooth surface grayscale image and all the second feature points in other angle tooth surface grayscale images; Obtain the second feature point with the shortest Euclidean distance in the corresponding grayscale image of other angle tooth surface and mark it as a matching point, and construct a matching pair between the grayscale image of the angle tooth surface and the other grayscale images of the angle tooth surface according to the second feature point in the grayscale image of the angle tooth surface and the matching points in the grayscale image of the other angle tooth surface; Preset a transformation relationship between each angle tooth surface grayscale image and other angle tooth surface grayscale images in the multi-angle tooth surface grayscale images, obtain a number of matching pairs between each angle tooth surface grayscale image and other angle tooth surface grayscale images, and perform image registration between each angle tooth surface grayscale image and other angle tooth surface grayscale images according to the transformation relationship between each angle tooth surface grayscale image and other angle tooth surface grayscale images and the number of matching pairs; After completing the image registration between the tooth surface grayscale images at each angle and the tooth surface grayscale images at other angles, the tooth surface grayscale images at each angle are spliced to generate a complete tooth surface grayscale image.
[0009] Furthermore, the process of extracting texture features from the complete tooth surface grayscale image and obtaining the tooth surface roughness value of the complete tooth surface grayscale image includes: The gray level co-occurrence matrix technology is used to construct the gray level co-occurrence matrix of each pixel in the complete tooth surface gray level image, and the feature extraction is performed on the gray level co-occurrence matrix of each pixel to obtain the texture feature of each pixel. The texture feature includes contrast, correlation, energy, entropy, etc., and the tooth surface roughness measurement model is constructed. The texture feature of each pixel in the complete tooth surface gray level image is input into the tooth surface roughness measurement model, and the tooth surface roughness value is output according to the tooth surface roughness measurement model.
[0010] Furthermore, the process of constructing the tooth surface roughness measurement model includes: A tooth surface roughness measurement model is constructed based on deep learning, and several sample images of ground tooth surfaces with different tooth surface roughness are collected. The texture features of each pixel point in the sample images of ground tooth surfaces with different tooth surface roughness are extracted, and the texture features of each pixel point in the sample images of ground tooth surfaces with different tooth surface roughness are used as training sets and test sets. The training set is input into the tooth surface roughness measurement model for training until the loss function training is stable, and the model parameters are saved. The tooth surface roughness measurement model is tested by the test set until it meets the preset requirements, and the tooth surface roughness measurement model is output.
[0011] Compared with the prior art, the present invention has the following beneficial effects: 1. Multi-angle image acquisition and processing: By acquiring multi-angle tooth surface images of the grinding gear to be tested, all parts of the tooth surface can be fully covered, avoiding the limitations of single-angle measurement. Multi-angle acquisition ensures that the microscopic features of different positions on the tooth surface can be captured, which is particularly critical for the roughness measurement of grinding gears with complex shapes. Grayscale processing and subsequent pixel energy analysis accurately divide the first feature point and the featureless point, laying the foundation for the subsequent accurate extraction of effective information. The use of grayscale co-occurrence matrix technology in feature extraction can deeply explore the spatial relationship between pixels, making the description of the tooth surface texture more detailed, thereby improving the accuracy of roughness measurement.
[0012] 2. Feature point matching and splicing: Extract and match the feature points of the tooth surface grayscale images at each angle, and splice the images at different angles into a complete tooth surface grayscale image, which restores the overall appearance of the tooth surface to the greatest extent. In this process, the second feature point is determined by the Hessian matrix, the feature descriptor vector is constructed using the Haar wavelet response, and then the feature point matching is performed based on the Euclidean distance to establish an accurate matching pair, so that the spliced image can accurately reflect the actual situation of the tooth surface and provide a more reliable data basis for roughness measurement.
[0013] 3. Adaptive Gaussian filtering: regional clustering of featureless points is performed, and the average local variance is obtained based on the local variance, and adaptive Gaussian filtering is performed based on this. This filtering method can dynamically adjust the filtering parameters according to the noise characteristics of different areas of the image. For areas with different noise fluctuations, personalized filtering strategies are adopted to maintain image details. Compared with traditional fixed parameter filtering methods, it can more effectively remove noise while retaining key texture information on the tooth surface, thereby improving the stability and reliability of the measurement results. In the actual gear grinding processing environment, noise generated by various interference factors is inevitable. This method can effectively deal with these interferences and ensure that the accuracy of the measurement results is not affected.
[0014] 4. Deep learning model construction: A tooth surface roughness measurement model is constructed based on deep learning, and training is performed by collecting a large number of sample images of grinding tooth surfaces with different tooth surface roughness. Once the model is trained, it can quickly extract texture features from the input complete tooth surface grayscale image and output the tooth surface roughness value. This automated measurement method greatly shortens the measurement time and improves production efficiency. On large-scale gear grinding production lines, real-time and rapid roughness detection can be achieved, unqualified products can be discovered in a timely manner, scrap rates can be reduced, and production costs can be reduced. At the same time, the deep learning model has a strong generalization ability and can adapt to gear grinding produced in different batches and with different processes, reducing the need for manual intervention and parameter adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a schematic diagram of a method for measuring the roughness of a grinding tooth surface based on machine vision according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0017] like Figure 1 As shown, a method for measuring the roughness of a grinding tooth surface based on machine vision comprises the following steps: Step s1: fix the grinding tooth to be tested on a rotating platform, set the positions of the camera, lens and light source to ensure that the tooth surface can be clearly photographed at the initial angle, start the rotating platform, and rotate it in sequence according to the preset angles. After each rotation, trigger the camera to collect images, obtain multi-angle tooth surface images of the grinding tooth to be tested, grayscale the multi-angle tooth surface images, convert the multi-angle tooth surface images into multi-angle tooth surface grayscale images, perform pixel point energy analysis on the multi-angle tooth surface images, and divide each pixel point in the multi-angle tooth surface grayscale image into a first feature point and a featureless point; Step s2: performing regional clustering on each featureless point to obtain a number of local regions, and performing an adaptive Gaussian filtering operation on the multi-angle tooth surface grayscale image according to the average local variance of each local region and the local variance of each featureless point and the first feature point to obtain the multi-angle tooth surface grayscale image after noise removal; Step s3: extracting feature points from the tooth surface grayscale images at each angle in the multi-angle tooth surface grayscale images after noise removal, then matching the feature points of the tooth surface grayscale images at each angle, and splicing the tooth surface grayscale images at each angle to generate a complete tooth surface grayscale image; Step s4: construct a tooth surface roughness measurement model, extract texture features from the complete tooth surface grayscale image, and obtain the tooth surface roughness value of the complete tooth surface grayscale image.
[0018] It should be further explained that, in a specific implementation process, the process of performing pixel energy analysis on the multi-angle tooth surface image and dividing each pixel in the multi-angle tooth surface grayscale image into a first feature point and a featureless point includes: Obtain the local variance of each pixel in the multi-angle tooth surface grayscale image; The calculation formula for obtaining the local variance of each pixel in the multi-angle tooth surface grayscale image is: ; ; in, represents the local variance, d represents the gray value, Represents pixel The gray value at, W represents the set of all pixels in the neighborhood, and n1 represents the total number of pixels in the neighborhood; The gray-level co-occurrence matrix of each pixel is constructed by using the gray-level co-occurrence matrix technology. The specific details include quantizing the gray-level of the surface image data into discrete gray-levels, dividing the gray-level value range into several levels, for example, an 8-bit image can be divided into 16, 32, and 64 levels, and defining the parameters required for the gray-level co-occurrence matrix, including distance (d) and direction (θ), which are determined according to the actual application requirements. The specific steps are not repeated here. Then, the gray-level co-occurrence matrix of each pixel is subjected to feature extraction to obtain the energy of each pixel (used to describe the uniformity of the gray-level distribution of pixels in the image, measure the randomness contained in the image, and express the complexity of the image), preset the energy upper limit threshold, compare the energy of each pixel with the energy upper limit threshold, mark the pixel whose energy is greater than the energy upper limit threshold as the first feature point, and mark the pixel whose energy is less than or equal to the energy upper limit threshold as a featureless point; The lower the energy, the simpler and more regular the texture and the smoother the region, that is, the pixel value changes in the region are mainly caused by noise. Therefore, the local noise level is subsequently reflected by the average local variance in the local region without feature point merging, thereby improving the accuracy of the noise denoising result.
[0019] It should be further explained that, in the specific implementation process, the process of performing regional clustering on each featureless point and obtaining several local areas includes: Select a featureless point, compare the local variance of the featureless point with the local variances of other featureless points, obtain the local variance difference between the featureless point and the other featureless points, compare the local variance difference with a preset local variance difference threshold, merge other featureless points whose local variance differences are less than or equal to the local variance difference threshold with the featureless point into a local area, and repeat the above steps until all featureless points are merged into the local area; According to the local variances of the featureless points included in each local area, the average local variance of each local area is obtained.
[0020] It should be further explained that, in the specific implementation process, the process of performing the adaptive Gaussian filtering operation on the multi-angle tooth surface grayscale image according to the average local variance of each local area and the local variance of each featureless point and the first feature point includes: Constructing a filter parameter matching model, obtaining the average local variance of the local area to which each featureless point belongs, obtaining the difference between the local variance of each featureless point and the average local variance of the local area to which each featureless point belongs, and marking the difference as noise fluctuation; Obtaining an average local variance of local regions adjacent to each first feature point, obtaining a difference between the local variance of each first feature point and the average local variance of the adjacent local region, and marking the difference as noise fluctuation; According to the noise fluctuation of each first feature point and the noise fluctuation of each featureless point, the filter parameter matching model is input to obtain the filter parameters of each first feature point and each featureless point, and the Gaussian filtering method is used to perform Gaussian filtering on each first feature point and each featureless point of the multi-angle tooth surface grayscale image according to the filter parameters of each first feature point and each featureless point to obtain the multi-angle tooth surface grayscale image after noise removal. The filtering parameters include Gaussian kernel size and standard deviation. When the local variance is close to the average local variance, it means that this area is mainly composed of noise, and the filter parameter matching model increases the standard deviation to enhance the smoothing effect; conversely, if the local variance is much larger than the average local variance, it indicates that there may be important image features such as edges here, and the filter parameter matching model reduces the standard deviation to reduce the impact on these features.
[0021] It should be further explained that, in the specific implementation process, the process of extracting feature points from the tooth surface grayscale image at each angle in the multi-angle tooth surface grayscale image after noise removal includes: Construct the Hessian matrix of each pixel in the grayscale image of the tooth surface at each angle, obtain the Hessian matrix determinant value of each pixel, and compare the Hessian matrix determinant value of each pixel with the Hessian matrix determinant values of eight neighboring pixels of each pixel; Among them, for a pixel point, the Hessian matrix is defined as: ; Among them, , and are the convolution of the Gaussian second-order derivative and I(x,y), I(x,y) is the grayscale value of the angle tooth surface grayscale image at the pixel point (x,y), is the scale parameter of the Gaussian kernel; The formula for calculating the determinant of the Hessian matrix is: ; in, Represents the Hessian matrix determinant value; If the Hessian matrix determinant values of the pixel point are all greater than the Hessian matrix determinant values of the eight neighboring pixel points, the pixel point is marked as the second feature point; In order to make the feature points rotationally invariant, the main direction of each feature point is calculated in advance, and the Haar wavelet response in the neighborhood of the second feature point is obtained. The specific process is: with each feature point as the center, the Haar wavelet response in the horizontal and vertical directions is calculated in its neighborhood; the calculation formulas of the Haar wavelet response in the horizontal direction and the Haar wavelet response in the vertical direction are respectively: ; ; Where W is a rectangular window centered on the feature point, and s is the size of the window; The directional histogram of the Haar wavelet response in the neighborhood of the second feature point is calculated. The specific process is to calculate the amplitude m and direction of the Haar wavelet response for each pixel. : ; ; Then the direction is quantized to the range of 0 to 360 degrees, and the amplitude m is assigned to the corresponding direction interval, and the direction histogram is statistically calculated; Find the direction interval with the largest amplitude in the direction histogram of the second feature point, take the central direction of the direction interval as the main direction of the second feature point, obtain the main direction of the second feature point, construct a sub-region of the neighborhood of the second feature point, and construct a sub-region of size centered on each feature point in its neighborhood. (where s is the size of the scale of the second feature point) and divide the rectangular area into Sub-regions of equal size are obtained to obtain the Haar wavelet response statistics in each sub-region. The specific process is: calculate the sum of the amplitudes of the horizontal Haar wavelet responses in each sub-region respectively , the sum of the amplitudes of the vertical Haar wavelet response , the absolute value of the amplitude of the Haar wavelet response in the horizontal direction And the absolute value of the amplitude of the vertical Haar wavelet response , arrange the Haar wavelet response statistics calculated in each sub-region in a certain order to obtain the feature descriptor vector of the second feature point; this feature descriptor vector comprehensively describes the image feature information in the neighborhood of the feature point, has good uniqueness and stability, and can be effectively used in computer vision tasks such as feature matching and target recognition.
[0022] It should be further explained that, in the specific implementation process, the process of matching the feature points of the tooth surface grayscale images at various angles, splicing the tooth surface grayscale images at various angles, and generating a complete tooth surface grayscale image includes: Matching the feature descriptor vector of the second feature point in the angle tooth surface grayscale image with the feature descriptor vectors of all the second feature points in other angle tooth surface grayscale images, and obtaining the Euclidean distance between the feature descriptor vectors of the second feature point in the angle tooth surface grayscale image and all the second feature points in other angle tooth surface grayscale images; Obtain the second feature point with the shortest Euclidean distance in the corresponding grayscale image of other angle tooth surface and mark it as a matching point, and construct a matching pair between the grayscale image of the angle tooth surface and the other grayscale images of the angle tooth surface according to the second feature point in the grayscale image of the angle tooth surface and the matching points in the grayscale image of the other angle tooth surface; Preset a transformation relationship between each angle tooth surface grayscale image and other angle tooth surface grayscale images in the multi-angle tooth surface grayscale images, obtain a number of matching pairs between each angle tooth surface grayscale image and other angle tooth surface grayscale images, and perform image registration between each angle tooth surface grayscale image and other angle tooth surface grayscale images according to the transformation relationship between each angle tooth surface grayscale image and other angle tooth surface grayscale images and the number of matching pairs; After completing the image registration between the tooth surface grayscale images at each angle and the tooth surface grayscale images at other angles, the tooth surface grayscale images at each angle are spliced to generate a complete tooth surface grayscale image.
[0023] It should be further explained that, in the specific implementation process, the process of extracting texture features from the complete tooth surface grayscale image and obtaining the tooth surface roughness value of the complete tooth surface grayscale image includes: The gray level co-occurrence matrix technology is used to construct the gray level co-occurrence matrix of each pixel in the complete tooth surface gray level image, and the feature extraction is performed on the gray level co-occurrence matrix of each pixel to obtain the texture feature of each pixel. The texture feature includes contrast, correlation, energy, entropy, etc., and the tooth surface roughness measurement model is constructed. The texture feature of each pixel in the complete tooth surface gray level image is input into the tooth surface roughness measurement model, and the tooth surface roughness value is output according to the tooth surface roughness measurement model.
[0024] It should be further explained that, in the specific implementation process, the process of constructing the tooth surface roughness measurement model includes: A tooth surface roughness measurement model is constructed based on deep learning, and several sample images of ground tooth surfaces with different tooth surface roughness are collected. The texture features of each pixel point in the sample images of ground tooth surfaces with different tooth surface roughness are extracted, and the texture features of each pixel point in the sample images of ground tooth surfaces with different tooth surface roughness are used as training sets and test sets. The training set is input into the tooth surface roughness measurement model for training until the loss function training is stable, and the model parameters are saved. The tooth surface roughness measurement model is tested by the test set until it meets the preset requirements, and the tooth surface roughness measurement model is output.
[0025] Building a deep learning-based tooth surface roughness measurement model is a complex process that involves multiple steps such as model selection, training, verification, and testing. The following is a detailed supplementary explanation of this process: The support vector machine (SVM) algorithm is used to establish the roughness calculation model, and the mean square error (MSE) loss function is selected as the optimization target. Then the prepared training set is input into the selected deep learning model to start training. During the training process, the weights are continuously updated through the back propagation algorithm, so that the loss function gradually decreases until it reaches a stable state. During this period, the Early Stopping method and other techniques are used to avoid overfitting. In addition to the basic training process, the various parameters of the model are tuned through Grid Search, including the learning rate, batch size, regularization coefficient, etc.
[0026] After the model training is completed and the parameters are adjusted, the final evaluation is performed through the test set to obtain the evaluation results of the model, which include classification indicators such as accuracy, recall, F1 score, etc. Based on the evaluation results on the test set, it is judged whether the model has reached the expected standards. If the requirements are met, the model parameters are saved and ready for deployment; if not ideal, it is necessary to return to a previous stage to re-examine issues such as data quality, model structure or training strategy.
[0027] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for measuring the roughness of a grinding tooth surface based on machine vision, characterized in that: The following steps are involved: Step s1: obtaining a multi-angle tooth surface image of the grinding tooth to be tested, graying the multi-angle tooth surface image, converting the multi-angle tooth surface image into a multi-angle tooth surface grayscale image, performing pixel point energy analysis on the multi-angle tooth surface image, and dividing each pixel point in the multi-angle tooth surface grayscale image into a first feature point and a featureless point; Step s2: performing regional clustering on each featureless point to obtain a number of local regions, and performing an adaptive Gaussian filtering operation on the multi-angle tooth surface grayscale image according to the average local variance of each local region and the local variance of each featureless point and the first feature point to obtain the multi-angle tooth surface grayscale image after noise removal; Step s3: extracting feature points from the tooth surface grayscale images at each angle in the multi-angle tooth surface grayscale images after noise removal, then matching the feature points of the tooth surface grayscale images at each angle, and splicing the tooth surface grayscale images at each angle to generate a complete tooth surface grayscale image; Step s4: construct a tooth surface roughness measurement model, extract texture features from the complete tooth surface grayscale image, and obtain the tooth surface roughness value of the complete tooth surface grayscale image.
2. The method for measuring the roughness of a grinding tooth surface based on machine vision according to claim 1, characterized in that: The process of performing pixel energy analysis on the multi-angle tooth surface image and dividing each pixel in the multi-angle tooth surface grayscale image into a first feature point and a featureless point includes: Obtain the local variance of each pixel in the multi-angle tooth surface grayscale image; The gray level co-occurrence matrix technology is used to construct the gray level co-occurrence matrix of each pixel, and the feature extraction is performed on the gray level co-occurrence matrix of each pixel to obtain the energy of each pixel, and the energy upper limit threshold is preset. The energy of each pixel is compared with the energy upper limit threshold, and the pixel points whose energy is greater than the energy upper limit threshold are marked as the first feature points, and the pixel points whose energy is less than or equal to the energy upper limit threshold are marked as no feature points.
3. The method for measuring the roughness of a grinding tooth surface based on machine vision according to claim 2, characterized in that: The process of clustering each featureless point into regions and obtaining several local regions includes: Select a featureless point, compare the local variance of the featureless point with the local variances of other featureless points, obtain the local variance difference between the featureless point and the other featureless points, compare the local variance difference with a preset local variance difference threshold, merge other featureless points whose local variance differences are less than or equal to the local variance difference threshold with the featureless point into a local area, and repeat the above steps until all featureless points are merged into the local area; According to the local variances of the featureless points included in each local area, the average local variance of each local area is obtained.
4. The method for measuring the roughness of a grinding tooth surface based on machine vision according to claim 3 is characterized in that: The process of performing an adaptive Gaussian filtering operation on the multi-angle tooth surface grayscale image according to the average local variance of each local area and the local variance of each featureless point and the first feature point includes: Constructing a filter parameter matching model, obtaining the average local variance of the local area to which each featureless point belongs, obtaining the difference between the local variance of each featureless point and the average local variance of the local area to which each featureless point belongs, and marking the difference as noise fluctuation; Obtaining an average local variance of local regions adjacent to each first feature point, obtaining a difference between the local variance of each first feature point and the average local variance of the adjacent local region, and marking the difference as noise fluctuation; According to the noise fluctuation of each first feature point and the noise fluctuation of each featureless point, the filter parameter matching model is input to obtain the filter parameters of each first feature point and each featureless point, and according to the filter parameters of each first feature point and each featureless point, the Gaussian filtering method is used to perform Gaussian filtering on each first feature point and each featureless point of the multi-angle tooth surface grayscale image to obtain the multi-angle tooth surface grayscale image after noise removal.
5. The method for measuring the roughness of a grinding tooth surface based on machine vision according to claim 4, characterized in that: The process of extracting feature points from the tooth surface grayscale images at each angle in the multi-angle tooth surface grayscale images after noise removal includes: Construct the Hessian matrix of each pixel in the grayscale image of the tooth surface at each angle, obtain the Hessian matrix determinant value of each pixel, and compare the Hessian matrix determinant value of each pixel with the Hessian matrix determinant values of eight neighboring pixels of each pixel; If the Hessian matrix determinant values of the pixel point are all greater than the Hessian matrix determinant values of the eight neighboring pixel points, the pixel point is marked as the second feature point; Obtain the Haar wavelet response in the neighborhood of the second feature point, calculate the directional histogram of the Haar wavelet response in the neighborhood of the second feature point, obtain the main direction of the second feature point, construct sub-regions in the neighborhood of the second feature point, obtain the Haar wavelet response statistics in each sub-region, arrange the Haar wavelet response statistics calculated in each sub-region in a certain order, and obtain the feature descriptor vector of the second feature point.
6. The method for measuring the roughness of a grinding tooth surface based on machine vision according to claim 5, characterized in that: The process of matching feature points of the tooth surface grayscale images at various angles and splicing the tooth surface grayscale images at various angles to generate a complete tooth surface grayscale image includes: Matching the feature descriptor vector of the second feature point in the angle tooth surface grayscale image with the feature descriptor vectors of all the second feature points in other angle tooth surface grayscale images, and obtaining the Euclidean distance between the feature descriptor vectors of the second feature point in the angle tooth surface grayscale image and all the second feature points in other angle tooth surface grayscale images; Obtain the second feature point with the shortest Euclidean distance in the corresponding grayscale image of other angle tooth surface and mark it as a matching point, and construct a matching pair between the grayscale image of the angle tooth surface and the other grayscale images of the angle tooth surface according to the second feature point in the grayscale image of the angle tooth surface and the matching points in the grayscale image of the other angle tooth surface; Preset a transformation relationship between each angle tooth surface grayscale image and other angle tooth surface grayscale images in the multi-angle tooth surface grayscale images, obtain a number of matching pairs between each angle tooth surface grayscale image and other angle tooth surface grayscale images, and perform image registration between each angle tooth surface grayscale image and other angle tooth surface grayscale images according to the transformation relationship between each angle tooth surface grayscale image and other angle tooth surface grayscale images and the number of matching pairs; After completing the image registration between the tooth surface grayscale images at each angle and the tooth surface grayscale images at other angles, the tooth surface grayscale images at each angle are spliced to generate a complete tooth surface grayscale image.
7. The method for measuring the roughness of a grinding tooth surface based on machine vision according to claim 6, characterized in that: The process of extracting texture features from the complete tooth surface grayscale image and obtaining the tooth surface roughness value of the complete tooth surface grayscale image includes: The gray level co-occurrence matrix technology is used to construct the gray level co-occurrence matrix of each pixel in the complete tooth surface gray image, and the feature extraction is performed on the gray level co-occurrence matrix of each pixel to obtain the texture feature of each pixel. The tooth surface roughness measurement model is constructed, and the texture feature of each pixel in the complete tooth surface gray image is input into the tooth surface roughness measurement model, and the tooth surface roughness value is output according to the tooth surface roughness measurement model.
8. The method for measuring the roughness of a grinding tooth surface based on machine vision according to claim 7, characterized in that: The process of building a tooth surface roughness measurement model includes: A tooth surface roughness measurement model is constructed based on deep learning, and several sample images of ground tooth surfaces with different tooth surface roughness are collected. The texture features of each pixel point in the sample images of ground tooth surfaces with different tooth surface roughness are extracted, and the texture features of each pixel point in the sample images of ground tooth surfaces with different tooth surface roughness are used as training sets and test sets. The training set is input into the tooth surface roughness measurement model for training until the loss function training is stable, and the model parameters are saved. The tooth surface roughness measurement model is tested by the test set until it meets the preset requirements, and the tooth surface roughness measurement model is output.
Citation Information
Patent Citations
High altitude long endurance unmanned aerial vehicle integrated navigation system and navigating and positioning method thereof
CN102353377A
Roughness measurement sensor, an apparatus with a roughness measurement sensor and the respective use thereof
CN107270805A
Grinding tooth surface roughness measuring device and method based on machine vision
CN113418476A
Image-based support vector machine detection method and system for surface roughness of part
CN113989233A
Image enhancement method for gear
CN115082481A