A machine vision image processing method for intelligent grinding wheel

Through the intelligent grinding wheel machine visual image processing method, the local mirror contrast and mirror brightness index are used, combined with the compensation processing of the item grinding evaluation network, the problem of low grinding evaluation accuracy of complex surface materials is solved, and a higher precision grinding quality evaluation is achieved.

CN119579587BActive Publication Date: 2025-04-29MIANYANG ZHONGYAN ABRASIVES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510127724.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-04-29
Estimated Expiration
2045-02-05

AI Technical Summary

Technical Problem

The prior art has the problem of low precision in grinding quality evaluation in grinding evaluation of complex surface materials, especially when the matte surface effect exists.

Method used

The visual image processing method of intelligent grinding wheel machine is adopted. By collecting the image of the polished object, the brightness value of each pixel point is extracted, the local mirror contrast and the mirror brightness index are calculated, the mirror image is constructed, the mirror area is divided, the mirror weight vector is calculated, and the item polishing evaluation network is used for compensation processing, which improves the evaluation accuracy of the polishing degree value.

Benefits of technology

By comprehensively evaluating the grinding quality from the mirror imaging profile and color, the matte surface affects the evaluation accuracy, and significantly improving the accuracy and accuracy of grinding quality evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579587B_ABST
    Figure CN119579587B_ABST
Patent Text Reader

Abstract

The present invention discloses a machine vision image processing method for an intelligent grinding wheel, and belongs to the technical field of image processing. The present invention first collects an image of an object, and constructs a first mirror image by extracting the brightness value of the pixel points and calculating the local mirror contrast; then calculates the mirror brightness index to generate a second mirror image. The mirror area is segmented according to the first object mirror image and the second object mirror image, and the mirror weight vector is calculated; the first object mirror image and the second object mirror image are processed using an object grinding evaluation network, and the object grinding degree value is obtained based on the compensation of the mirror weight vector. The present invention solves the problem of low grinding quality evaluation accuracy in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image processing, and in particular to a machine vision image processing method for an intelligent grinding wheel. Background Art

[0002] In modern industrial production, precision grinding is a key process to ensure product quality and surface finish. The traditional grinding process mainly relies on manual experience and visual inspection. This method has problems such as strong subjectivity, low detection accuracy, and low efficiency. With the continuous improvement of the manufacturing industry's requirements for product surface quality, traditional grinding methods have been difficult to meet the production needs of high precision and high consistency. Although the existing machine vision inspection technology has introduced automation and intelligence to a certain extent, it still faces many challenges in the grinding evaluation of complex surface materials. Existing visual inspection methods mainly evaluate the degree of grinding by analyzing the smoothness of the polished surface. However, for many items, their surface may have a matte effect, and this surface feature does not visually affect the judgment of smoothness. Therefore, the existing visual inspection method has the problem of low accuracy in grinding quality assessment. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides an intelligent grinding wheel machine vision image processing method to solve the problem of low grinding quality assessment accuracy in the prior art.

[0004] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a method for processing machine vision images of intelligent grinding wheels, comprising the following steps:

[0005] S1. Collect an image of the polished object, extract the brightness value of each pixel in the image, calculate the local mirror contrast of each pixel, use each local mirror contrast as the pixel value of the corresponding pixel, and construct a mirror image of the first object;

[0006] S2. Calculate the mirror brightness index of each pixel point according to the brightness value of each pixel point in the image, use each mirror brightness index as the pixel value of the corresponding pixel point, and construct a second object mirror image;

[0007] S3, segmenting a mirror area according to the mirror image of the first object and the mirror image of the second object, and calculating a mirror weight vector;

[0008] S4. Use an object polishing evaluation network to process the mirror image of the first object and the mirror image of the second object, and obtain the object polishing degree value based on the compensation of the mirror weight vector.

[0009] Furthermore, the formula for the brightness value in S1 is: i =0.299R i +0.587Gi +0.114B i , where I i is the brightness value of the i-th pixel, R i is the R channel value of the i-th pixel, G i is the G channel value of the i-th pixel, B i is the B channel value of the i-th pixel, where i is a positive integer.

[0010] Furthermore, the formula for calculating the local mirror contrast in S1 is: , where L i,c is the local mirror contrast of the i-th pixel, I i,min is the minimum brightness value in the neighborhood of the i-th pixel, I i,max is the maximum brightness value in the neighborhood of the i-th pixel, where i is a positive integer.

[0011] Further, S2 includes the following sub-steps:

[0012] S21, calculating the color brightness coefficient of each pixel in the image;

[0013] S22, calculating the specular brightness index of each pixel point according to the brightness value of each pixel point in the image and the color brightness coefficient of the corresponding pixel point;

[0014] S23. Using each mirror brightness index as the pixel value of the corresponding pixel point to construct a second object mirror image.

[0015] Furthermore, the formula for calculating the color brightness coefficient in S21 is: , where C i is the color brightness coefficient of the i-th pixel, R i is the R channel value of the i-th pixel, G i is the G channel value of the i-th pixel, B i is the B channel value of the i-th pixel, i is a positive integer, R ref is the reference R channel value, G ref is the reference G channel value, B ref is the reference B channel value.

[0016] Furthermore, the formula for calculating the specular brightness index of each pixel in S22 is: , where S i is the specular brightness index of the i-th pixel, I i is the brightness value of the i-th pixel, e is a natural constant, C i is the color brightness coefficient of the i-th pixel, where i is a positive integer.

[0017] Furthermore, S3 includes the following sub-steps:

[0018] S31, calculating the average value of the pixel values ​​of each pixel point in the first object mirror image to obtain a first average value;

[0019] S32, marking pixel points with pixel values ​​greater than a first average value in the first object mirror image as contour points;

[0020] S33, connecting adjacent contour points to obtain each closed area;

[0021] S34, calculating the average value of the pixel values ​​of each pixel point in the second object mirror image to obtain a second average value;

[0022] S35, marking each closed area on the second object mirror image as a suspected mirror area;

[0023] S36, calculating an average pixel value for each pixel point in the suspected mirror area to obtain a regional average value, discarding suspected mirror areas whose regional average values ​​are lower than the second average value, and obtaining a retained mirror area;

[0024] S37. Calculate the mirror area weight value according to the area and flatness of the retained mirror area, and use each mirror area weight value as an element to construct a mirror weight vector.

[0025] Furthermore, the flatness in S37 is the variance of the pixel values ​​of the pixels on the retained mirror area;

[0026] The formula for calculating the mirror area weight value in S37 is: , where γ j is the weight value of the j-th mirror area, E j is the area of ​​the jth retained mirror region, E tar is the target area, θ j is the flatness of the j-th preserved mirror area, where j is a positive integer.

[0027] Furthermore, the item polishing evaluation network in S4 includes: image feature fusion layer, convolution layer, maximum pooling layer, average pooling layer, Concat layer and compensation layer;

[0028] The input of the image feature fusion layer is used as the input of the object polishing evaluation network;

[0029] The input end of the convolutional layer is connected to the output end of the image feature fusion layer, and its output end is connected to the input end of the maximum pooling layer and the input end of the average pooling layer respectively;

[0030] The input end of the Concat layer is connected to the output end of the maximum pooling layer and the output end of the average pooling layer respectively, and its output end is connected to the first input end of the compensation layer;

[0031] The second input end of the compensation layer is used to input the mirror weight vector, and the output end thereof is used to output the polishing degree value of the object.

[0032] Furthermore, the expression of the image feature fusion layer is: , where Y is the fusion feature, for The convolutional layer of size IM1 is the mirror image of the first object, and IM2 is the mirror image of the second object. is bitwise addition;

[0033] The expression of the compensation layer is: , , where y is the polishing degree of the item, x n is the nth eigenvalue output by the Concat layer, ω x,n For x n The weight of b x,n For x n The bias, ε is the compensation coefficient, tanh is the hyperbolic tangent function, γ j is the weight value of the j-th mirror area, ω γ,j For γ j The weight of b γ,j For γ j , n and j are positive integers, L is the number of eigenvalues ​​output by the Concat layer, and K is the number of mirror area weight values ​​in the mirror weight vector.

[0034] The beneficial effects of the present invention are:

[0035] 1. During the polishing process, the polished surface will form a mirror surface, which reflects light more strongly. Therefore, the present invention extracts the brightness value of each pixel in the image, calculates the local mirror contrast of each pixel, and reflects the contour of the light reflection area.

[0036] 2. The present invention calculates the mirror brightness index based on the brightness value of each pixel to reflect the color condition of the pixel.

[0037] 3. According to the contour provided by the mirror image of the first object and the color provided by the mirror image of the second object, the mirror area is segmented, and the mirror weight vector is calculated. Then, the object polishing evaluation network is used to process the mirror image of the first object and the mirror image of the second object. Based on the compensation of the mirror weight vector, the evaluation accuracy of the object polishing degree value is improved.

[0038] 4. The present invention evaluates the polishing quality comprehensively from two aspects: the mirror imaging profile and the mirror imaging color, so as to avoid the influence of the fog surface on the evaluation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1It is a flow chart of a method for intelligent grinding wheel machine vision image processing;

[0040] Figure 2 Schematic diagram of the structure of the item polishing evaluation network. DETAILED DESCRIPTION

[0041] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0042] like Figure 1 As shown, a method for processing machine vision images of an intelligent grinding wheel includes the following steps:

[0043] S1. Collect an image of the polished object, extract the brightness value of each pixel in the image, calculate the local mirror contrast of each pixel, use each local mirror contrast as the pixel value of the corresponding pixel, and construct a mirror image of the first object;

[0044] S2. Calculate the mirror brightness index of each pixel point according to the brightness value of each pixel point in the image, use each mirror brightness index as the pixel value of the corresponding pixel point, and construct a second object mirror image;

[0045] S3, segmenting a mirror area according to the mirror image of the first object and the mirror image of the second object, and calculating a mirror weight vector;

[0046] S4. Use an object polishing evaluation network to process the mirror image of the first object and the mirror image of the second object, and obtain the object polishing degree value based on the compensation of the mirror weight vector.

[0047] In this embodiment, the formula for the brightness value in S1 is: i =0.299R i +0.587G i +0.114B i , where I i is the brightness value of the i-th pixel, R i is the R channel value of the i-th pixel, G i is the G channel value of the i-th pixel, B i is the B channel value of the i-th pixel, where i is a positive integer.

[0048] In this embodiment, the formula for calculating the local mirror contrast in S1 is: , where L i,cis the local mirror contrast of the i-th pixel, I i,min is the minimum brightness value in the neighborhood of the i-th pixel, I i,max is the maximum brightness value in the neighborhood of the i-th pixel, where i is a positive integer.

[0049] In the present invention, the neighborhood range is or The present invention extracts the minimum brightness value and the maximum brightness value within the neighborhood range, calculates the difference between the maximum brightness value and the minimum brightness value, and reflects the brightness gradient of the local area. When the mirror surface is polished, the mirror has a strong reflective characteristic to light. The greater the local mirror contrast, the more obvious the boundary between the mirror surface and the non-mirror surface, which is used to identify the edge and intensity of the mirror reflection.

[0050] In this embodiment, S2 includes the following sub-steps:

[0051] S21, calculating the color brightness coefficient of each pixel in the image;

[0052] S22, calculating the specular brightness index of each pixel point according to the brightness value of each pixel point in the image and the color brightness coefficient of the corresponding pixel point;

[0053] S23. Using each mirror brightness index as the pixel value of the corresponding pixel point to construct a second object mirror image.

[0054] In this embodiment, the formula for calculating the color brightness coefficient in S21 is: , where C i is the color brightness coefficient of the i-th pixel, R i is the R channel value of the i-th pixel, G i is the G channel value of the i-th pixel, B i is the B channel value of the i-th pixel, i is a positive integer, R ref is the reference R channel value, G ref is the reference G channel value, B ref is the reference B channel value.

[0055] In this embodiment, R ref , G ref , B ref The present invention compares the channel value of each pixel with each reference channel value, calculates the ratio, takes into account the contribution of the red, green and blue channels, and can fully reflect the color characteristics of the image, thereby reflecting the color of the mirror in the current image.

[0056] In this embodiment, the formula for calculating the mirror brightness index of each pixel in S22 is: , where S iis the specular brightness index of the i-th pixel, I i is the brightness value of the i-th pixel, e is a natural constant, C i is the color brightness coefficient of the i-th pixel, where i is a positive integer.

[0057] In the color brightness coefficient C i The larger the size, the stronger the reflective ability of the polished mirror. Combined with the color brightness coefficient C i and brightness value I i , and get the mirror brightness index.

[0058] In this embodiment, S3 includes the following sub-steps:

[0059] S31, calculating the average value of the pixel values ​​of each pixel point in the first object mirror image to obtain a first average value;

[0060] S32, marking pixel points with pixel values ​​greater than a first average value in the first object mirror image as contour points;

[0061] S33, connecting adjacent contour points to obtain each closed area;

[0062] S34, calculating the average value of the pixel values ​​of each pixel point in the second object mirror image to obtain a second average value;

[0063] S35, marking each closed area on the second object mirror image as a suspected mirror area;

[0064] S36, calculating an average pixel value for each pixel point in the suspected mirror area to obtain a regional average value, discarding suspected mirror areas whose regional average values ​​are lower than the second average value, and obtaining a retained mirror area;

[0065] S37. Calculate the mirror area weight value according to the area and flatness of the retained mirror area, and use each mirror area weight value as an element to construct a mirror weight vector.

[0066] The present invention calculates the average value of each pixel value in the mirror image of the first object to obtain a first average value, screens out pixel points that are greater than the first average value, that is, screens out points with significant contours, and then connects adjacent contour points. Since the positions of the pixel points on the mirror image of the first object and the mirror image of the second object are the same, after obtaining the position of the closed area through the mirror image of the first object, the suspected mirror area is marked on the mirror image of the second object according to the position of the closed area, and the suspected mirror area with an average area lower than the second average area is discarded, which is equivalent to discarding the area with low brightness and color vividness, and the mirror area weight value is calculated by retaining the area and flatness of the mirror area.

[0067] In this embodiment, the flatness in S37 is the variance of the pixel values ​​of the pixels on the retained mirror area;

[0068] The formula for calculating the mirror area weight value in S37 is: , where γ j is the weight value of the j-th mirror area, E j is the area of ​​the jth retained mirror region, E tar is the target area, θ j is the flatness of the j-th preserved mirror area, where j is a positive integer.

[0069] In this embodiment, E tar The target area is a preset target value, and its specific size can be set based on experience or implementation.

[0070] When the retained mirror area is larger and the variance is smaller, the mirror area weight value is larger and the possibility that the area is a mirror is higher.

[0071] In this embodiment, if Figure 2 As shown, the item polishing evaluation network in S4 includes: image feature fusion layer, convolution layer, maximum pooling layer, average pooling layer, Concat layer and compensation layer;

[0072] The input of the image feature fusion layer is used as the input of the object polishing evaluation network;

[0073] The input end of the convolutional layer is connected to the output end of the image feature fusion layer, and its output end is connected to the input end of the maximum pooling layer and the input end of the average pooling layer respectively;

[0074] The input end of the Concat layer is connected to the output end of the maximum pooling layer and the output end of the average pooling layer respectively, and its output end is connected to the first input end of the compensation layer;

[0075] The second input end of the compensation layer is used to input the mirror weight vector, and the output end thereof is used to output the polishing degree value of the object.

[0076] In this embodiment, the expression of the image feature fusion layer is: , where Y is the fusion feature, for The convolutional layer of size IM1 is the mirror image of the first object, and IM2 is the mirror image of the second object. It is bitwise addition.

[0077] The present invention adopts The convolutional layers of different sizes process the mirror image of the first object and the mirror image of the second object respectively, so that the image size remains unchanged, extract features from each pixel value, and then add them bit by bit to achieve image feature fusion.

[0078] In this embodiment, Figure 2 The convolution kernel size of the middle convolution layer is set to 3*3 or 5*5. After the fused features are processed by the convolution layer, the significant features are extracted by the maximum pooling layer, the average features are extracted by the average pooling layer, and the significant features and the average features are concatenated by the Concat layer.

[0079] The expression of the compensation layer is: , , where y is the polishing degree of the item, x n is the nth eigenvalue output by the Concat layer, ω x,n For x n The weight of b x,n For x n The bias, ε is the compensation coefficient, tanh is the hyperbolic tangent function, γ j is the weight value of the j-th mirror area, ω γ,j For γ j The weight of b γ,j For γ j , n and j are positive integers, L is the number of eigenvalues ​​output by the Concat layer, and K is the number of mirror area weight values ​​in the mirror weight vector.

[0080] The output of the Concat layer is integrated in the compensation layer, and the compensation coefficient is calculated through the mirror weight vector. The compensation processing is performed through the compensation coefficient to improve the accuracy of calculating the polishing degree value of the object.

[0081] During the polishing process, the polished surface will form a mirror, which reflects light more strongly. Therefore, the present invention extracts the brightness value of each pixel in the image, calculates the local mirror contrast of each pixel, and reflects the contour of the light reflection area.

[0082] The present invention calculates the mirror brightness index according to the brightness value of each pixel to reflect the color condition of the pixel.

[0083] According to the contour provided by the mirror image of the first object and the color provided by the mirror image of the second object, the mirror area is segmented and the mirror weight vector is calculated. Then, the object polishing evaluation network is used to process the mirror image of the first object and the mirror image of the second object. Based on the compensation of the mirror weight vector, the evaluation accuracy of the object polishing degree value is improved.

[0084] The present invention comprehensively evaluates the polishing quality from two aspects, namely, the mirror imaging profile and the mirror imaging color, to avoid the influence of the fog surface on the evaluation accuracy.

[0085] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for processing machine vision images of intelligent grinding wheels, characterized in that: The following steps are involved: S1, collecting an image of the polished object, extracting the brightness value of each pixel in the image, calculating the local mirror contrast of each pixel, taking each local mirror contrast as the pixel value of the corresponding pixel, and constructing a first object mirror image, wherein the local mirror contrast is the ratio of the difference between the maximum brightness value and the minimum brightness value in the neighborhood of the pixel to the maximum brightness value; S2, calculating the color brightness coefficient of each pixel in the image, calculating the mirror brightness index of each pixel according to the brightness value of each pixel in the image and the color brightness coefficient of the corresponding pixel, taking each mirror brightness index as the pixel value of the corresponding pixel, and constructing the second object mirror image; The color brightness coefficient is calculated by first finding the ratio of each channel value of each pixel to the reference channel value, and then taking the average of the ratios of the three channels; , where S i is the specular brightness index of the i-th pixel, I i is the brightness value of the i-th pixel, e is a natural constant, C i is the color brightness coefficient of the i-th pixel, i is a positive integer; S3, marking contour points from the mirror image of the first object, connecting adjacent contour points to obtain each closed area, marking suspected mirror areas according to the positions of the closed areas on the mirror image of the second object, discarding suspected mirror areas whose average area value is lower than the average pixel value of the mirror image of the second object, obtaining retained mirror areas, calculating mirror area weight values, and constructing a mirror weight vector, , where γ j is the weight value of the j-th mirror area, E j is the area of ​​the jth retained mirror region, E tar is the target area, θ j is the flatness of the jth retained mirror area, j is a positive integer, and the flatness is the variance of the pixel values ​​of the pixels on the retained mirror area; S4. Use an object polishing evaluation network to process the mirror image of the first object and the mirror image of the second object, and obtain the object polishing degree value based on the compensation of the mirror weight vector.

2. The intelligent grinding wheel machine vision image processing method according to claim 1 is characterized in that: The formula for the brightness value in S1 is: i =0.299R i +0.587G i +0.114B i , where I i is the brightness value of the i-th pixel, R i is the R channel value of the i-th pixel, G i is the G channel value of the i-th pixel, B i is the B channel value of the i-th pixel, where i is a positive integer.

3. The intelligent grinding wheel machine vision image processing method according to claim 1 is characterized in that: The formula for calculating the local mirror contrast in S1 is: , where L i,c is the local mirror contrast of the i-th pixel, I i,min is the minimum brightness value in the neighborhood of the i-th pixel, I i,max is the maximum brightness value in the neighborhood of the i-th pixel, where i is a positive integer.

4. The intelligent grinding wheel machine vision image processing method according to claim 1 is characterized in that: The formula for calculating the color brightness coefficient in S21 is: , where C i is the color brightness coefficient of the i-th pixel, R i is the R channel value of the i-th pixel, G i is the G channel value of the i-th pixel, B i is the B channel value of the i-th pixel, i is a positive integer, R ref is the reference R channel value, G ref is the reference G channel value, B ref is the reference B channel value.

5. The intelligent grinding wheel machine vision image processing method according to claim 1 is characterized in that: The S3 comprises the following sub-steps: S31, calculating the average value of the pixel values ​​of each pixel point in the first object mirror image to obtain a first average value; S32, marking pixel points with pixel values ​​greater than a first average value in the first object mirror image as contour points; S33, connecting adjacent contour points to obtain each closed area; S34, calculating the average value of the pixel values ​​of each pixel point in the second object mirror image to obtain a second average value; S35, marking each closed area on the second object mirror image as a suspected mirror area; S36, calculating an average pixel value for each pixel point in the suspected mirror area to obtain a regional average value, discarding suspected mirror areas whose regional average values ​​are lower than the second average value, and obtaining a retained mirror area; S37. Calculate the mirror area weight value according to the area and flatness of the retained mirror area, and use each mirror area weight value as an element to construct a mirror weight vector.

6. The intelligent grinding wheel machine vision image processing method according to claim 1 is characterized in that: The object polishing evaluation network in S4 includes: an image feature fusion layer, a convolution layer, a maximum pooling layer, an average pooling layer, a Concat layer and a compensation layer; The input end of the image feature fusion layer is used as the input end of the object polishing evaluation network; The input end of the convolutional layer is connected to the output end of the image feature fusion layer, and the output end thereof is connected to the input end of the maximum pooling layer and the input end of the average pooling layer respectively; The input end of the Concat layer is connected to the output end of the maximum pooling layer and the output end of the average pooling layer respectively, and the output end thereof is connected to the first input end of the compensation layer; The second input end of the compensation layer is used to input a mirror weight vector, and the output end of the compensation layer is used to output a polishing degree value of the object.

7. The intelligent grinding wheel machine vision image processing method according to claim 6 is characterized in that: The expression of the image feature fusion layer is: , where Y is the fusion feature, for The convolutional layer of size IM1 is the mirror image of the first object, and IM2 is the mirror image of the second object. is bitwise addition; The expression of the compensation layer is: , , where y is the polishing degree of the item, x n is the nth eigenvalue output by the Concat layer, ω x,n For x n The weight of b x,n For x n The bias, ε is the compensation coefficient, tanh is the hyperbolic tangent function, γ j is the jth mirror area weight value, ω γ,j For γ j The weight of b γ,j For γ j , n and j are positive integers, L is the number of eigenvalues ​​output by the Concat layer, and K is the number of mirror area weight values ​​in the mirror weight vector.

Citation Information

Patent Citations

  • Image processor and image processing method, recording medium and program

    JP2007249568A

  • System and method for detection of specularity in an image

    US20110116710A1