Diamond wire sand amount distribution detection method and device, electronic equipment and storage medium

By segmenting and pre-processing the diamond line image, the probability density and entropy value of sand volume are obtained, and the identification model is input to improve the efficiency and accuracy of the detection of the diamond line sand volume distribution, solving the problem of low detection efficiency and accuracy in the prior art.

CN119762409APending Publication Date: 2025-04-04QINGDAO GAOCE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311280433.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, the efficiency and accuracy of the detection of sand distribution in the diamond wire is low.

Method used

By preprocessing the diamond line image to be detected, segmenting it into N sub-images, the sand quantity probability density of each sub-image is obtained separately, and the target sand quantity probability density and density entropy value are obtained based on the total sand quantity probability density, and the pre-trained sand quantity distribution identification model is input to obtain the sand quantity distribution parameters.

Benefits of technology

The efficiency and accuracy of the detection of the distribution of diamond sand volume are improved, and the differences between multiple data are characterized by entropy value can be more accurately detected in diamond distribution uniformity or unevenness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762409A_ABST
    Figure CN119762409A_ABST
Patent Text Reader

Abstract

The invention provides a diamond wire sand amount distribution detection method and device, electronic equipment and a computer readable storage medium, and relates to the field of diamond wires. The diamond wire sand amount distribution detection method comprises the following steps: preprocessing a diamond wire image to be detected to obtain a preprocessed image; segmenting the preprocessed image into N sub-images along the extension direction of the diamond wire; according to the number of the sand quantity pixels of each sub-image in the N sub-images, obtaining a target sand quantity probability density and a target sand quantity density entropy value of the preprocessed image; and inputting the target sand amount probability density and the target sand amount density entropy value into a pre-trained sand amount distribution identification model, and obtaining a sand amount distribution identification result as a sand amount distribution parameter of the diamond wire image. The diamond wire sand amount distribution detection method and device, the electronic equipment and the computer readable storage medium provided by the embodiment of the invention have the advantage that the diamond sand amount distribution detection efficiency and detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of diamond wires, and more specifically, to a method, device, electronic device and computer-readable storage medium for detecting the distribution of diamond wire sand. Background Art

[0002] Diamond wire saw, also known as diamond wire, refers to a processing tool that uses electroplating, brazing or resin bonding to fix diamond abrasives on metal wires, and uses the hardness characteristics of diamond to process silicon wafers, sapphires or ceramics. At present, diamond wire saws are mostly manufactured using electroplating technology. The electroplating process uses metal wire as the matrix and diamond powder as the abrasive. The diamond powder is deposited on the surface of the metal wire through the electroplating diamond wire saw tooling to produce a diamond wire production method for diamond wire saws.

[0003] During the production process of diamond wire, it is necessary to detect whether the grit distribution of the diamond attached to it is uniform. The so-called grit refers to the number of diamond particles attached to the diamond wire. However, the detection efficiency and accuracy of the grit distribution of diamond wire in the prior art are low. Summary of the invention

[0004] The purpose of the present application is to provide a method, device, electronic device and computer-readable storage medium for detecting the amount of diamond wire sand distribution, which can improve the detection efficiency and detection accuracy of the amount of diamond wire sand distribution.

[0005] In a first aspect, the present application provides a diamond wire sand amount distribution detection method, comprising: preprocessing a diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of background pixels, a plurality of diamond wire pixels and a plurality of diamond pixels; dividing the preprocessed image into N sub-images along the extension direction of the diamond wire, wherein N is an integer greater than 1; obtaining N sand amount probability densities corresponding to the N sub-images according to the number of sand amount pixels in each sub-image in the N sub-images; obtaining a target sand amount probability density and a target sand amount density entropy value of the preprocessed image according to the N sand amount probability densities; inputting the target sand amount probability density and the target sand amount density entropy value into a pre-trained sand amount distribution recognition model, and obtaining a sand amount distribution recognition result as a sand amount distribution parameter of the diamond wire image.

[0006] Compared with the prior art, in the diamond wire sand amount distribution detection method provided in the embodiment of the present application, the diamond wire image is divided into N sub-images, and the sand amount probability density corresponding to each sub-image is obtained respectively, and the target sand amount probability density and the target sand amount density entropy value corresponding to the diamond wire image are obtained according to the total sand amount probability density. Finally, the target sand amount probability density and the target sand amount density entropy value are input into the pre-trained sand amount distribution recognition model, and the sand amount distribution recognition result output by the sand amount distribution recognition model is used as the sand amount distribution parameter of the diamond wire image. The entropy value can characterize the degree of confusion between multiple data or multiple data. In the embodiment of the present application, the target sand volume density entropy value obtained from several sand volume probability densities can characterize the difference between multiple sand volume probability densities. When the diamonds on the diamond wire are evenly distributed, the difference between multiple sand volume probability densities should be smaller. When the diamonds on the diamond wire are unevenly distributed, the difference between multiple sand volume probability densities should be larger. The sand volume distribution recognition model detects the distribution of diamonds from two aspects: the target sand volume probability density and the target sand volume density entropy value, thereby improving the detection efficiency and accuracy of the diamond wire sand volume distribution.

[0007] In an optional embodiment, the method of obtaining N sand volume probability densities corresponding to the N sub-images according to the number of sand volume pixels in each of the N sub-images includes: obtaining the number of sand volume pixels in each of the N sub-images and the total amount of sand volume pixels in the preprocessed image; for each of the N sub-images, obtaining the sand volume probability density of the sub-image according to the ratio of the number of sand volume pixels in the sub-image to the total amount of sand volume pixels; and obtaining the N sand volume probability densities according to the sand volume probability density of each sub-image. Calculating the sand volume probability density corresponding to each sub-image separately can reduce mutual interference between different sub-images when obtaining N sand volume probability densities, thereby improving the accuracy of the sand volume probability density.

[0008] In an optional embodiment, the method of obtaining the number of sand amount pixels in each of the N sub-images includes: for each of the N sub-images, performing a connected domain analysis on the sub-image, obtaining a diamond connected domain corresponding to the diamond pixel point in the sub-image, and obtaining the number of all pixels corresponding to all diamond connected domains in the sub-image as the number of sand amount pixels in the sub-image. By obtaining the number of sand amount pixels in the sub-image through the connected domain analysis, and obtaining the number of all pixels corresponding to all diamond connected domains in the sub-image as the number of sand amount pixels in the sub-image, there is no need to analyze each pixel point in the sub-image, which can improve the efficiency of obtaining the number of sand amount pixels.

[0009] In an optional embodiment, the total amount of sand pixels in the preprocessed image is obtained, including: performing a connected domain analysis on the preprocessed image, obtaining the diamond connected domain corresponding to the diamond pixel in the preprocessed image, and obtaining the number of all pixels corresponding to all diamond connected domains in the preprocessed image as the total amount of sand pixels.

[0010] In an optional embodiment, obtaining the target sand amount probability density of the preprocessed image based on the N sand amount probability densities includes: selecting a maximum value of the sand amount probability density from the N sand amount probability densities as the target sand amount probability density.

[0011] In an optional embodiment, the training step of the sand amount distribution recognition model includes: obtaining a sample diamond wire image set, wherein the sample diamond wire image includes a plurality of diamond wire images with uniform sand amount distribution and a plurality of diamond wire images with uneven sand amount distribution; for each sample diamond wire image in the sample diamond wire image set, dividing the sample diamond wire image into M sub-images along the extension direction of the diamond wire, wherein M is an integer greater than 1; according to the number of sand amount pixels in each sub-image in the M sub-images, obtaining M sand amount probability densities corresponding to the M sub-images; according to the M sand amount probability densities, obtaining a sample sand amount probability density and a sample sand amount density entropy value of the sample diamond wire image; using the sample sand amount probability density and the sample sand amount density entropy value of each sample diamond wire image to perform model training to obtain the sand amount distribution recognition model.

[0012] In an optional embodiment, the diamond wire image to be detected is preprocessed to obtain a preprocessed image, including: converting the diamond wire image into a target grayscale image; clustering the pixel points in the target grayscale image through three preset clustering centers to obtain a ternary image, wherein the ternary image is used as the preprocessed image.

[0013] In a second aspect, the present application provides a diamond wire sand amount distribution detection device, comprising: an image acquisition module, the image acquisition module is used to acquire a diamond wire image to be detected;

[0014] A preprocessing module, the preprocessing module is used to preprocess the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes multiple background pixels, multiple diamond wire pixels and multiple diamond pixels; an image segmentation module, the image segmentation module is used to segment the preprocessed image into N sub-images along the extension direction of the diamond wire, wherein N is an integer greater than 1; a sand amount parameter acquisition module, the sand amount parameter acquisition module is used to obtain N sand amount probability densities corresponding to the N sub-images according to the number of sand amount pixels in each sub-image in the N sub-images; the sand amount parameter acquisition module is also used to obtain the target sand amount probability density and the target sand amount density entropy value of the preprocessed image according to the N sand amount probability densities; a sand amount recognition module, the sand amount recognition module is used to input the target sand amount probability density and the target sand amount density entropy value into a pre-trained sand amount distribution recognition model to obtain the sand amount distribution recognition result as the sand amount distribution parameter of the diamond wire image.

[0015] In a third aspect, the present application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the diamond wire sand amount distribution detection method as described in any one of the aforementioned embodiments.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the diamond wire sand amount distribution detection method described in any one of the aforementioned embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic diagram of the flow of the diamond wire sand distribution detection method provided in Example 1 of the present application;

[0019] Figure 2 A schematic diagram of preprocessing a diamond wire image in the diamond wire grit distribution detection method provided in Example 1 of the present application;

[0020] Figure 3 A schematic diagram of a preprocessed image in the diamond wire grit distribution detection method provided in Example 1 of the present application;

[0021] Figure 4 A schematic diagram of the structure of a diamond wire sand amount distribution detection device provided in Example 2 of the present application;

[0022] Figure 5 A schematic diagram of the structure of a diamond wire grit distribution detection device provided in another embodiment of the present application;

[0023] Figure 6 This is a schematic diagram of the structure of the electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0025] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0026] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0027] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.

[0028] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.

[0029] Embodiment 1 of the present application provides a method for detecting the distribution of diamond wire sand. Figure 1 As shown, including:

[0030] Step S101: preprocessing the diamond wire image to obtain a preprocessed image.

[0031] Before executing step S101 , a diamond wire image needs to be obtained.

[0032] In some embodiments of the present application, the image of the diamond wire roll to be tested can be captured in real time by a camera module, and each image captured in real time can be used as a diamond wire image; or after the camera module has captured all the images of the diamond wire roll to be tested, they can be stored in a server, and then one or more captured images can be obtained from the server as diamond wire images.

[0033] Among them, the camera module can be a camera, an industrial camera, a video camera and other equipment, which can be flexibly configured according to actual conditions, and this manual does not impose specific restrictions.

[0034] In step S101, the preprocessed image may be a ternary image, that is, the diamond wire image is converted into a ternary image. The ternary image is to map a common 256 grayscale levels (or higher grayscale levels) into an image including 3 different grayscale levels. In the present application, the three different grayscale levels correspond to a plurality of background pixels, a plurality of diamond pixels, and a plurality of busbar pixels, respectively. Taking the diamond wire image as a color image as an example, the specific steps of the preprocessing process are as follows: Figure 2 As shown, including:

[0035] Step S201: converting the diamond wire image into a grayscale image.

[0036] In this step, converting the colored diamond wire image into a grayscale image can specifically be converting the three-channel RGBA pixel value of each pixel in the colored diamond wire image into a single-channel grayscale value. For example, the formula Gray=R*0.299+G*0.587+B*0.114 can be used for conversion, wherein Gray is the grayscale value of the pixel after conversion, R is the color intensity value of the colored pixel in the red channel, G is the color intensity value of the colored pixel in the green channel, and B is the color intensity value of the colored pixel in the blue channel.

[0037] Step S202: clustering the pixels in the grayscale image using three preset cluster centers to obtain a ternary image.

[0038] In this step, the three preset cluster centers can be randomly selected and set values ​​that are spaced a certain size from each other. The spacing size can be a constant value, which can be flexibly set according to different practical application scenarios such as the shooting method of the diamond wire image, the shooting environment, and the type of diamond wire. For example, for a shooting environment with low brightness, a lower spacing size can be set, and for a type of diamond wire with high diamond transparency, a lower spacing size can be set.

[0039] In some embodiments of the present application, the three randomly selected set values ​​may be, for example, 50, 100, and 150. This set value is more consistent with the grayscale values ​​of background pixels, diamond pixels, and busbar pixels in actual applications. Clustering operations using this set value can better separate diamond pixels in a single-channel grayscale image, improve the accuracy of diamond pixel separation, and thus improve the accuracy of the final diamond wire sand amount detection result.

[0040] In different embodiments of the present application, different clustering algorithms can be used to perform clustering operations on the grayscale values ​​of multiple pixels. For example, clustering algorithms such as kmeans clustering algorithm, Mean-Shift clustering algorithm, and composite clustering algorithm can be used to perform clustering operations on the grayscale values ​​of multiple pixels. Taking the kmeans clustering algorithm as an example, the absolute difference between the grayscale value of each pixel and three set values ​​can be calculated respectively. The cluster center with the smallest absolute difference is the cluster center of the pixel. It is judged whether the clustering algorithm has converged (for example, it can be judged whether the sum of the absolute differences between all pixels belonging to the same cluster center and the cluster center is greater than a certain set threshold. If it is greater than the set threshold, the clustering algorithm has not converged. On the contrary, if it is less than or equal to the set threshold, the clustering algorithm has converged. Alternatively, it can also be judged whether the number of operations reaches the threshold number, etc.), if the clustering algorithm has converged Convergence, then the clustering result with the largest grayscale value at this time can be used as the diamond pixel, the clustering result with the smallest grayscale value can be used as the background pixel, and the clustering result with the grayscale value in the middle can be used as the busbar pixel; on the contrary, if the clustering algorithm does not converge, the cluster center can be recalculated according to the pixel grayscale values ​​of the pixels belonging to the same cluster center, for example, the mean of the pixel grayscale values ​​of all pixels whose cluster center is any set value can be used as the new cluster center of the diamond pixel, and the absolute difference between the pixel grayscale value of each pixel and the new cluster center is calculated again until the clustering algorithm converges. In the present application, three different grayscale levels correspond to multiple background pixels, multiple diamond pixels, and multiple busbar pixels, respectively. The background pixels, busbar pixels, and diamond pixels of the diamond line are separated in the ternary image, which can make the accuracy of the determined diamond pixels higher and improve the overall detection accuracy of the sand volume detection.

[0041] Step S102: dividing the pre-processed image into N sub-images along the extension direction of the diamond wire.

[0042] In this step, since the diamond wire is a wire with a small radius, the length of the preprocessed image along the extension direction of the diamond wire is usually much greater than the width of the preprocessed image. Dividing the preprocessed image into several sub-images along the extension direction of the diamond wire can better segment the diamonds in the preprocessed image.

[0043] In an embodiment of the present application, when segmenting the preprocessed image, the pixel width range of the sub-images obtained by segmentation can be preset so that the pixel width of the segmented sub-images falls within the preset pixel width range. In different embodiments, the segmentation of the preprocessed image can be equal segmentation, that is, the area of ​​each sub-image is equal, or unequal segmentation, that is, there are at least two sub-images with unequal areas, and it is only necessary to ensure that the pixel width of each sub-image falls within the preset pixel width range.

[0044] Taking the equal division of the preprocessed image as an example, in some embodiments of the present application, a sliding window can be used to equally divide the preprocessed image. That is, a sliding window is set on the preprocessed image, and the sliding window starts from the edge pixel column on one side of the preprocessed image, and slides along the extension direction of the diamond line in the preprocessed image with the width of the sliding window as a step length. Each time it slides to a position, part of the preprocessed image in the sliding window is intercepted as a sub-image, until it slides to the edge pixel column on the other side, and a number of sub-images of the equally divided preprocessed image are obtained. Among them, the width of the sliding window can be determined according to a preset pixel width range, that is, the width of the sliding window is selected within the preset pixel width range.

[0045] Step S103: according to the number of sand amount pixels in each of the N sub-images, obtain N sand amount probability densities corresponding to the N sub-images.

[0046] In this step, for each of the N sub-images, the number of sand amount pixels in each sub-image is obtained. For the entire pre-processed image, the total number of sand amount pixels in the entire pre-processed image is obtained. For each sub-image, the sand amount probability density corresponding to the sub-image can be obtained based on the ratio of the number of sand amount pixels in the sub-image to the total number of sand amount pixels in the entire pre-processed image. For N sub-images, a corresponding sand amount probability density is determined for each sub-image, and N sand amount probability densities can be obtained.

[0047] Among them, obtaining the number of sand amount pixels corresponding to each sub-image can specifically perform connected domain analysis on each sub-image, obtain the diamond connected domain corresponding to the diamond pixel point in each sub-image, and obtain the number of all pixels corresponding to all diamond connected domains in the sub-image as the number of sand amount pixels in the sub-image. By obtaining the number of sand amount pixels in a sub-image through connected domain analysis, obtaining the number of all pixels corresponding to all diamond connected domains in the sub-image as the number of sand amount pixels in the sub-image does not need to analyze each pixel point in the sub-image, which can improve the efficiency of obtaining the number of sand amount pixels.

[0048] Among them, the connected domain analysis for each sub-image can be performed on the diamond wire image to obtain the marked connected domains corresponding to multiple diamond pixel points as diamond connected domains, and finally obtain multiple mutually spaced diamond connected domains. Figure 3 As shown, the multiple connected domains obtained by the connected domain analysis include a connected domain A and a connected domain A1, and the connected domain A and the connected domain A1 are distributed on the bus B.

[0049] In addition, in some embodiments of the present application, the connected domain analysis may include a two-pass scanning method (Two-Pass) and a seed-filling method (Seed-Filling), etc., which are not specifically limited in this specification.

[0050] Furthermore, in some embodiments of the present application, the total amount of sand pixels of the preprocessed image can be obtained by, for example, summing the total amount of sand pixels corresponding to all sub-images, and the sum of the total amount of sand pixels corresponding to all sub-images is the total amount of sand pixels of the preprocessed image. Alternatively, in some embodiments of the present application, a connected domain analysis can be performed on the preprocessed image to obtain the diamond connected domain corresponding to the diamond pixel in the preprocessed image, and all the numbers of pixels corresponding to all the diamond connected domains in the preprocessed image are obtained as the total amount of sand pixels. It can be used flexibly according to actual needs.

[0051] It can be understood that the aforementioned connected domain analysis of each sub-image is only an example of the method of obtaining the number of sand pixels in each sub-image in some embodiments of the present application. In some other embodiments of the present application, the connected domain analysis can also be directly performed on the pre-processed image to obtain all the diamond connected domains in the pre-processed image, and the position of each diamond connected domain is marked. When the pre-processed image is divided into N sub-images, the information of the diamond connected domain in each sub-image is recorded according to the position of each diamond connected domain, and finally the total amount of sand pixels corresponding to each sub-image can be obtained according to the information of the diamond connected domain in each sub-image. Performing only the connected domain analysis on the pre-processed image can reduce the number of connected domain analyses and further improve the efficiency of obtaining the number of sand pixels.

[0052] Step S104: According to the N sand quantity probability densities, the target sand quantity probability density and the target sand quantity density entropy value of the preprocessed image are obtained.

[0053] In this step, for example, the maximum value of the sand volume probability density can be selected from N sand volume probability densities as the target sand volume probability density. When pre-training the sand volume distribution recognition model, the most commonly used training method is to use the maximum value as the target sand volume probability density for training. In this step, the target sand volume probability density is determined in the same way as the sand volume distribution recognition model training process, which can improve the recognition accuracy of the sand volume distribution recognition model.

[0054] It can be understood that obtaining the maximum value as the target sand quantity probability density is only an example in some embodiments of the present application and does not constitute a limitation. In some other embodiments of the present application, for example, the mean of N sand quantity probability densities can be used as the target sand quantity probability density, or any sand quantity probability density greater than the mean of N sand quantity probability densities can be used as the target sand quantity probability density, etc. Specifically, it can be determined according to the pre-training process of the sand quantity distribution recognition model, or according to other specific usage needs.

[0055] In this step, we can use the formula The target sand volume density entropy value is calculated; where H(X) is the target sand volume density entropy value, i is the sub-image number, p i is the probability density of the amount of sand in the i-th sub-image, N is the number of sub-images, i=1, 2…N.

[0056] In data analysis, the entropy value can characterize the degree of confusion between multiple data or the size of the difference between multiple data. In the embodiments of the present application, the entropy values ​​of several sand volume probability densities can characterize the size of the difference between multiple sand volume probability densities. There is a connection between the size of the difference between multiple sand volume probability densities and whether the distribution of diamonds is uniform. When the diamonds on the diamond wire are uniformly distributed, the size of the difference between multiple sand volume probability densities should be smaller. When the diamonds on the diamond wire are unevenly distributed, the size of the difference between multiple sand volume probability densities should be larger.

[0057] Step S105: input the target sand amount probability density and the target sand amount density entropy value into the pre-trained sand amount distribution recognition model, and obtain the sand amount distribution recognition result as the sand amount distribution parameter of the diamond wire image.

[0058] In this step, the sand distribution identification model can be any one of the classification models such as a vector machine model, a neural network model, a logistic regression model, and a decision tree model.

[0059] In the process of pre-training the sand amount distribution recognition model, for example, a sample diamond wire image set can be obtained, wherein the sample diamond wire images include multiple diamond wire images with uniform sand amount distribution and multiple diamond wire images with uneven sand amount distribution; for each sample diamond wire image in the sample diamond wire image set, the sample diamond wire image is divided into M sub-images along the extension direction of the diamond wire, wherein M is an integer greater than 1; according to the number of sand amount pixels in each sub-image in the M sub-images, M sand amount probability densities corresponding to the M sub-images are obtained; according to the M sand amount probability densities, the sample sand amount probability density and the sample sand amount density entropy value of the sample diamond wire image are obtained; the initial sand amount distribution recognition model is trained using the sample sand amount probability density and the sample sand amount density entropy value of each sample diamond wire image to obtain a trained sand amount distribution recognition model.

[0060] Specifically, for example, after the sand amount distribution recognition model is trained using diamond wire images with uniform sand amount distribution, the trained sand amount distribution recognition model is verified using diamond wire images with uneven sand amount distribution, or after the sand amount distribution recognition model is trained using diamond wire images with uneven sand amount distribution, the trained sand amount distribution recognition model is verified using diamond wire images with uniform sand amount distribution, or after the sand amount distribution recognition model is trained using diamond wire images with uniform sand amount distribution and diamond wire images with uneven sand amount distribution, the remaining diamond wire images with uniform sand amount distribution and diamond wire images with uneven sand amount distribution are used to verify the sand amount distribution recognition model. The sand amount distribution recognition model can be used flexibly according to actual needs. The sand amount distribution recognition model is trained using diamond wire images with uniform sand amount distribution and diamond wire images with uneven sand amount distribution at the same time. During the model training process, the features of the sample diamond wire images with uniform diamond distribution and uneven diamond distribution can be extracted and learned at the same time, so as to improve the accuracy of the model after the training to determine whether the diamond is evenly distributed.

[0061] After the sand amount distribution recognition model training is completed, the target sand amount probability density and the target sand amount density entropy value obtained in the previous steps are input into the trained sand amount distribution recognition model, and the sand amount distribution recognition model can output the sand amount distribution recognition result, and the sand amount distribution recognition result is used as the sand amount distribution parameter of the diamond wire image.

[0062] Compared with the prior art, in the diamond wire sand amount distribution detection method provided in the first embodiment of the present application, the diamond wire image is divided into N sub-images, the sand amount probability density corresponding to each sub-image is obtained respectively, and the target sand amount probability density and the target sand amount density entropy value corresponding to the diamond wire image are obtained according to the total sand amount probability density. Finally, the target sand amount probability density and the target sand amount density entropy value are input into the pre-trained sand amount distribution recognition model, and the sand amount distribution recognition result output by the sand amount distribution recognition model is used as the sand amount distribution parameter of the diamond wire image. The entropy value can characterize the degree of confusion between multiple data or multiple numbers. According to the difference between the target sand volume density and the target sand volume density entropy value, in the embodiment of the present application, the target sand volume density entropy value obtained from several sand volume probability densities can characterize the difference between multiple sand volume probability densities. When the diamonds on the diamond wire are evenly distributed, the difference between multiple sand volume probability densities should be smaller. When the diamonds on the diamond wire are unevenly distributed, the difference between multiple sand volume probability densities should be larger. The sand volume distribution recognition model detects the distribution of diamonds from two aspects: the target sand volume probability density and the target sand volume density entropy value, thereby improving the detection efficiency and accuracy of the diamond wire sand volume distribution.

[0063] Embodiment 2 of the present application relates to a diamond wire sand distribution detection device, such as Figure 4 As shown, it includes: a preprocessing module 301, the preprocessing module 301 is used to preprocess the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes multiple background pixels, multiple diamond wire pixels and multiple diamond pixels; an image segmentation module 302, the image segmentation module 302 is used to segment the preprocessed image into N sub-images along the extension direction of the diamond wire, wherein N is an integer greater than 1; a sand amount parameter acquisition module 303, the sand amount parameter acquisition module 303 is used to obtain N sand amount probability densities corresponding to the N sub-images according to the number of sand amount pixels in each sub-image in the N sub-images; the sand amount parameter acquisition module 303 is also used to obtain the target sand amount probability density and the target sand amount density entropy value of the preprocessed image according to the N sand amount probability densities; a sand amount recognition module 304, the sand amount recognition module 305 is used to input the target sand amount probability density and the target sand amount density entropy value into the pre-trained sand amount distribution recognition model, and obtain the sand amount distribution recognition result as the sand amount distribution parameter of the diamond wire image.

[0064] Compared with the prior art, in the diamond wire sand amount distribution detection device provided in the second embodiment of the present application, the image segmentation module 302 segments the diamond wire image into N sub-images, the sand amount parameter acquisition module 303 respectively obtains the sand amount probability density corresponding to each sub-image, and obtains the target sand amount probability density and the target sand amount density entropy value corresponding to the diamond wire image according to the total sand amount probability density. Finally, the sand amount recognition module 304 inputs the target sand amount probability density and the target sand amount density entropy value into the pre-trained sand amount distribution recognition model, and uses the sand amount distribution recognition result output by the sand amount distribution recognition model as the sand amount distribution parameter of the diamond wire image. The entropy value can characterize the confusion between multiple data. The degree or the size of the difference between multiple data, in the embodiment of the present application, the target sand volume density entropy value obtained from several sand volume probability densities can characterize the size of the difference between multiple sand volume probability densities. When the diamonds on the diamond wire are evenly distributed, the size of the difference between multiple sand volume probability densities should be small, and when the diamonds on the diamond wire are unevenly distributed, the size of the difference between multiple sand volume probability densities should be large. The sand volume distribution recognition model in the sand volume recognition module 305 detects the distribution of diamonds from two aspects: the target sand volume probability density and the target sand volume density entropy value, thereby improving the detection efficiency and detection accuracy of the diamond wire sand volume distribution.

[0065] Further, in some embodiments of the present application, Figure 5 As shown, a model training module 305 may also be included, and the model training module 305 is used to pre-train the sand amount distribution recognition model. Specifically, a sample diamond wire image set may be obtained, wherein the sample diamond wire image includes multiple diamond wire images with uniform sand amount distribution and multiple diamond wire images with uneven sand amount distribution; for each sample diamond wire image in the sample diamond wire image set, the sample diamond wire image is divided into M sub-images along the extension direction of the diamond wire, wherein M is an integer greater than 1; according to the number of sand amount pixels in each sub-image in the M sub-images, M sand amount probability densities corresponding to the M sub-images are obtained; according to the M sand amount probability densities, the sample sand amount probability density and the sample sand amount density entropy value of the sample diamond wire image are obtained; the sample sand amount probability density and the sample sand amount density entropy value of each sample diamond wire image are used for model training to obtain the sand amount distribution recognition model.

[0066] In some embodiments of the present application, the sand amount parameter acquisition module 303 is also used to obtain the number of sand amount pixels in each of the N sub-images and the total amount of sand amount pixels in the preprocessed image; for each of the N sub-images, based on the ratio of the number of sand amount pixels in the sub-image to the total amount of sand amount pixels, obtain the sand amount probability density of the sub-image; based on the sand amount probability density of each sub-image, obtain N sand amount probability densities.

[0067] In some embodiments of the present application, the sand amount parameter acquisition module 303 is also used to perform a connected domain analysis on each sub-image in the N sub-images, obtain the diamond connected domain corresponding to the diamond pixel point in the sub-image, and obtain the number of all pixels corresponding to all diamond connected domains in the sub-image as the number of sand amount pixels in the sub-image.

[0068] In some embodiments of the present application, the sand amount parameter acquisition module 303 is also used to perform connected domain analysis on the preprocessed image, obtain the diamond connected domain corresponding to the diamond pixel in the preprocessed image, and obtain the number of all pixels corresponding to all diamond connected domains in the preprocessed image as the total number of sand amount pixels.

[0069] In some embodiments of the present application, the sand amount parameter acquisition module 303 is further used to select the maximum value of the sand amount probability density from N sand amount probability densities as the target sand amount probability density.

[0070] In some embodiments of the present application, the preprocessing module 301 is also used to convert the diamond wire image into a target grayscale image; the pixel points in the target grayscale image are clustered through three preset clustering centers to obtain a ternary image, wherein the ternary image is used as a preprocessed image.

[0071] Embodiment 3 of the present application relates to an electronic device, such as Figure 6 As shown, it includes: at least one processor 401; and a memory 402 that is communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions are executed by the at least one processor 401, so that the at least one processor 401 can execute the diamond agglomeration detection method on the diamond wire surface in the above-mentioned embodiments.

[0072] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0073] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0074] Embodiment 4 of the present application relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiment is implemented.

[0075] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0076] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for detecting the distribution of diamond wire sand, characterized in that: include: Preprocessing the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of background pixel points, a plurality of diamond wire pixel points, and a plurality of diamond pixel points; Dividing the pre-processed image into N sub-images along the extension direction of the diamond wire, wherein N is an integer greater than 1; According to the number of sand amount pixels in each of the N sub-images, obtaining N sand amount probability densities corresponding to the N sub-images; According to the N sand volume probability densities, a target sand volume probability density and a target sand volume density entropy value of the preprocessed image are obtained; The target sand amount probability density and the target sand amount density entropy value are input into a pre-trained sand amount distribution recognition model, and a sand amount distribution recognition result is obtained as a sand amount distribution parameter of the diamond wire image.

2. The diamond wire grit distribution detection method according to claim 1, characterized in that: The obtaining, according to the number of sand amount pixels of each sub-image in the N sub-images, N sand amount probability densities corresponding to the N sub-images comprises: Obtaining the number of sand pixels in each of the N sub-images and the total number of sand pixels in the pre-processed image; For each sub-image in the N sub-images, according to the ratio of the number of sand amount pixels in the sub-image to the total amount of sand amount pixels, obtain the sand amount probability density of the sub-image; According to the sand amount probability density of each sub-image, the N sand amount probability densities are obtained.

3. The diamond wire grit distribution detection method according to claim 2, characterized in that: The step of obtaining the number of sand pixels in each of the N sub-images includes: For each of the N sub-images, a connected domain analysis is performed on the sub-image to obtain the diamond connected domain corresponding to the diamond pixel point in the sub-image, and the number of all pixels corresponding to all diamond connected domains in the sub-image is obtained as the number of sand amount pixels in the sub-image.

4. The diamond wire grit distribution detection method according to claim 2, characterized in that: Obtaining the total amount of sand pixels of the preprocessed image, including: A connected domain analysis is performed on the preprocessed image to obtain a diamond connected domain corresponding to a diamond pixel in the preprocessed image, and the number of all pixels corresponding to all diamond connected domains in the preprocessed image is obtained as the total number of sand pixels.

5. The diamond wire grit distribution detection method according to claim 1, characterized in that: The step of obtaining a target sand volume probability density of the preprocessed image according to the N sand volume probability densities includes: The maximum value of the sand quantity probability density is selected from the N sand quantity probability densities as the target sand quantity probability density.

6. The diamond wire grit distribution detection method according to claim 1, characterized in that: The training steps of the sand volume distribution recognition model include: Acquire a sample diamond wire image set, wherein the sample diamond wire images include a plurality of diamond wire images with uniform distribution of marked sand amounts and a plurality of diamond wire images with uneven distribution of marked sand amounts; For each sample diamond wire image in the sample diamond wire image set, the sample diamond wire image is divided into M sub-images along the extension direction of the diamond wire, wherein M is an integer greater than 1; according to the number of sand amount pixels in each sub-image of the M sub-images, M sand amount probability densities corresponding to the M sub-images are obtained; according to the M sand amount probability densities, a sample sand amount probability density and a sample sand amount density entropy value of the sample diamond wire image are obtained; The sample sand amount probability density and the sample sand amount density entropy value of each sample diamond wire image are used for model training to obtain the sand amount distribution recognition model.

7. The diamond wire grit distribution detection method according to claim 1, characterized in that: The step of preprocessing the diamond wire image to be detected to obtain a preprocessed image includes: Converting the diamond wire image into a target grayscale image; The pixels in the target grayscale image are clustered using three preset cluster centers to obtain a ternary image, wherein the ternary image is used as the preprocessed image.

8. A diamond wire sand distribution detection device, characterized in that: include: An image acquisition module, wherein the image acquisition module is used to acquire an image of a diamond wire to be detected; A preprocessing module, wherein the preprocessing module is used to preprocess the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of background pixels, a plurality of diamond wire pixels, and a plurality of diamond pixels; An image segmentation module, the image segmentation module is used to segment the pre-processed image into N sub-images along the extension direction of the diamond wire, wherein N is an integer greater than 1; A sand volume parameter acquisition module, the sand volume parameter acquisition module is used to obtain N sand volume probability densities corresponding to the N sub-images according to the number of sand volume pixels in each sub-image of the N sub-images; the sand volume parameter acquisition module is also used to obtain the target sand volume probability density and the target sand volume density entropy value of the pre-processed image according to the N sand volume probability densities; A sand volume identification module is used to input the target sand volume probability density and the target sand volume density entropy value into a pre-trained sand volume distribution identification model to obtain a sand volume distribution identification result as a sand volume distribution parameter of the diamond wire image.

9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the diamond wire sand amount distribution detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: The computer program is executed by a processor to implement the diamond wire grit distribution detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for detecting density and distribution of diamond wire abrasive particles

    CN102890039A

  • Diamond fretsaw surface abrasive particle distribution uniformity evaluation method

    CN112801973A

  • Method and system for detecting and counting carborundum particles

    CN113409266A

  • Diamond saw wire wear online detection method and device based on machine vision

    CN114049340A