A real-time grinding wheel wear state identification method, system, electronic device and storage medium
By real-time acquisition of grinding wheel images for preprocessing, edge detection, adaptive division and wear identification, the problems of insufficient real-time performance and high error detection rate of grinding wheel wear detection in the prior art are solved, and high precision and real-time identification of grinding wheel wear status is achieved.
Patent Information
- Application Number
- CN202510242850.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2045-03-03
AI Technical Summary
In the prior art, the grinding wheel wear detection method has problems such as insufficient real-time performance, high error detection rate, high equipment cost and inability to realize real-time monitoring.
A real-time grinding wheel wear state recognition method is adopted to obtain the grinding wheel images collected in real time for pre-processing, edge detection, adaptive division and wear recognition. The method includes denoising and lighting correction of the grinding wheel image, extracting the grinding wheel area image, adaptively dividing the image blocks, and inputting the divided image blocks into the trained wear recognition model for identification.
Real-time identification of the wear status of the grinding wheel is realized, the accuracy and real-timeness of wear recognition are improved, the data calculation volume is reduced, and the anti-interference ability is enhanced. It is especially suitable for rapid identification of grinding wheel processing scenarios.
Smart Images

Figure CN119741500A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent processing monitoring technology, and in particular to a real-time grinding wheel wear state recognition method, system, electronic equipment and storage medium. Background Art
[0002] Grinding wheels are the core tools of grinding processing, and their wear status directly affects the processing quality and efficiency. Traditional grinding wheel wear detection methods mainly include vibration signal analysis, acoustic emission detection and offline image analysis. The vibration signal analysis method judges the wear status by monitoring the vibration frequency and amplitude changes of the grinding wheel, but it is easily disturbed by the noise of the processing environment and has a high false detection rate. The acoustic emission detection method identifies wear by capturing the sound wave signal generated during the grinding process of the grinding wheel, but the equipment cost is high and the signal processing algorithm requirements are high. The offline image analysis method requires the surface of the grinding wheel to be photographed and analyzed after shutdown, which cannot achieve real-time monitoring and has low detection efficiency.
[0003] In recent years, the grinding wheel wear detection method based on machine vision has gradually attracted attention. However, this type of method in the prior art is to identify the entire grinding wheel image based on a deep learning model. Due to the huge size of the image, it takes a lot of time, resulting in a long feedback time and insufficient real-time performance. Summary of the invention
[0004] In view of the above problems, the present invention aims to provide a real-time grinding wheel wear status identification method, system, electronic device and storage medium.
[0005] The purpose of the present invention is achieved by the following technical solutions: In a first aspect, the present invention provides a real-time grinding wheel wear state identification method, comprising the following steps: S1 obtains the real-time collected grinding wheel image; S2 preprocesses the acquired grinding wheel image, including denoising and lighting correction of the grinding wheel image, to obtain a preprocessed grinding wheel image; S3 performs edge detection processing on the preprocessed grinding wheel image, obtains edge information of the grinding wheel image to perform foreground target recognition, and extracts the grinding wheel area image; S4 performs adaptive division processing according to the acquired grinding wheel area image, including: initially dividing the grinding wheel area image into a number of image blocks, calculating the division characteristic factor of the image block according to the texture feature information in the image block for each obtained image block, and judging whether the image block needs to be further divided according to the obtained division characteristic factor, wherein when the division characteristic factor is greater than the set standard value, the image block is further divided into a number of sub-image blocks; otherwise, when the division characteristic factor is less than or equal to the set standard value, the image block is no longer divided; for the obtained sub-image blocks, further calculating the division characteristic factor of the sub-image blocks, and judging whether further division is needed according to the division characteristic factor, until all the sub-image blocks are divided into a state that cannot be further divided, wherein the state that cannot be further divided includes that the division characteristic factor is less than or equal to the set standard value, or the size of the sub-image block is less than the minimum division size; S5, according to each image block obtained after the division, the image block is input into the trained wear recognition model respectively, and the wear recognition model performs grinding wheel wear recognition according to the image block to obtain the grinding wheel wear recognition result; S6 integrates the grinding wheel wear recognition results corresponding to each image block to obtain an integrated grinding wheel wear state recognition result.
[0006] Preferably, the method further comprises: S7 issues a corresponding alarm message when the identification result of the grinding wheel wear status is abnormal.
[0007] Preferably, step S1 specifically includes: Receive the grinding wheel image acquired in real time by a high-speed industrial camera.
[0008] Preferably, step S2 specifically includes: Noise point detection is performed according to the acquired grinding wheel image, and noise elimination processing is performed on the detected noise points; Brightness correction processing is performed on the grinding wheel image after noise elimination to obtain a preprocessed grinding wheel image.
[0009] Preferably, step S3 specifically includes: Edge detection is performed on the preprocessed grinding wheel image, in which the Canny operator is used to detect edge pixels in the image, and a morphological closing operation is performed based on the detected edge pixels to extract the circumscribed edge of the grinding wheel in the image, and then the grinding wheel area image is extracted based on the area enclosed by the circumscribed edge.
[0010] Preferably, see Figure 2 , step S4 specifically includes: S41 resets the current number of divisions i=1 , perform initial region division on the grinding wheel region image, and divide the initial region image into N×Nuniform image blocks; S42 calculates the partition characteristic factor of each image block according to each image block obtained, wherein the partition characteristic factor calculation function used is: ; In the formula, Q(i,j) Indicates i After the first division, the j The partitioning characteristic factor of the image block is I i,j Indicates i After the first division, the j image blocks; CX(I i,j ) Represents an image block I i,j The grayscale eigenvalue of ;in (x,y) Indicates that it belongs to an image block I i,j Pixels, h(x,y) Represents pixel (x,y) The gray value of h(I i,j ) Represents an image block I i,j The average gray value of max(CX(I i )) Indicates i The maximum value of the grayscale feature value of each image block obtained after the division; GR(I i,j ) Represents an image block I i,j The gradient eigenvalue of ,in (x,y) Indicates that it belongs to an image block I i,j Pixels, Sobel(x,y ) represents pixel (x,y) By sobel The gray gradient value obtained by the operator; mean(GR(I i )) Indicates i The average value of the gradient feature values of each image block after the second division; EG(I i,j ) Represents an image block I i,j The entropy eigenvalue of , p(z) According to the image block I i,jThe pixel level in the grayscale distribution histogram z The probability of occurrence; H(i,j) Represents an image block I i,j The heat characteristic factor of , R(x,y) Represents pixel (x,y) The pixel distance to the center of the grinding wheel area, RO Represents the diameter pixel distance of the grinding wheel area; Represents pixel (x,y) Wear heat value at the location; ω c Represents the set grayscale feature weight, ω G Represents the set gradient feature weight, ω H Indicates the set heat feature weight; S43 divides each image block into characteristic factors Q(i,j) and preset standard values QT For comparison, when the partition characteristic factor is greater than the preset standard value, Q(i,j)>QT , then mark the image block for the next round of division; otherwise, when the division feature factor is less than or equal to the preset standard value, Q(i,j)≤QT , marking the end of the image block division; S44 updates the current number of divisions i = i + 1 , and perform region division on each image block marked for the next round of division, and further divide each image block into M×M and repeating steps S42 and S43 until there is no image block marked as needing the next round of division, or the size of the image block currently marked as needing the next round of division is smaller than the preset minimum division size, thus terminating the adaptive division processing of the grinding wheel area image.
[0011] Preferably, step S5 specifically includes: The image blocks obtained after the adaptive segmentation process are input into the trained wear recognition model respectively, and the wear recognition model recognizes the wear of the grinding wheel according to the image blocks; The wear identification model is based on CNN The neural network is built, in which the CNN The neural network structure includes the input layer, the first convolution layer, the first maximum pooling layer, the second convolution layer, the attention module, the third convolution layer, the fusion layer, the adaptive average pooling layer, the full convolution classifier, the upsampling layer and the output layer; The input layer is used to input image blocks and can adapt to image blocks of different sizes. The first convolutional layer captures the coarse-grained texture of the input image blocks. The first convolutional layer contains 64 5×5The convolution kernel has a step size of 1 and the activation function used is ReLU ; The first maximum pooling layer performs a maximum pooling operation on the feature map output by the first convolutional layer, where the pooling window size used is 2×2 , with a step size of 2; the second convolutional layer further refines the feature map output by the first maximum pooling layer, where the second convolutional layer contains 128 3×3 The convolution kernel has a step size of 1 and the activation function used is ReLU ; An attention module is set after the second convolutional layer to improve the response of the key area; the third convolutional layer further extracts contextual features from the feature map after the attention module, and the third convolutional layer contains 256 3×3 The convolution kernel has a step size of 1 and the activation function used is ReLU The fusion layer is used to add the feature maps output by the second convolutional layer and the third convolutional layer, and unify the size of the fused feature maps through the adaptive average pooling layer, fixing the output size to 4×4 ; Use the full convolution classifier to classify each 4×4 The wear probability is obtained by performing wear identification in the region, where the full convolution classifier contains 1 1×1 The convolution kernel has a step size of 1 and the activation function used is Sigmoid ; The upsampling layer performs bilinear interpolation upsampling to 1 / 2 of the original image size; the output layer obtains the corresponding grinding wheel wear recognition result based on the upsampled feature map combined with the probability threshold.
[0012] Preferably, step S6 specifically includes: The grinding wheel wear recognition results obtained from each image block are integrated to obtain the overall grinding wheel wear recognition result of the entire grinding wheel area, wherein the overall grinding wheel wear recognition result includes the specific area where wear occurs in the grinding wheel, and whether wear occurs in a specific area.
[0013] In a second aspect, the present invention proposes a real-time grinding wheel wear state recognition system, including an acquisition module, a preprocessing module, an extraction module, a division module, a recognition module and an output module, wherein: The acquisition module is used to acquire the grinding wheel image collected in real time; The preprocessing module is used to preprocess the acquired grinding wheel image, including denoising and lighting correction of the grinding wheel image, to obtain a preprocessed grinding wheel image; The extraction module is used to perform edge detection processing based on the preprocessed grinding wheel image, obtain edge information of the grinding wheel image to perform foreground target recognition, and extract the grinding wheel area image; The division module is used to perform adaptive division processing according to the acquired grinding wheel area image, including: initially dividing the grinding wheel area image into a number of image blocks, for each obtained image block, calculating the division characteristic factor of the image block according to the texture feature information in the image block, and judging whether the image block needs to be further divided according to the obtained division characteristic factor, wherein when the division characteristic factor is greater than a set standard value, the image block is further divided into a number of sub-image blocks; otherwise, when the division characteristic factor is less than or equal to the set standard value, the image block is no longer divided; for the obtained sub-image blocks, further calculating the division characteristic factor of the sub-image blocks, and judging whether further division is needed according to the division characteristic factor, until all the sub-image blocks are divided into a state that cannot be divided any further, wherein the state that cannot be divided any further includes that the division characteristic factor is less than or equal to the set standard value, or the size of the sub-image block is less than the minimum division size; The recognition module is used to input the image blocks obtained after the division into the trained wear recognition model respectively, and the wear recognition model performs grinding wheel wear recognition according to the image blocks to obtain the grinding wheel wear recognition result; The output module is used to integrate the grinding wheel wear recognition results corresponding to each image block to obtain an integrated grinding wheel wear state recognition result.
[0014] In a third aspect, the present invention proposes an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the real-time grinding wheel wear status identification method as described in any embodiment of the first aspect above are implemented.
[0015] In a fourth aspect, the present invention proposes a storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the real-time grinding wheel wear status identification method as described in any embodiment of the first aspect above are implemented.
[0016] The beneficial effects of the present invention are as follows: the real-time grinding wheel wear state recognition method, system, electronic device and medium proposed in the present invention, after edge detection based on the acquired grinding wheel image to obtain the grinding wheel area, adaptively divides the grinding wheel area in combination with the characteristics of the grinding wheel area, and performs wear recognition analysis based on the image blocks of different sizes based on the division, which can improve the accuracy of wear recognition based on the idea of dividing the image blocks while minimizing the amount of data calculation, thereby improving the real-time recognition of the grinding wheel wear state. It is helpful to improve the accuracy and real-time level of rapid recognition of abnormal wear state of the grinding wheel in the grinding wheel processing scenario.
[0017] Compared with the traditional method of directly inputting the entire grinding wheel image into the recognition model for wear recognition, the method of wear recognition based on sub-image blocks after the image division method of the present invention has stronger anti-interference ability, especially accurate recognition of local fine wear in small areas, and at the same time, a parallel recognition model matrix can be established by separating quickly, which improves the analysis computing power while reducing the time required for wear recognition, improves the real-time level of grinding wheel wear recognition, and improves the effect of real-time status analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The present invention is further described using the accompanying drawings, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention. A person skilled in the art can obtain other drawings based on the following drawings without creative work.
[0019] Figure 1 A method flow chart of a real-time grinding wheel wear state identification method shown in an embodiment of the present invention; Figure 2 for Figure 1 Specific flow diagram of step S4 in the embodiment; Figure 3 This is a framework diagram of a real-time grinding wheel wear status identification system shown in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention is further described in conjunction with the following application scenarios.
[0021] See also Figure 1 The embodiment shows a real-time grinding wheel wear state identification method, comprising the following steps: S1 obtains the real-time collected grinding wheel image; S2 preprocesses the acquired grinding wheel image, including denoising and lighting correction of the grinding wheel image, to obtain a preprocessed grinding wheel image; S3 performs edge detection processing on the preprocessed grinding wheel image, obtains edge information of the grinding wheel image to perform foreground target recognition, and extracts the grinding wheel area image; S4 performs adaptive division processing according to the acquired grinding wheel area image, including: initially dividing the grinding wheel area image into a number of image blocks, calculating the division characteristic factor of the image block according to the texture feature information in the image block for each obtained image block, and judging whether the image block needs to be further divided according to the obtained division characteristic factor, wherein when the division characteristic factor is greater than the set standard value, the image block is further divided into a number of sub-image blocks; otherwise, when the division characteristic factor is less than or equal to the set standard value, the image block is no longer divided; for the obtained sub-image blocks, further calculating the division characteristic factor of the sub-image blocks, and judging whether further division is needed according to the division characteristic factor, until all the sub-image blocks are divided into a state that cannot be further divided, wherein the state that cannot be further divided includes that the division characteristic factor is less than or equal to the set standard value, or the size of the sub-image block is less than the minimum division size; S5, according to each image block obtained after the division, the image block is input into the trained wear recognition model respectively, and the wear recognition model performs grinding wheel wear recognition according to the image block to obtain the grinding wheel wear recognition result; S6 integrates the grinding wheel wear recognition results corresponding to each image block to obtain an integrated grinding wheel wear state recognition result.
[0022] The above-mentioned embodiment of the present invention proposes a real-time grinding wheel wear state recognition method. After edge detection is performed on the acquired grinding wheel image to obtain the grinding wheel area, adaptive division processing is performed in combination with the characteristics of the grinding wheel area, and wear recognition analysis based on the deep learning model is performed based on the image blocks of different sizes. It can improve the accuracy of wear recognition based on the idea of dividing image blocks while minimizing the amount of data calculation, thereby improving the real-time recognition of the grinding wheel wear state. It is helpful to improve the accuracy and real-time level of rapid recognition of abnormal wear state of the grinding wheel in the grinding wheel processing scenario.
[0023] Compared with the traditional method of directly inputting the entire grinding wheel image into the recognition model without dividing it into blocks for wear recognition, the method of wear recognition based on sub-image blocks based on the image division method of the present invention has stronger anti-interference ability, especially accurate recognition of local fine wear in small areas, and at the same time, a parallel recognition model matrix can be established by separating quickly, which improves the analysis computing power while reducing the time required for wear recognition, improves the real-time level of grinding wheel wear recognition, and improves the effect of real-time status analysis.
[0024] In one scenario, the types of grinding wheel wear shown in the present invention include abrasive wear, mechanical wear, adhesive wear, etc.
[0025] Among them, the above method of the present invention can be executed based on a server or an on-site processing terminal to complete the real-time grinding wheel wear status identification work and meet different processing scenarios or processing requirements.
[0026] Preferably, the method further comprises: S7 issues a corresponding alarm message when the identification result of the grinding wheel wear status is abnormal.
[0027] Combined with the identification results of the grinding wheel wear status, when the grinding wheel is identified to be worn or in an abnormal state, a corresponding alarm prompt message will be issued, which can help managers deal with the wear of the grinding wheel in a timely manner.
[0028] Preferably, step S1 specifically includes: Receive the grinding wheel image acquired in real time by a high-speed industrial camera.
[0029] In one scenario, the high-speed industrial camera used is a Basler acA2000-165um industrial camera with a resolution of 2048×1088 and a frame rate of 165 fps, where the lens of the industrial camera is facing the target grinding wheel. The industrial camera is triggered by a synchronous encoder, and a frame of the grinding wheel image can be captured every time the grinding wheel rotates a specific angle during the start-up process of the grinding wheel, thereby realizing real-time monitoring of the grinding wheel.
[0030] In one scenario, the grinding wheel on the targeted CNC equipment is a diamond grinding wheel or the like.
[0031] Preferably, step S2 specifically includes: Noise point detection is performed according to the acquired grinding wheel image, and noise elimination processing is performed on the detected noise points; Brightness correction processing is performed on the grinding wheel image after noise elimination to obtain a preprocessed grinding wheel image.
[0032] For the acquired grinding wheel image, preprocessing is first performed to improve the quality and clarity of the grinding wheel image, laying the foundation for further wear identification based on the grinding wheel image.
[0033] Taking into account that in the operation scenario of grinding wheel processing, the grinding wheel is easily affected by factors such as sparks generated by on-site processing or reflections of splashed coolant, which may cause exposure points to occur in the acquired grinding wheel image, interfering with the real feature information of the image and causing deviations in the subsequent image segmentation or wear identification process. Therefore, after acquiring the grinding wheel image, the present invention also performs targeted brightness correction processing on the grinding wheel image to improve the clarity and quality of the grinding wheel image.
[0034] Preferably, in step S2, brightness correction processing is performed according to the grinding wheel image after noise elimination, specifically including: The grinding wheel image from RGB Color space conversion to Lab Color space, respectively extract the brightness channel value of each pixel in the grinding wheel image L(x,y) , a Chroma channel value a(x,y) and b chroma channel value b(x,y) ; Abnormal illumination points are detected for the grinding wheel image, and the abnormal illumination factor calculation function used is: ; In the formula, ablp(x,y) Represents pixel (x,y) The abnormal light factor of the location, a(x,y) Represents pixel (x,y) Positional a Chroma channel values, μ a (x,y) Indicated in pixels (x,y) Location-centric 9×9 Each pixel in the range a The average of the chroma channel values, b(x,y) Represents pixel (x,y) Positional b Chroma channel values, G L (x,y) express (x,y) The brightness gradient field characteristics of the position, where ,in L(x,y) Represents pixel (x,y) The brightness channel value of the position, ⨂ represents the convolution operation, K X represents the horizontal convolution operator, where , K Y represents the vertical convolution operator, where , σ L (x,y) Indicated in pixels (x,y) Location-centric 9×9 The standard deviation of the brightness channel value of each pixel within the range; ka Indicates the preset color sensitivity factor, ka∈[2, 3] ; kb Indicates the setting b Chroma channel suppression factor, where kb∈[0.7, 1] , kc represents the nonlinear amplification exponent, where kc∈[1.1, 1.3] , kd Represents the set gradient weight factor, where kd∈[1, 2] ; ke Represents the set local brightness difference adjustment factor, whereke∈[0.01, 0.05] ; BE represents the information entropy of the brightness channel of the image, where , p(v) Indicates that the brightness channel value in the image is v probability; According to the abnormal illumination factor of each pixel, the abnormal illumination factor is greater than the set abnormal threshold. abT The pixel point and its eight neighboring pixels are marked as abnormal illumination pixels. Sab , other pixels are marked as general pixels Sno ; For abnormal lighting pixels (x,y)∈Sab , for pixels (x,y) Adaptive brightness suppression adjustment is performed, wherein the brightness suppression adjustment function used is: ; In the formula, L'(x,y) Indicates the pixel after brightness suppression adjustment (x,y) The brightness channel value of the position, L(x,y) Represents pixel (x,y) The raw brightness channel value of the position; ablp(x,y) Represents pixel (x,y) The abnormal light factor of the location, Kab Indicates the set abnormal light suppression value, where Kab∈[4×abT, 5×abT] , kf represents the inhibitory regulation index, where kf∈[0.7, 0.9] ; Chroma compensation is performed on abnormal illumination pixels, and the chroma compensation function used is: ; ; In the formula, a'(x,y) Indicates the pixel after chroma compensation (x,y) Positional a Chroma channel values, b'(x,y) Indicates the pixel after chroma compensation (x,y) Positional b Chroma channel values, a(x,y) Represents pixel (x,y) Original location a Chroma channel values, b(x,y) Represents pixel (x,y) Original location b Chroma channel values; For general pixels (x,y)∈Sno , for pixels (x,y) Adaptive brightness enhancement adjustment is performed, wherein the brightness enhancement adjustment function used is: ; In the formula, L'(x,y) Indicates the pixel after brightness enhancement adjustment (x,y) The brightness channel value of the position, L(x,y) Represents pixel (x,y) The raw brightness channel value of the position; Lw represents the set enhancement factor, where Lw∈[8, 12] ; BE represents the information entropy of the brightness channel of the image, where , p(v) Indicates that the brightness channel value in the image is v probability; erf(*) represents the error function, where ; μ L (Sno) Represents the average brightness channel value of all general pixels in the image. σ L (Sno) Represents the standard deviation of the brightness channel values of all general pixels in the image; According to the currently updated brightness channel value of each pixel L'(x,y) , a Chroma channel value a'(x,y) and b The chroma channel value b'(x,y) is reconverted to RGB Color space, and obtain the preprocessed grinding wheel image.
[0035] In one scenario, set the color sensitivity factor ka = 1.5 , b Chroma channel suppression factor kb = 0.8 , nonlinear amplification index kc = 1.2 , gradient weight factor kd = 1.5 , local brightness difference adjustment factor ke = 0.03 , abnormal threshold abT = 0.35 , abnormal light suppression value Kab = 1.8 , inhibitory regulation index kf = 0.7 ; Enhancement coefficient Lw = 10 .
[0036] In the above embodiment of the present invention, a technical solution for adaptive brightness correction specifically for grinding wheel images is proposed, in which the grinding wheel image is first converted from RGB color space to Lab color space, and the pixel points are extracted. L、 a, bChannel value, based on the extracted three-channel values, combined with the characteristics of abnormal illumination points, an abnormal illumination factor calculation function is proposed that can detect abnormal illumination points of sparks and droplets. By combining the three-channel characteristics of the pixel points, the brightness gradient characteristics and the brightness entropy characteristics, the abnormal illumination points in the image can be accurately distinguished from the general illumination areas, and the abnormal illumination points can be accurately identified, which improves the accuracy and robustness of abnormal illumination point detection. Based on the detected abnormal illumination points, the surrounding areas are used as the abnormal illumination affected areas. A brightness suppression adjustment function is proposed to adaptively suppress the brightness of the pixel area affected by abnormal illumination to reduce the mutation degree of the abnormal illumination points. At the same time, chromaticity compensation is adaptively performed for the chromaticity channel, which helps to avoid the hue distortion caused by the abnormal illumination points after eliminating the brightness influence, and retains the image details to the greatest extent. For general pixel areas, an adaptive brightness enhancement adjustment function is proposed to comprehensively improve the overall brightness level of the image, which helps to improve the contrast of key detail features in the grinding wheel image and lays the foundation for further grinding wheel area sub-image division and abnormal wear identification.
[0037] Preferably, step S3 specifically includes: Edge detection is performed on the preprocessed grinding wheel image, in which the Canny operator is used to detect edge pixels in the image, and a morphological closing operation is performed based on the detected edge pixels to extract the circumscribed edge of the grinding wheel in the image, and then the grinding wheel area image is extracted based on the area enclosed by the circumscribed edge.
[0038] In order to reduce interference information and complete targeted recognition work, edge detection is first performed based on the acquired grinding wheel image to extract the foreground area in the grinding wheel image to mark and segment the grinding wheel area, so that further wear recognition processing can be performed based on the extracted grinding wheel area image.
[0039] Preferably, see Figure 2 , step S4 specifically includes: S41 resets the current number of divisions i=1 , perform initial region division on the grinding wheel region image, and divide the initial region image into N×N uniform image blocks; S42 calculates the partition characteristic factor of each image block according to each image block obtained, wherein the partition characteristic factor calculation function used is: ; In the formula, Q(i,j) Indicates i After the first division, the j The partitioning characteristic factor of the image block is I i,j Indicatesi After the first division, the j image blocks; CX(I i,j ) Represents an image block I i,j The grayscale eigenvalue of ;in (x,y) Indicates that it belongs to an image block I i,j Pixels, h(x, y) Represents pixel (x,y) The gray value of h(I i,j ) Represents an image block I i,j The average gray value of max(CX(I i )) Indicates i The maximum value of the grayscale feature value of each image block obtained after the division; GR(I i,j ) Represents an image block I i,j The gradient eigenvalue of ,in (x,y) Indicates that it belongs to an image block I i,j Pixels, Sobel (x,y ) represents pixel (x,y) By sobel The gray gradient value obtained by the operator; mean(GR(I i )) Indicates i The average value of the gradient feature values of each image block after the second division; EG(I i,j ) Represents an image block I i,j The entropy eigenvalue of , p(z) According to the image block I i,j The pixel level in the grayscale distribution histogram z The probability of occurrence; H(i,j) Represents an image block I i,j The heat characteristic factor of , R(x,y) Represents pixel (x,y) The pixel distance to the center of the grinding wheel area, RO Represents the diameter pixel distance of the grinding wheel area; Represents pixel (x,y) Wear heat value at the location; ω c Represents the set grayscale feature weight, ω G Represents the set gradient feature weight, ω H Indicates the set heat feature weight; S43 divides each image block into characteristic factors Q(i,j) and preset standard values QT For comparison, when the partition characteristic factor is greater than the preset standard value, Q(i,j)>QT , then mark the image block for the next round of division; otherwise, when the division feature factor is less than or equal to the preset standard value, Q(i,j)≤QT , marking the end of the image block division; S44 updates the current number of divisions i = i + 1 , and perform region division on each image block marked for the next round of division, and further divide each image block into M×M and repeating steps S42 and S43 until there is no image block marked as needing the next round of division, or the size of the image block currently marked as needing the next round of division is smaller than the preset minimum division size, thus terminating the adaptive division processing of the grinding wheel area image.
[0040] In one scenario, set the preset standard value QT = 0.65 , initial region image partition parameters N=2 , image block partitioning parameters M=2 , the preset minimum partition size is 40×40 .
[0041] The above-mentioned embodiment of the present invention proposes a technical solution for adaptively dividing the acquired grinding wheel area image, wherein after the initial division is completed, the division characteristic factors of the sub-areas are calculated for each sub-area obtained by the division, wherein a division characteristic factor calculation function is proposed, which can evaluate the number of key information that may appear in the sub-image block according to the texture feature information of the pixel points in the sub-image block and the designed heat characteristic factor, wherein the wear characteristics that may appear in the sub-image block can be objectively fed back through the texture features (including grayscale features and gradient features), and when the possibility of the wear characteristics increases, it will also be fed back to the increase of the division characteristic factor, thereby further dividing the sub-image block again to refine the sub-image block. Based on the designed heat characteristic factor, the area range of the grinding wheel that is prone to wear can be reflected based on the use and wear characteristics of the grinding wheel in the actual processing scene based on the historical data, and the area prone to wear can be quantified by heat, which is helpful for further dividing the area prone to wear, thereby achieving more refined wear recognition and improving the effect of wear recognition. Based on the proposed division feature factor, it is controlled whether the sub-image is further divided. When further division is required, the division steps are repeated to obtain further sub-image blocks, and the division feature factor is further calculated based on the sub-image block, and finally the division of all sub-image blocks is completed adaptively. For sub-image blocks with smaller division feature factors, it indicates that the probability of the sub-image block containing wear features is low. Therefore, in order to ensure the overall operation speed, the sub-image block is no longer divided (the sub-image block that is no longer divided is directly input into the recognition model for recognition). Through the adaptive sub-image block division method, the operation speed can be maximized while ensuring the wear recognition accuracy, and the requirements of accuracy and real-time performance can be met at the same time.
[0042] Preferably, the wear heat value YP Ways to obtain include: Acquire multiple worn grinding wheel images of grinding wheels that have the same conditions as the current grinding wheel to be identified and have been detected to be worn as a wear history set, and mark the worn area based on the worn grinding wheel images K , and according to the wear area K Count the pixels in each wear area (a,b) The ratio of the pixel distance to the center of the grinding wheel area to the diameter pixel distance of the grinding wheel area As the normalized polar coordinate distance, mark the wear statistical factor of the current worn grinding wheel image corresponding to the normalized polar coordinate distance , the wear statistical factor corresponding to the normalized polar coordinate distance of other wear areas without corresponding wear areas ; After the wear statistical factors of each worn grinding wheel image are calculated, the normalized polar coordinate distance corresponding to the current gear is obtained. The wear heat value is ,in Indicates n The corresponding normalized polar coordinate distance in the worn grinding wheel image is The wear statistical factor, NV Represents the number of worn wheel images in the wear history collection.
[0043] The above-mentioned identical conditions include but are not limited to at least one of the following: the same size, the same material, the same processing environment, the same processing object, the same processing technology, the same processing equipment, etc. The more identical conditions there are, the higher the accuracy.
[0044] Based on the thermal characteristic factor proposed in the present invention, the key characteristic wear thermal value is obtained by feature extraction and statistics based on historical data. By statistically analyzing the distribution of wear areas of the grinding wheel under the same conditions, the wear area distribution is statistically converted into thermal information, thereby characterizing the area where the grinding wheel is prone to wear. This helps to use it as a reference factor to influence the effect of grinding wheel image division, thereby performing more detailed identification of areas prone to wear and improving the accuracy of grinding wheel wear identification.
[0045] By combining the real grinding wheel wear information to extract the wear heat values of different positions of the grinding wheel, it is possible to adapt to different processing habits, processing objects, etc. to carry out targeted and refined division of key areas, thereby improving the accuracy of adaptively divided sub-images and subsequent grinding wheel wear identification based on divided sub-images.
[0046] In one scenario, in an actual processing scenario, especially for CNC machine tools or robot arm control processing methods, since the set processing program and processing parameters are fixed, the workpiece will always be processed in a certain area of the grinding wheel (for example, 30%-70% of the radius area), and other areas will not contact the workpiece. Therefore, this part of the processing area is often prone to wear (in fact, the probability of wear in this part of the grinding wheel that has been replaced due to wear is also the highest). Therefore, through the statistics of historical wear grinding wheels, it can be obtained that the wear probability of this part of the processing area is the highest. Through the calculation of the wear heat value proposed above, the wear heat value of this part of the processing area is made higher. When performing adaptive sub-image block division, this part of the area prone to wear will be divided more finely than the general area, so that the wear recognition processing of the finer sub-image blocks is performed, thereby improving the accuracy of grinding wheel wear recognition.
[0047] Preferably, step S5 specifically includes: The image blocks obtained after the adaptive segmentation process are input into the trained wear recognition model respectively, and the wear recognition model recognizes the wear of the grinding wheel according to the image blocks; The wear identification model is based on CNN The neural network is built, in which the CNN The neural network structure includes the input layer, the first convolution layer, the first maximum pooling layer, the second convolution layer, the attention module, the third convolution layer, the fusion layer, the adaptive average pooling layer, the full convolution classifier, the upsampling layer and the output layer; The input layer is used to input image blocks and can adapt to image blocks of different sizes. The first convolutional layer captures the coarse-grained texture of the input image blocks. The first convolutional layer contains 64 5×5 The convolution kernel has a step size of 1 and the activation function used is ReLU ; The first maximum pooling layer performs a maximum pooling operation on the feature map output by the first convolutional layer, where the pooling window size used is 2×2 , with a step size of 2; the second convolutional layer further refines the feature map output by the first maximum pooling layer, where the second convolutional layer contains 128 3×3 The convolution kernel has a step size of 1 and the activation function used is ReLU ; An attention module is set after the second convolutional layer to improve the response of the key area; the third convolutional layer further extracts contextual features from the feature map after the attention module, and the third convolutional layer contains 256 3×3 The convolution kernel has a step size of 1 and the activation function used is ReLU The fusion layer is used to add the feature maps output by the second convolutional layer and the third convolutional layer, and unify the size of the fused feature maps through the adaptive average pooling layer, fixing the output size to 4×4 ; Use the full convolution classifier to classify each 4×4 The wear probability is obtained by performing wear identification in the region, where the full convolution classifier contains 1 1×1 The convolution kernel has a step size of 1 and the activation function used is Sigmoid ; The upsampling layer performs bilinear interpolation upsampling to 1 / 2 of the original image size; the output layer obtains the corresponding grinding wheel wear recognition result based on the upsampled feature map combined with the probability threshold.
[0048] In one scenario, the grinding wheel wear identification result includes an identified area where wear occurs.
[0049] The above-mentioned embodiment of the present invention performs grinding wheel wear recognition on the sub-image blocks obtained by adaptive division, wherein a wear recognition model based on the CNN neural network structure is proposed. Through the design of the convolution layer, the feature information in the image can be accurately extracted. With the setting of the attention module, the model can be made more sensitive to the fine wear features that appear locally. Combined with the design of the adaptive average pooling layer, the dimension of the features can be finally unified to meet the requirements of different input image sizes. Finally, the traditional fully connected layer is replaced by a full convolution classifier to associate the output one-dimensional features with the recognition results, thereby obtaining a specific wear recognition result.
[0050] Among them, the training of the wear recognition model is completed using the constructed training set and test set, wherein the model training method can adopt the conventional model training method in the prior art, and the present invention does not make specific limitations here.
[0051] Preferably, step S6 specifically includes: The grinding wheel wear recognition results obtained from each image block are integrated to obtain the overall grinding wheel wear recognition result of the entire grinding wheel area, wherein the overall grinding wheel wear recognition result includes the specific area where wear occurs in the grinding wheel, and whether wear occurs in a specific area.
[0052] The grinding wheel wear recognition results of each image block are integrated and aligned to the original grinding wheel area, which can provide feedback on the overall wear recognition results of the grinding wheel and intuitively display the grinding wheel wear area and whether wear occurs.
[0053] See also Figure 3 , which shows a real-time grinding wheel wear state recognition system, characterized in that it includes an acquisition module, a preprocessing module, an extraction module, a division module, a recognition module and an output module, wherein, The acquisition module is used to acquire the grinding wheel image collected in real time; The preprocessing module is used to preprocess the acquired grinding wheel image, including denoising and lighting correction of the grinding wheel image, to obtain a preprocessed grinding wheel image; The extraction module is used to perform edge detection processing based on the preprocessed grinding wheel image, obtain edge information of the grinding wheel image to perform foreground target recognition, and extract the grinding wheel area image; The division module is used to perform adaptive division processing according to the acquired grinding wheel area image, including: initially dividing the grinding wheel area image into a number of image blocks, for each obtained image block, calculating the division characteristic factor of the image block according to the texture feature information in the image block, and judging whether the image block needs to be further divided according to the obtained division characteristic factor, wherein when the division characteristic factor is greater than a set standard value, the image block is further divided into a number of sub-image blocks; otherwise, when the division characteristic factor is less than or equal to the set standard value, the image block is no longer divided; for the obtained sub-image blocks, further calculating the division characteristic factor of the sub-image blocks, and judging whether further division is needed according to the division characteristic factor, until all the sub-image blocks are divided into a state that cannot be divided any further, wherein the state that cannot be divided any further includes that the division characteristic factor is less than or equal to the set standard value, or the size of the sub-image block is less than the minimum division size; The recognition module is used to input the image blocks obtained after the division into the trained wear recognition model respectively, and the wear recognition model performs grinding wheel wear recognition according to the image blocks to obtain the grinding wheel wear recognition result; The output module is used to integrate the grinding wheel wear recognition results corresponding to each image block to obtain an integrated grinding wheel wear state recognition result.
[0054] Preferably, the system also includes an alarm module; wherein, The alarm module is used to send out corresponding alarm messages when the identification result of the grinding wheel wear status is abnormal.
[0055] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned Figure 1 And the steps of the real-time grinding wheel wear status identification method shown in the corresponding embodiment.
[0056] The present invention further provides a storage medium, characterized in that the storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by a processor, the above-mentioned Figure 1 And the steps of the real-time grinding wheel wear status identification method shown in the corresponding embodiment.
[0057] It should be noted that each functional unit / module in each embodiment of the present invention may be integrated into one processing unit / module, or each unit / module may exist physically separately, or two or more units / modules may be integrated into one unit / module. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of software functional unit / module.
[0058] Through the description of the above implementation modes, it can be clearly understood by those skilled in the art that the embodiments described herein can be implemented in hardware, software, firmware, middleware, code or any appropriate combination thereof. For hardware implementation, the processor can be implemented in one or more of the following units: an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a processor, a controller, a microcontroller, a microprocessor, other electronic units designed to implement the functions described herein or a combination thereof. For software implementation, part or all of the processes of the embodiment can be completed by instructing the relevant hardware through a computer program. When implemented, the above program can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any medium that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a computer. Computer-readable media can include, but are not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.
[0059] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention, rather than to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should analyze that the technical solution of the present invention can be modified or replaced by equivalents without departing from the essence and scope of the technical solution of the present invention.
Claims
1. A real-time grinding wheel wear state identification method, characterized in that: The steps include: S1 obtains the real-time collected grinding wheel image; S2 preprocesses the acquired grinding wheel image, including denoising and lighting correction of the grinding wheel image, to obtain a preprocessed grinding wheel image; S3 performs edge detection processing on the preprocessed grinding wheel image, obtains edge information of the grinding wheel image to perform foreground target recognition, and extracts the grinding wheel area image; S4 performs adaptive division processing according to the acquired grinding wheel area image, including: initially dividing the grinding wheel area image into a number of image blocks, calculating the division characteristic factor of the image block according to the texture feature information in the image block for each obtained image block, and judging whether the image block needs to be further divided according to the obtained division characteristic factor, wherein when the division characteristic factor is greater than the set standard value, the image block is further divided into a number of sub-image blocks; otherwise, when the division characteristic factor is less than or equal to the set standard value, the image block is no longer divided; for the obtained sub-image blocks, further calculating the division characteristic factor of the sub-image blocks, and judging whether further division is needed according to the division characteristic factor, until all the sub-image blocks are divided into a state that cannot be further divided, wherein the state that cannot be further divided includes that the division characteristic factor is less than or equal to the set standard value, or the size of the sub-image block is less than the minimum division size; S5, according to each image block obtained after the division, the image block is input into the trained wear recognition model respectively, and the wear recognition model performs grinding wheel wear recognition according to the image block to obtain the grinding wheel wear recognition result; S6 integrates the grinding wheel wear recognition results corresponding to each image block to obtain an integrated grinding wheel wear state recognition result.
2. A real-time grinding wheel wear state identification method according to claim 1, characterized in that: The method further includes: S7 issues a corresponding alarm message when the identification result of the grinding wheel wear status is abnormal.
3. A real-time grinding wheel wear state identification method according to claim 1, characterized in that: Step S2 specifically includes: Noise point detection is performed according to the acquired grinding wheel image, and noise elimination processing is performed on the detected noise points; Brightness correction processing is performed on the grinding wheel image after noise elimination to obtain a preprocessed grinding wheel image.
4. A real-time grinding wheel wear state identification method according to claim 3, characterized in that: Step S3 specifically includes: Edge detection is performed on the preprocessed grinding wheel image, in which the Canny operator is used to detect edge pixels in the image, and a morphological closing operation is performed based on the detected edge pixels to extract the circumscribed edge of the grinding wheel in the image, and then the grinding wheel area image is extracted based on the area enclosed by the circumscribed edge.
5. A real-time grinding wheel wear state identification method according to claim 4, characterized in that: Step S4 specifically includes: S41 resets the current number of divisions i=1 , perform initial region division on the grinding wheel region image, and divide the initial region image into N×N uniform image blocks; S42 calculates the partition characteristic factor of each image block according to each image block obtained, wherein the partition characteristic factor calculation function used is: ; In the formula, Q(i,j) Indicates i After the first division, the j The partitioning characteristic factor of the image block is I i,j Indicates i After the first division, the j image blocks; CX(I i,j ) Represents an image block I i,j The grayscale eigenvalue of ;in (x,y) Indicates that it belongs to an image block I i,j Pixels, h(x,y) Represents pixel (x,y) The gray value of h(I i,j ) Represents an image block I i,j The average gray value of max(CX(I i )) Indicates i The maximum value of the grayscale feature value of each image block obtained after the division; GR(I i,j ) Represents an image block I i,j The gradient eigenvalue of ,in (x,y) Indicates that it belongs to an image block I i,j Pixels, Sobel(x, y ) represents pixel (x,y) By sobel The gray gradient value obtained by the operator; mean(GR(I i )) Indicates i The average value of the gradient feature values of each image block after the second division; EG(I i,j ) Represents an image block I i,j The entropy eigenvalue of , p(z) According to the image block I i,j The pixel level in the grayscale distribution histogram z The probability of occurrence; H(i,j) Represents an image block I i,j The heat characteristic factor of R(x,y) Represents pixel (x,y) The pixel distance to the center of the grinding wheel area, RO Represents the diameter pixel distance of the grinding wheel area; Represents pixel (x, y) Wear heat value at the location; ω c Represents the set grayscale feature weight, ω G represents the set gradient feature weight, ω H Indicates the set heat feature weight; S43 divides each image block into characteristic factors Q(i,j) and preset standard values QT For comparison, when the partition characteristic factor is greater than the preset standard value, Q(i,j)>QT , then mark the image block for the next round of division; otherwise, when the division feature factor is less than or equal to the preset standard value, Q(i,j)≤QT , marking the end of the image block division; S44 updates the current number of divisions i=i+1 , and perform region division on each image block marked for the next round of division, and further divide each image block into M×M and repeating steps S42 and S43 until there is no image block marked as needing the next round of division, or the size of the image block currently marked as needing the next round of division is smaller than the preset minimum division size, thus terminating the adaptive division processing of the grinding wheel area image.
6. A real-time grinding wheel wear state identification method according to claim 5, characterized in that: Step S5 specifically includes: The image blocks obtained after the adaptive segmentation process are input into the trained wear recognition model respectively, and the wear recognition model recognizes the wear of the grinding wheel according to the image blocks; The wear identification model is based on CNN The neural network is built, in which the CNN The neural network structure includes the input layer, the first convolution layer, the first maximum pooling layer, the second convolution layer, the attention module, the third convolution layer, the fusion layer, the adaptive average pooling layer, the full convolution classifier, the upsampling layer and the output layer; The input layer is used to input image blocks and can adapt to image blocks of different sizes. The first convolutional layer captures the coarse-grained texture of the input image blocks. The first convolutional layer contains 64 5×5 The convolution kernel has a step size of 1 and the activation function used is ReLU ; The first maximum pooling layer performs a maximum pooling operation on the feature map output by the first convolutional layer, where the pooling window size used is 2×2 , with a step size of 2; the second convolutional layer further refines the feature map output by the first maximum pooling layer, where the second convolutional layer contains 128 3×3 The convolution kernel has a step size of 1 and the activation function used is ReLU ; An attention module is set after the second convolutional layer to improve the response of the key area; the third convolutional layer further extracts contextual features from the feature map after the attention module, and the third convolutional layer contains 256 3×3 The convolution kernel has a step size of 1 and the activation function used is ReLU The fusion layer is used to add the feature maps output by the second convolutional layer and the third convolutional layer, and unify the size of the fused feature maps through the adaptive average pooling layer, fixing the output size to 4×4 ; Use the full convolution classifier to classify each 4×4 The wear probability is obtained by performing wear identification in the region, where the full convolution classifier contains 1 1×1 The convolution kernel has a step size of 1 and the activation function used is Sigmoid ; The upsampling layer performs bilinear interpolation upsampling to 1 / 2 of the original image size; the output layer obtains the corresponding grinding wheel wear recognition result based on the upsampled feature map combined with the probability threshold.
7. A real-time grinding wheel wear state identification method according to claim 6, characterized in that: Step S6 specifically includes: The grinding wheel wear recognition results obtained from each image block are integrated to obtain the overall grinding wheel wear recognition result of the entire grinding wheel area, wherein the overall grinding wheel wear recognition result includes the specific area where wear occurs in the grinding wheel, and whether wear occurs in a specific area.
8. A real-time grinding wheel wear status identification system, characterized in that: It includes an acquisition module, a preprocessing module, an extraction module, a division module, a recognition module and an output module, wherein: The acquisition module is used to acquire the grinding wheel image collected in real time; The preprocessing module is used to preprocess the acquired grinding wheel image, including denoising and lighting correction of the grinding wheel image, to obtain a preprocessed grinding wheel image; The extraction module is used to perform edge detection processing based on the preprocessed grinding wheel image, obtain edge information of the grinding wheel image to perform foreground target recognition, and extract the grinding wheel area image; The division module is used to perform adaptive division processing according to the acquired grinding wheel area image, including: initially dividing the grinding wheel area image into a number of image blocks, for each obtained image block, calculating the division characteristic factor of the image block according to the texture feature information in the image block, and judging whether the image block needs to be further divided according to the obtained division characteristic factor, wherein when the division characteristic factor is greater than a set standard value, the image block is further divided into a number of sub-image blocks; otherwise, when the division characteristic factor is less than or equal to the set standard value, the image block is no longer divided; for the obtained sub-image blocks, further calculating the division characteristic factor of the sub-image blocks, and judging whether further division is needed according to the division characteristic factor, until all the sub-image blocks are divided into a state that cannot be divided any further, wherein the state that cannot be divided any further includes that the division characteristic factor is less than or equal to the set standard value, or the size of the sub-image block is less than the minimum division size; The recognition module is used to input the image blocks obtained after the division into the trained wear recognition model respectively, and the wear recognition model performs grinding wheel wear recognition according to the image blocks to obtain the grinding wheel wear recognition result; The output module is used to integrate the grinding wheel wear recognition results corresponding to each image block to obtain an integrated grinding wheel wear state recognition result.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps of the real-time grinding wheel wear state identification method according to any one of claims 1 to 7 are implemented.
10. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the real-time grinding wheel wear state identification method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Damage identification method and apparatus
CN106815835A
Wind power blade wear analysis method and device based on image processing
CN112862707A
Product settlement data determination method and device, equipment and storage medium
CN117152740A
Cultivated land recognition method in satellite image and computing device
US20210201023A1
Cited By
Grinding wheel wear degree identification method and device based on adaptive neural fuzzy reasoning
CN120155807A
Precision grinder dynamic error control method considering grinding wheel diameter
CN121589723A
Dynamic error control method of precision grinding machine considering grinding wheel diameter
CN121589723B