Diamond wire quality detection method and device, electronic equipment and storage medium
By preprocessing and connecting domain analysis of the diamond line image, the sand volume and area proportion are identified, and the problems of low efficiency and high risk of misjudgment in the prior art are solved, and efficient and accurate diamond line quality judgment is achieved.
Patent Information
- Application Number
- CN202311286027.7
- 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
The prior art is difficult to efficiently and accurately detect the amount of sand and diamond area of diamond lines, which affects the quality judgment of diamond lines and leads to a high risk of misjudgment.
By acquiring the diamond line image, performing preprocessing and connecting domain analysis, identifying diamond and background pixel points, calculating the sand volume and area ratio, and judging the diamond line quality based on the image quantity and proportion.
It realizes efficient and low-cost diamond line quality detection, reduces the risk of misjudgment, and improves the accuracy and reliability of the detection.
Smart Images

Figure CN119762412A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of device detection, and in particular, to a diamond wire quality detection method, device, electronic device and storage medium. Background Art
[0002] Diamond wire has the advantages of high processing efficiency and cutting seams, and is widely used in the slicing processing of hard and brittle materials such as single crystal silicon, sapphire, single crystal silicon carbide, and ceramics.
[0003] When the diamond wire is sand-plated, the amount of sand successfully attached to the diamond wire will directly affect the quality of the diamond wire. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a diamond wire quality detection method, device, electronic device and storage medium to realize the detection of diamond wire quality.
[0005] The embodiment of the present application provides a diamond wire quality detection method, comprising: obtaining a diamond wire image set corresponding to a diamond wire reel to be tested, wherein the diamond wire image set includes a plurality of diamond wire images; preprocessing the diamond wire image for each diamond wire image in the diamond wire image set to obtain a preprocessed image corresponding to the diamond wire image, wherein the preprocessed image includes a plurality of background pixels and a plurality of diamond pixels; obtaining the amount of diamond sand and the proportion of diamond area in the preprocessed image corresponding to the diamond wire image; judging whether the amount of sand and the proportion of diamond area in the preprocessed image meet a sand shortage judgment condition, and obtaining a sand shortage judgment result of the diamond wire image; according to the sand shortage judgment result of each diamond wire image, obtaining the proportion of the number of diamond wire images in the diamond wire image set that are in a sand shortage state; judging whether the image quantity proportion exceeds a set qualified proportion, and obtaining a proportion judgment result; and determining the quality state of the diamond wire reel to be tested according to the proportion judgment result.
[0006] In the above implementation process, by obtaining each diamond wire image corresponding to the diamond wire roll to be tested, and determining the amount of diamond sand and the proportion of diamond area in the diamond wire image, it is determined whether the diamond wire image has a situation of less sand (i.e., insufficient sand) based on the amount of sand and the proportion of diamond area, and then the quality state of the diamond wire roll to be tested is determined based on whether the proportion of the number of images of the diamond wire images in the state of less sand exceeds the set qualified proportion. In this way, the detection of the quality of the diamond wire is realized, and automated detection can be realized on the machine based on the image, with high detection efficiency and low cost. At the same time, the embodiment of the present application combines the amount of sand and the proportion of diamond area to jointly determine whether the diamond wire image is in a state of less sand, which reduces the risk of misjudgment and improves the reliability of the judgment result.
[0007] Furthermore, for each diamond wire image in the diamond wire image set, the amount of diamond sand in the preprocessed image corresponding to the diamond wire image is obtained, including: for each diamond wire image in the diamond wire image set: obtaining the preprocessed image corresponding to the diamond wire image for connected domain analysis to obtain a connected domain set corresponding to the multiple diamond pixel points; wherein the connected domain set contains multiple connected domains; according to a set pixel amount, selecting a large connected domain subset from the connected domain set; wherein the number of pixels contained in each connected domain in the large connected domain subset is greater than the set pixel amount; splitting each connected domain in the large connected domain subset to obtain the number of split connected domains corresponding to the large connected subset; determining the amount of sand corresponding to the diamond wire image according to the number of remaining connected domains and the number of split connected domains; wherein the number of remaining connected domains is the total amount of all connected domains in the connected domain set except the large connected domain subset.
[0008] In the above implementation, the number of pixels in the connected domain can reflect the area of each connected domain. In most cases, one gravel corresponds to one connected domain, but there may be bonding between diamonds. For the case where multiple diamonds are bonded together, these multiple diamonds correspond to one connected domain. The number of target pixels corresponding to a single diamond is smaller than that of multiple diamonds bonded together. Therefore, according to the set pixel quantity, it can be judged whether each connected domain in the connected domain set is a connected domain corresponding to multiple diamonds bonded together (i.e., a connected domain in a large connected domain subset), and the connected domain in the large connected domain subset is split. The split connected domain after splitting can be considered as a connected domain with only a single diamond, so that the amount of diamond sand in the diamond wire image is determined according to the number of remaining connected domains in the connected domain set except the large connected domain subset and the number of split connected domains, and the determined sand amount is highly accurate, making the subsequent judgment result of the sand-less state more reliable.
[0009] Furthermore, each connected domain in the large connected domain subset is split to obtain the number of split connected domains corresponding to the large connected domain subset, including: using the target pixel number corresponding to a single diamond, each connected domain in the large connected domain subset is split to obtain the number of split connected domains corresponding to the large connected domain subset.
[0010] Furthermore, each connected domain in the large connected domain subset is split using the target number of pixels corresponding to a single diamond to obtain the number of split connected domains corresponding to the large connected domain subset, including: for each connected domain in the large connected domain subset, according to the number of pixels occupied by the connected domain and the target number of pixels, determining the number of splits corresponding to the connected domain; and determining the number of split connected domains according to the sum of the number of splits of all connected domains in the large connected domain subset.
[0011] In the above implementation, each connected domain in the large connected domain subset is split using the target pixel number corresponding to a single diamond, so that the number of splits can be as consistent as possible with the number of diamonds in the connected domain, thereby improving the accuracy of sand amount determination.
[0012] Furthermore, for each diamond wire image in the diamond wire image set, the proportion of diamond area in the preprocessed image corresponding to the diamond wire image is obtained, including: for each diamond wire image in the diamond wire image set, identifying the diamond wire area in the preprocessed image corresponding to the diamond wire image, and calculating the proportion of diamond area corresponding to the diamond wire area.
[0013] It can be understood that the diamond is attached to the diamond wire, so the diamond area ratio corresponding to the diamond wire area can intuitively reflect whether there is a situation of less sand. In the above implementation, by identifying the diamond wire area in the preprocessed image corresponding to the diamond wire image and calculating the diamond area ratio corresponding to the diamond wire area, the diamond area ratio can be made more representative, thereby improving the accuracy of judging whether the diamond wire image is in a state of less sand.
[0014] Furthermore, for each diamond wire image in the diamond wire image set, a diamond wire area in a preprocessed image corresponding to the diamond wire image is identified, including: for each diamond wire image in the diamond wire image set: obtaining a first row of pixels and a second row of pixels that meet a diamond wire boundary recognition condition from the preprocessed image corresponding to the diamond wire image, using the first row of pixels as the upper boundary of the diamond wire in the preprocessed image, and using the second row of pixels as the lower boundary of the diamond wire in the preprocessed image, wherein the first row of pixels is located above the second row of pixels; and using the area between the upper boundary and the lower boundary as the diamond wire area.
[0015] In the above implementation, by setting the diamond wire boundary recognition conditions, the upper and lower boundaries of the diamond wire can be quickly obtained, thereby determining the diamond wire area.
[0016] Further, the method of obtaining the first row of pixels and the second row of pixels satisfying the diamond wire boundary recognition condition from the preprocessed image comprises: if the diamond wire boundary recognition condition includes a diamond wire boundary setting value, judging in order from top to bottom whether the sum of each row of pixels in the preprocessed image is greater than the diamond wire boundary setting value, and taking a row of pixels whose sum of pixels is greater than the diamond wire boundary setting value when judged for the first time as the first row of pixels; and judging in order from bottom to top whether the sum of each row of pixels in the preprocessed image is greater than the diamond wire boundary setting value, and taking a row of pixels whose sum of pixels is greater than the diamond wire boundary setting value when judged for the first time as the second row of pixels.
[0017] In the above implementation, there is a large difference in pixel values between background pixels and diamond pixels in the preprocessed image. Therefore, when the pixel sum (i.e., the sum of pixel values) of each row is determined row by row from both sides, once it is found that the pixel sum of the current row suddenly changes to a value greater than the diamond line boundary setting value, it indicates that there are diamond pixels in the currently calculated row, so that the row can be determined to be a boundary of the diamond line. In this way, the two boundaries of the diamond line in the diamond line image can be quickly determined, and then the diamond line area in the diamond line image can be accurately determined.
[0018] Furthermore, for each diamond wire image in the diamond wire image set, it is determined whether the amount of sand and the proportion of diamond area in the preprocessed image meet the sand shortage judgment condition, and the sand shortage judgment result of the diamond wire image is obtained, including: for each diamond wire image in the diamond wire image set, it is determined whether the amount of sand in the preprocessed image is less than the set sand shortage value, and a first judgment result is obtained; it is determined whether the proportion of diamond area in the preprocessed image is less than the set sand shortage ratio, and a second judgment result is obtained; and the sand shortage judgment result of the diamond wire image is determined based on the first judgment result and the second judgment result.
[0019] In the above implementation, the judgment results of the amount of sand and the proportion of diamond area are combined to obtain the final judgment result of the lack of sand, so that the judgment result of the lack of sand is more accurate.
[0020] Furthermore, based on the sand-poor judgment result of each diamond wire image, the proportion of the number of diamond wire images in the diamond wire image set that are in a sand-poor state is obtained, including: based on the sand-poor judgment result of each diamond wire image, obtaining the number of all diamond wire images whose sand-poor judgment results indicate that the diamond is in a sand-poor state as the number of sand-poor images; based on the number of sand-poor images and the total number of images in the diamond wire image set, obtaining the proportion of the number of images.
[0021] In the above implementation, the proportion of the number of images obtained is determined based on the number of sand-less images and the total number of images in the diamond wire image set. This makes it more objective to determine the quality status of the diamond wire roll to be tested based on the proportion of the number of images.
[0022] Further, according to the proportion judgment result, the quality status of the diamond wire roll to be tested is determined, including: if the proportion judgment result indicates that the proportion of the number of images is greater than the set qualified proportion, then it is determined that the quality status of the diamond wire roll to be tested is in an unqualified state; otherwise, it is determined that the quality status of the diamond wire roll to be tested is in a qualified state.
[0023] Furthermore, for each diamond wire image in the diamond wire image set, the diamond wire image is preprocessed to obtain a preprocessed image corresponding to the diamond wire image, including: for each diamond wire image in the diamond wire image set, the diamond wire image is converted into a target grayscale image; pixel points in the target grayscale image are clustered by three preset clustering centers to obtain a ternary image; wherein the ternary image includes multiple background pixel points, multiple busbar pixel points and multiple diamond pixel points; and the preprocessed image is determined based on the ternary image.
[0024] It can be understood that the diamond wire image mainly includes three parts: diamond, busbar, and background. In the production line, the background is usually relatively simple (usually a production line), so there will be large differences in color between the diamond, busbar, and background. Therefore, in the grayscale image, the diamond, busbar, and background each have a different grayscale value range. Based on this, by clustering the grayscale image with three preset cluster centers, the background pixels, diamond pixels, and busbar pixels in the diamond wire image can be easily and accurately identified, and then binarization processing can be performed to obtain a binary image that distinguishes diamond pixels from other pixels except diamond pixels. Since diamond pixels and other pixels except diamond pixels are distinguished in the binary image, the upper and lower boundaries of the diamond wire area can be easily determined based on the binary image, reducing the difficulty of determining the upper and lower boundaries of the diamond wire area.
[0025] The embodiment of the present application also provides a diamond wire quality detection device, including: an acquisition module, used to acquire a diamond wire image set corresponding to a diamond wire roll to be tested, wherein the diamond wire image set includes a plurality of diamond wire images; an image discrimination module, used to pre-process the diamond wire image for each diamond wire image in the diamond wire image set to obtain a pre-processed image corresponding to the diamond wire image, wherein the pre-processed image includes a plurality of background pixels and a plurality of diamond pixels; acquire the amount of diamond sand and the proportion of diamond area in the pre-processed image corresponding to the diamond wire image; determine whether the amount of sand and the proportion of diamond area in the pre-processed image meet the sand-less determination condition, and acquire the sand-less determination result of the diamond wire image; a proportion determination module, used to acquire the proportion of the number of diamond wire images in the sand-less state in the diamond wire image set according to the sand-less determination result of each diamond wire image; a result determination module, used to determine whether the image number proportion exceeds a set qualified proportion, acquire the proportion judgment result, and determine the quality state of the diamond wire roll to be tested according to the proportion judgment result.
[0026] An embodiment of the present application further provides an electronic device, comprising: a processor and a memory; the processor is used to execute one or more programs stored in the memory to implement any of the above-mentioned diamond wire quality detection methods.
[0027] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores one or more programs. The one or more programs can be executed by one or more processors to implement any of the above-mentioned diamond wire quality detection methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application 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.
[0029] Figure 1 A schematic flow chart of a diamond wire quality detection method provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of a process for determining a sand shortage determination result for each diamond wire image provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of an image preprocessing process provided in an embodiment of the present application;
[0032] Figure 4 A binarized diamond wire image provided in an embodiment of the present application;
[0033] Figure 5 A method provided in the embodiment of the present application Figure 4 A schematic diagram of the two boundaries of the diamond wire identified on the basis;
[0034] Figure 6 A schematic structural diagram of a diamond wire quality detection device provided in an embodiment of the present application;
[0035] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0037] In order to detect the quality of diamond wire, a diamond wire quality detection method is provided in the embodiment of the present application. Figure 1As shown, Figure 1 A schematic flow chart of a diamond wire quality detection method provided in an embodiment of the present application includes:
[0038] S101: Obtain a diamond wire image set corresponding to the diamond wire reel to be tested.
[0039] The diamond wire image set includes a plurality of diamond wire images.
[0040] In an embodiment of the present application, during the production process of the diamond wire roll to be tested or after the production of the diamond wire roll to be tested is completed, an image of at least a portion of the diamond wire of the diamond wire roll to be tested can be captured by a camera or other photographic equipment to obtain a diamond wire image set corresponding to the diamond wire roll to be tested, but this is not a limitation.
[0041] S102: for each diamond wire image in the diamond wire image set, determining a sand-less judgment result of each diamond wire image.
[0042] In step S102, for each diamond wire image in the diamond wire image set, Figure 2 As shown in the figure, the sand shortage judgment result can be determined according to the following process:
[0043] S1021: pre-processing the diamond wire image to obtain a pre-processed image corresponding to the diamond wire image.
[0044] The preprocessed image includes a plurality of background pixels and a plurality of diamond pixels, wherein the diamond pixels refer to pixels representing diamonds in the image, and the background pixels refer to pixels other than the diamond pixels in the image.
[0045] It can be understood that the diamond wire image mainly includes three parts: diamond, mother wire (i.e., wire for attaching diamond), and background. In most cases, the three parts of diamond, mother wire, and background will have large differences in color. Therefore, in a feasible implementation of the embodiment of the present application, Figure 3 As shown, step S1021 may include:
[0046] S301: Convert the diamond wire image into a grayscale image.
[0047] Exemplarily, the values of the BGR (blue, green and red) three channels of the diamond wire image may be read, and then the BGR values may be converted into a single value using, but not limited to, histogram equalization, averaging, etc. to obtain a grayscale image.
[0048] S302: clustering the pixels in the grayscale image using three preset cluster centers to obtain a ternary image.
[0049] The ternary image includes a plurality of background pixels, a plurality of diamond pixels and a plurality of busbar pixels.
[0050] 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.
[0051] In some optional embodiments, the three randomly selected set values may be, for example, 50, 100, and 150. This set value is relatively matched with the grayscale values of background pixels, diamond pixels, and busbar pixels in actual applications. Clustering operation is performed using this set value, which 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.
[0052] In some optional embodiments, 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, and the cluster center with the smallest absolute difference is the cluster center of the pixel to determine whether the clustering algorithm has converged (for example, it can be determined 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 determined whether the number of operations reaches a 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. Classifying the background pixels, busbar pixels, and diamond pixels of the diamond line in the ternary image can make the accuracy of the determined diamond pixels higher and improve the overall detection accuracy of the sand volume detection.
[0053] In an embodiment of the present application, after determining the category information of each pixel in the grayscale image, the diamond pixel can be expanded. Since the pixels at the edge of the diamond may be divided into the cluster corresponding to the busbar during the clustering process, that is, the category information of the pixels at the edge of the diamond is identified as the busbar pixel, which will cause the identified diamond area to be reduced. Therefore, by expanding the pixels whose category information is diamond, the area of the diamond in the image can be restored, so as to correctly detect the sand state of the diamond wire later.
[0054] S303: Convert the ternary image into a binary image.
[0055] Among them, the binary image is used as the preprocessed image.
[0056] Exemplarily, the pixel value of the diamond pixel can be set to a specified positive integer or remain unchanged; similarly, the pixel value of the non-diamond pixel can be set to zero, or the pixel value of the non-diamond pixel can be set to the pixel value of the background pixel or the busbar pixel, thereby converting the ternary image into a binary image, for example Figure 4 shown, but not by way of limitation.
[0057] Optionally, in some embodiments, the ternary image may be used as a pre-processed image, and in this case, step S203 does not need to be performed.
[0058] S1022: Obtain the diamond sand amount and diamond area ratio in the pre-processed image corresponding to the diamond wire image.
[0059] In the embodiment of the present application, the process of obtaining the amount of diamond grit in the pre-processed image corresponding to the diamond wire image may include:
[0060] First, a preprocessed image corresponding to the diamond wire image is obtained to perform connected domain analysis to obtain a connected domain set corresponding to multiple diamond pixel points; wherein the connected domain set contains multiple connected domains.
[0061] In some embodiments, a connected domain analysis may be performed on the pre-processed image to obtain marked connected domains corresponding to a plurality of diamond pixel points as a connected domain set.
[0062] 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.
[0063] After the connected domain set is obtained, a large connected domain subset is selected from the connected domain set according to the set pixel quantity, wherein the pixel quantity contained in each connected domain in the large connected domain subset is greater than the set pixel quantity.
[0064] Each connected domain in the large connected domain subset is split to obtain the number of split connected domains corresponding to the large connected domain subset.
[0065] The amount of sand corresponding to the diamond wire image is determined according to the number of remaining connected domains and the number of split connected domains, wherein the number of remaining connected domains is the total amount of all connected domains in the connected domain set except the large connected domain subset.
[0066] It can be understood that since the area occupied by a single diamond (i.e., the number of pixels) will not differ too much, the aforementioned set pixel number can be set according to the number of pixels usually occupied by a single diamond. If the number of pixels of a connected domain is less than or equal to the set pixel number, it can be considered that the connected domain corresponds to a single diamond. If the number of pixels of a connected domain is greater than the set pixel number, it can be considered that the connected domain corresponds to multiple diamonds, and the connected domain needs to be split. Exemplarily, the set pixel number can be set to 40 pixels, but it is not limited to this.
[0067] In order to split the connected domains in the large connected domain subset, a feasible implementation method is: use the target number of pixels corresponding to a single diamond to split each connected domain in the large connected domain subset to obtain the number of split connected domains corresponding to the large connected subset.
[0068] When each connected domain in the large connected domain subset is split using the target pixel number corresponding to a single diamond, the number of splits corresponding to the connected domain can be determined based on the number of pixels occupied by the connected domain and the target pixel number, and then the number of split connected domains can be determined based on the sum of the number of splits of all connected domains in the large connected domain subset.
[0069] Exemplarily, assuming that there are two connected domains in the large connected domain subset, the number of pixels is 200 and 400 respectively, and the target number of pixels is 20, then it can be determined that the number of splits of the two connected domains is 10 and 20 respectively, and further the number of split connected domains is determined to be 30.
[0070] In the above feasible implementation manner, the target number of pixels corresponding to a single diamond can be obtained by:
[0071] Method 1: Obtain an average number of pixels corresponding to all connected domains in the diamond wire image as a first pixel quantity; and determine a target pixel quantity based on the first pixel quantity.
[0072] Exemplarily, the first pixel quantity may be used as the target pixel quantity, or a preset constant may be added to or subtracted from the first pixel quantity to form the target pixel quantity.
[0073] Method 2: Obtain a specified connected domain subset whose pixel numbers are within a set pixel range in all connected domains of the diamond wire image; obtain the average pixel number corresponding to all connected domains in the specified connected domain subset as the second pixel quantity; and determine the target pixel quantity based on the second pixel quantity.
[0074] The pixel range can be set as needed. For example, the pixel range can be greater than or equal to 5 pixels; or, the pixel range can be less than or equal to 40 pixels; or, the pixel range can be greater than or equal to 5 pixels and less than or equal to 40 pixels, but this is not a limitation.
[0075] Exemplarily, the second pixel quantity may be used as the target pixel quantity.
[0076] In order to split the connected domains in the large connected domain subset, another feasible implementation method is: using the erosion and expansion algorithm to split the connected domains in the connected domain subset to obtain multiple disconnected connected domains.
[0077] In the above feasible implementation manner, different scales may be used to perform erosion operations and dilation operations on the connected domains in the connected domain subset, so as to obtain a plurality of disconnected connected domains.
[0078] After obtaining multiple disconnected connected domains, it is further possible to determine whether there are still connected domains in the multiple disconnected connected domains whose pixel quantity is greater than the set pixel quantity. If so, continue to split these connected domains.
[0079] In the embodiment of the present application, the sum of the number of remaining connected domains and the number of split connected domains can be determined as the amount of sand corresponding to the diamond wire image.
[0080] In some implementations of the embodiments of the present application, the diamond area ratio in the pre-processed image corresponding to the diamond wire image can be obtained by the following method:
[0081] The diamond wire area in the preprocessed image corresponding to the diamond wire image is identified, and the diamond area ratio corresponding to the diamond wire area is calculated.
[0082] For example, the total number of pixels of all connected domains in the diamond wire image may be divided by the total number of pixels of the diamond wire region to obtain the diamond area ratio corresponding to the diamond wire region.
[0083] In an embodiment of the present application, in order to identify the diamond wire area in the preprocessed image corresponding to the diamond wire image, the first row of pixels and the second row of pixels that meet the diamond wire boundary recognition conditions can be obtained from the preprocessed image corresponding to the diamond wire image, and the first row of pixels is used as the upper boundary of the diamond wire in the preprocessed image, and the second row of pixels is used as the lower boundary of the diamond wire in the preprocessed image. Among them, the first row of pixels is located above the second row of pixels. Thereafter, the area between the upper boundary and the lower boundary can be used as the diamond wire area.
[0084] Exemplarily, the diamond line boundary recognition condition may be that the sum of pixels in any row is greater than the diamond line boundary setting value. At this time, it is possible to sequentially determine whether the sum of pixels in each row of the preprocessed image is greater than the diamond line boundary setting value in order from top to bottom, and use a row of pixels whose sum of pixels is greater than the diamond line boundary setting value determined for the first time as the first row of pixels;
[0085] And in order from bottom to top, it is judged in turn whether the sum of each row of pixels in the preprocessed image is greater than the diamond line boundary setting value, and a row of pixels whose sum of pixels is greater than the diamond line boundary setting value determined for the first time is used as the second row of pixels.
[0086] The above method can be applied to a binary image or a ternary image.
[0087] If the preprocessed image is a binary image, the diamond line boundary recognition condition can also be that the difference between the sum of pixels of two adjacent rows is greater than a set threshold. The difference between the sum of pixels of two adjacent rows is equal to the absolute value of An-An+1; wherein: An is the sum of the pixel values of all pixels in the previous row of the two adjacent rows, and An+1 is the sum of the pixel values of all pixels in the next row of the two adjacent rows.
[0088] Exemplarily, after obtaining the binary image, the pixel sum of each row and the difference between the pixel sum of the row and the pixel sum of the next row can be determined row by row starting from the upper edge of the binary image; if the difference between the pixel sum is greater than the set threshold, the next row is determined to be the upper boundary of the diamond line.
[0089] In addition, starting from the lower edge of the binary image, the pixel sum of each row and the difference between the pixel sum of the row and the sum of the pixel values of the previous row in the image are determined row by row upward; if the difference in the sum of the pixel values is greater than the set threshold, the previous row is determined as the lower boundary of the diamond line. The area between the upper boundary and the lower boundary is used as the diamond line area.
[0090] by Figure 4 Taking the binarized diamond wire image shown in the figure as an example, we can get the following Figure 5 The upper and lower boundaries of the diamond line shown ( Figure 5 The two white lines in the figure).
[0091] In some other implementations of the embodiments of the present application, the diamond area ratio in the preprocessed image corresponding to the diamond wire image can also be obtained in the following way: the sum of the number of pixels of all connected domains in the diamond wire image is divided by the total number of pixels of the diamond wire image to obtain the diamond area ratio.
[0092] S1023: Determine whether the sand amount and diamond area ratio in the pre-processed image meet the sand shortage judgment condition, and obtain the sand shortage judgment result of the diamond wire image.
[0093] Optionally, for each diamond wire image in the diamond wire image set, it is possible to determine whether the amount of sand in the preprocessed image is less than a set sand minority value to obtain a first judgment result; and to determine whether the diamond area ratio in the preprocessed image is less than a set sand minority ratio to obtain a second judgment result; based on the first judgment result and the second judgment result, determine the sand minority judgment result of the diamond wire image.
[0094] For example, when the first judgment result indicates that the amount of sand is less than the set sand amount, or the second judgment result indicates that the diamond area ratio is less than the set sand amount ratio, it can be determined that the diamond wire image is in a sand-less state; otherwise, it is determined that the diamond wire image is not in a sand-less state.
[0095] For another example, when the first judgment result indicates that the amount of sand is less than the set sand amount value, and the second judgment result indicates that the proportion of diamond area is less than the set sand amount ratio, it can be determined that the diamond wire image is in a sand-less state; otherwise, it is determined that the diamond wire image is not in a sand-less state.
[0096] In the embodiment of the present application, the set sand shortage value can be set according to the identification standard for sand shortage in the industry. The set sand shortage ratio can be set according to the identification standard for sand shortage in the industry.
[0097] S103: According to the sand-less determination result of each diamond wire image, the image quantity ratio of the diamond wire images in the sand-less state in the diamond wire image set is obtained.
[0098] In an embodiment of the present application, based on the sand-poor judgment result of each diamond wire image, the number of all diamond wire images whose sand-poor judgment results represent that the diamond is in a sand-poor state can be obtained as the number of sand-poor images, and then the image number ratio can be obtained based on the number of sand-poor images and the total number of images in the diamond wire image set.
[0099] Exemplarily, the number of sand-less images may be divided by the total number of images in the diamond wire image set to obtain the image number ratio.
[0100] S104: Determine whether the image quantity ratio exceeds the set qualified ratio, and obtain the ratio determination result.
[0101] S105: Determine the quality status of the diamond wire coil to be tested according to the proportion judgment result.
[0102] In the embodiment of the present application, if the proportion of the number of images represented by the proportion judgment result is greater than the set qualified proportion, it is determined that the quality state of the diamond wire roll to be tested is in an unqualified state; otherwise, it is determined that the quality state of the diamond wire roll to be tested is in a qualified state. The qualified proportion can be set according to industrial needs, for example, it can be set to 4%.
[0103] The diamond wire quality detection method provided in the embodiment of the present application obtains each diamond wire image corresponding to the diamond wire roll to be tested, and determines the amount of diamond sand and the proportion of diamond area in the diamond wire image, thereby determining whether the diamond wire image has a situation of insufficient sand (i.e., insufficient sand) based on the amount of sand and the proportion of diamond area, and then determines the quality state of the diamond wire roll to be tested based on whether the image number proportion of the diamond wire images in the state of insufficient sand exceeds the set qualified proportion. In this way, the quality detection of the diamond wire is realized, and automated detection can be realized on the machine based on the image, with high detection efficiency and low cost. At the same time, the embodiment of the present application combines the amount of sand and the proportion of diamond area to jointly determine whether the diamond wire image is in a state of insufficient sand, which reduces the risk of misjudgment and improves the reliability of the judgment result.
[0104] Based on the same inventive concept, a diamond wire quality detection device 600 is also provided in the embodiment of the present application. Figure 6 As shown, Figure 6 Shows the use of Figure 1 The diamond wire quality detection device of the method shown. It should be understood that the specific functions of the device 600 can be referred to the description above, and the detailed description is appropriately omitted here to avoid repetition. The device 600 includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system of the device 600. Specifically:
[0105] See also Figure 6 As shown, the device 600 includes: an acquisition module 601, an image recognition module 602, a ratio determination module 603 and a result determination module 604. Among them:
[0106] An acquisition module 601 is used to acquire a diamond wire image set corresponding to the diamond wire coil to be tested, wherein the diamond wire image set includes a plurality of diamond wire images;
[0107] The image discrimination module 602 is used to pre-process the diamond wire image for each diamond wire image in the diamond wire image set to obtain a pre-processed image corresponding to the diamond wire image, wherein the pre-processed image includes a plurality of background pixels and a plurality of diamond pixels; obtain the amount of diamond sand and the proportion of diamond area in the pre-processed image corresponding to the diamond wire image; determine whether the amount of sand and the proportion of diamond area in the pre-processed image meet the sand-less judgment condition, and obtain the sand-less judgment result of the diamond wire image;
[0108] The proportion determination module 603 is used to obtain the proportion of the number of diamond wire images in the diamond wire image set that are in the state of less sand according to the determination result of less sand of each diamond wire image;
[0109] The result determination module 604 is used to determine whether the image quantity ratio exceeds the set qualified ratio, obtain the ratio determination result, and determine the quality status of the diamond wire roll to be tested according to the ratio determination result.
[0110] In a feasible implementation of the embodiment of the present application, the image discrimination module 602 is specifically used for: for each diamond wire image in the diamond wire image set: obtaining a preprocessed image corresponding to the diamond wire image for connected domain analysis to obtain a connected domain set corresponding to the multiple diamond pixel points; wherein the connected domain set contains multiple connected domains; according to a set pixel quantity, selecting a large connected domain subset from the connected domain set; wherein the number of pixels contained in each connected domain in the large connected domain subset is greater than the set pixel quantity; splitting each connected domain in the large connected domain subset to obtain the number of split connected domains corresponding to the large connected subset; determining the amount of sand corresponding to the diamond wire image according to the number of remaining connected domains and the number of split connected domains; wherein the number of remaining connected domains is the total amount of all connected domains in the connected domain set except the large connected domain subset.
[0111] In the above feasible implementation manner, the image recognition module 602 is specifically used to: split each connected domain in the large connected domain subset using the target pixel number corresponding to a single diamond, and obtain the number of split connected domains corresponding to the large connected domain subset.
[0112] In the above feasible implementation manner, the image discrimination module 602 is specifically used to: for each connected domain in the large connected domain subset, determine the corresponding number of splits of the connected domain according to the number of pixels occupied by the connected domain and the target number of pixels; and determine the number of split connected domains according to the sum of the number of splits of all connected domains in the large connected domain subset.
[0113] In a feasible implementation of the embodiment of the present application, the image recognition module 602 is specifically used to: for each diamond wire image in the diamond wire image set, identify the diamond wire area in the preprocessed image corresponding to the diamond wire image, and calculate the diamond area ratio corresponding to the diamond wire area.
[0114] In the above-mentioned feasible implementation manner, the image discrimination module 602 is specifically used for: for each diamond wire image in the diamond wire image set: obtaining the first row of pixels and the second row of pixels that meet the diamond wire boundary recognition conditions from the preprocessed image corresponding to the diamond wire image, using the first row of pixels as the upper boundary of the diamond wire in the preprocessed image, and using the second row of pixels as the lower boundary of the diamond wire in the preprocessed image, wherein the first row of pixels is located above the second row of pixels; and using the area between the upper boundary and the lower boundary as the diamond wire area.
[0115] In the above-mentioned feasible implementation manner, the image discrimination module 602 is specifically used for: if the diamond wire boundary recognition condition includes a diamond wire boundary setting value, then judging in order from top to bottom whether the sum of each row of pixels in the preprocessed image is greater than the diamond wire boundary setting value, and taking a row of pixels whose sum of pixels is greater than the diamond wire boundary setting value when judged for the first time as the first row of pixels; and judging in order from bottom to top whether the sum of each row of pixels in the preprocessed image is greater than the diamond wire boundary setting value, and taking a row of pixels whose sum of pixels is greater than the diamond wire boundary setting value when judged for the first time as the second row of pixels.
[0116] In a feasible implementation of the embodiment of the present application, the image discrimination module 602 is specifically used to: for each diamond wire image in the diamond wire image set, determine whether the amount of sand in the pre-processed image is less than the set sand minority value, and obtain a first judgment result; determine whether the diamond area ratio in the pre-processed image is less than the set sand minority ratio, and obtain a second judgment result; determine the sand minority judgment result of the diamond wire image based on the first judgment result and the second judgment result.
[0117] In a feasible implementation of the embodiment of the present application, the proportion determination module 603 is specifically used to: according to the sand-less judgment result of each diamond wire image, obtain the number of all diamond wire images whose sand-less judgment result represents that the diamond is in a sand-less state as the number of sand-less images; according to the number of sand-less images and the total number of images in the diamond wire image set, obtain the proportion of the number of images.
[0118] In a feasible implementation of the embodiment of the present application, the result determination module 604 is specifically used for: if the proportion judgment result indicates that the proportion of the number of images is greater than the set qualified proportion, then it is determined that the quality status of the diamond wire roll to be tested is in an unqualified state; otherwise, it is determined that the quality status of the diamond wire roll to be tested is in a qualified state.
[0119] In a feasible implementation of the embodiment of the present application, the image discrimination module 602 is specifically used for: for each diamond wire image in the diamond wire image set, converting the diamond wire image into a target grayscale image; clustering the pixel points in the target grayscale image by three preset clustering centers to obtain a ternary image; wherein the ternary image includes a plurality of background pixel points, a plurality of busbar pixel points and a plurality of diamond pixel points; and determining the preprocessed image based on the ternary image.
[0120] It should be understood that, for the sake of brevity, some of the contents described in the method embodiments will not be repeated in the device embodiments.
[0121] Based on the same inventive concept, the present application embodiment provides an electronic device, see Figure 7 As shown, it includes a processor 701 and a memory 702. Among them:
[0122] The processor 701 is used to execute one or more programs stored in the memory 702 to implement the above-mentioned diamond wire quality detection method.
[0123] It is understood that the processor 701 may be a processor core or a processor chip, or other circuits capable of program configuration and operation, and the memory 702 may be a RAM (Random Access Memory), a ROM (Read-Only Memory), a flash memory, etc., but is not limited thereto.
[0124] It is understandable. Figure 7 The structure shown is for illustration only. The electronic device may also include Figure 7 More or fewer components as shown, or with Figure 7 For example, it may also have an internal communication bus for realizing communication between the processor 701 and the memory 702; for another example, it may also have an external communication interface, such as a USB (Universal Serial Bus) interface, a CAN (Controller Area Network) bus interface, etc., connected to an image acquisition device, so as to automatically acquire the image of the diamond wire to be detected; for another example, it may also have an information display component such as a display screen, but this is not a limitation.
[0125] Based on the same inventive concept, this embodiment also provides a computer-readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a USB flash disk, an SD (Secure Digital Memory Card) card, an MMC (Multimedia Card) card, etc., in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the above diamond wire quality detection method. No further details will be given here.
[0126] In the embodiments provided in this application, the various embodiments and implementation methods can be freely combined to obtain new embodiments without conflict.
[0127] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0128] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0130] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0131] As used herein, a plurality refers to two or more than two.
[0132] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A diamond wire quality detection method, characterized in that: include: Acquire a diamond wire image set corresponding to the diamond wire coil to be tested, wherein the diamond wire image set includes a plurality of diamond wire images; For each diamond wire image in the diamond wire image set, preprocessing the diamond wire image to obtain a preprocessed image corresponding to the diamond wire image, wherein the preprocessed image includes a plurality of background pixels and a plurality of diamond pixels; obtaining the amount of diamond sand and the proportion of diamond area in the preprocessed image corresponding to the diamond wire image; judging whether the amount of sand and the proportion of diamond area in the preprocessed image meet the sand-less judgment condition, and obtaining the sand-less judgment result of the diamond wire image; According to the sand-less determination result of each diamond wire image, the ratio of the number of diamond wire images in the sand-less state in the diamond wire image set is obtained; Determine whether the image quantity ratio exceeds a set qualified ratio, and obtain a ratio determination result; According to the proportion judgment result, the quality status of the diamond wire reel to be tested is determined.
2. The diamond wire quality detection method according to claim 1, characterized in that: For each diamond wire image in the diamond wire image set, obtaining the amount of diamond grit in the pre-processed image corresponding to the diamond wire image includes: For each diamond wire image in the diamond wire image set: Obtaining a preprocessed image corresponding to the diamond wire image to perform connected domain analysis to obtain a connected domain set corresponding to the plurality of diamond pixel points; wherein the connected domain set includes a plurality of connected domains; According to the set pixel quantity, a large connected domain subset is selected from the connected domain set; wherein the pixel quantity contained in each connected domain in the large connected domain subset is greater than the set pixel quantity; Splitting each connected domain in the large connected domain subset to obtain the number of split connected domains corresponding to the large connected domain subset; The amount of sand corresponding to the diamond wire image is determined according to the number of remaining connected domains and the number of split connected domains; wherein the number of remaining connected domains is the total amount of all connected domains in the connected domain set except the large connected domain subset.
3. The diamond wire quality detection method according to claim 2, characterized in that: Each connected domain in the large connected domain subset is split to obtain the number of split connected domains corresponding to the large connected domain subset, including: Each connected domain in the large connected domain subset is split using the target pixel number corresponding to a single diamond to obtain the number of split connected domains corresponding to the large connected domain subset.
4. The diamond wire quality detection method according to claim 3, characterized in that: Using the target pixel number corresponding to a single diamond, each connected domain in the large connected domain subset is split to obtain the number of split connected domains corresponding to the large connected subset, including: For each connected domain in the large connected domain subset, determining the number of splits corresponding to the connected domain according to the number of pixels occupied by the connected domain and the target number of pixels; The number of split connected domains is determined according to the sum of the number of splits of all connected domains in the large connected domain subset.
5. The diamond wire quality detection method according to claim 1, characterized in that: For each diamond wire image in the diamond wire image set, obtaining the diamond area ratio in the pre-processed image corresponding to the diamond wire image includes: For each diamond wire image in the diamond wire image set, a diamond wire region in a preprocessed image corresponding to the diamond wire image is identified, and a diamond area ratio corresponding to the diamond wire region is calculated.
6. The diamond wire quality detection method according to claim 5, characterized in that: For each diamond wire image in the diamond wire image set, identifying a diamond wire region in a pre-processed image corresponding to the diamond wire image includes: For each diamond wire image in the diamond wire image set: Acquire a first row of pixels and a second row of pixels satisfying a diamond line boundary recognition condition from a preprocessed image corresponding to the diamond line image, use the first row of pixels as an upper boundary of the diamond line in the preprocessed image, and use the second row of pixels as a lower boundary of the diamond line in the preprocessed image, wherein the first row of pixels is located above the second row of pixels; The area between the upper boundary and the lower boundary is used as the diamond wire area.
7. The diamond wire quality detection method according to claim 6, characterized in that: The step of acquiring a first row of pixels and a second row of pixels satisfying a diamond line boundary recognition condition from the preprocessed image comprises: If the diamond line boundary recognition condition includes a diamond line boundary setting value, then judging in order from top to bottom whether the sum of each row of pixels in the preprocessed image is greater than the diamond line boundary setting value, and taking a row of pixels whose sum of pixels is greater than the diamond line boundary setting value judged for the first time as the first row of pixels; And in order from bottom to top, it is judged in turn whether the sum of each row of pixels in the preprocessed image is greater than the diamond line boundary setting value, and a row of pixels whose sum of pixels is greater than the diamond line boundary setting value determined for the first time is used as the second row of pixels.
8. The diamond wire quality detection method according to any one of claims 1 to 7, characterized in that: For each diamond wire image in the diamond wire image set, judging whether the sand amount and diamond area ratio in the pre-processed image meet the sand shortage judgment condition, and obtaining the sand shortage judgment result of the diamond wire image, including: For each diamond wire image in the diamond wire image set, determining whether the amount of sand in the pre-processed image is less than a set sand minority value, and obtaining a first determination result; Determine whether the diamond area ratio in the pre-processed image is less than the set sand ratio, and obtain a second determination result; A sand-less determination result of the diamond wire image is determined according to the first determination result and the second determination result.
9. The diamond wire quality detection method according to any one of claims 1 to 7, characterized in that: According to the sand-less determination result of each diamond wire image, the image quantity ratio of the diamond wire images in the sand-less state in the diamond wire image set is obtained, including: According to the sand-poor determination result of each diamond wire image, the number of all diamond wire images whose sand-poor determination result indicates that the diamond is in a sand-poor state is obtained as the number of sand-poor images; The image quantity ratio is obtained according to the number of the sand-less images and the total number of images in the diamond wire image set.
10. The diamond wire quality detection method according to any one of claims 1 to 7, characterized in that: According to the proportion judgment result, determining the quality status of the diamond wire coil to be tested includes: If the proportion judgment result indicates that the proportion of the number of images is greater than the set qualified proportion, it is determined that the quality status of the diamond wire roll to be tested is in an unqualified state; otherwise, it is determined that the quality status of the diamond wire roll to be tested is in a qualified state.
11. The diamond wire quality detection method according to any one of claims 1 to 7, characterized in that: For each diamond wire image in the diamond wire image set, preprocessing the diamond wire image to obtain a preprocessed image corresponding to the diamond wire image includes: For each diamond wire image in the diamond wire image set, converting the diamond wire image into a target grayscale image; Clustering the pixels in the target grayscale image through three preset cluster centers to obtain a ternary image; wherein the ternary image includes a plurality of background pixels, a plurality of busbar pixels and a plurality of diamond pixels; The preprocessed image is determined according to the ternary image.
12. A diamond wire quality detection device, characterized in that: include: An acquisition module, used for acquiring a diamond wire image set corresponding to the diamond wire coil to be tested, wherein the diamond wire image set includes a plurality of diamond wire images; An image discrimination module is used to pre-process the diamond wire image for each diamond wire image in the diamond wire image set to obtain a pre-processed image corresponding to the diamond wire image, wherein the pre-processed image includes a plurality of background pixels and a plurality of diamond pixels; obtain the amount of diamond sand and the proportion of diamond area in the pre-processed image corresponding to the diamond wire image; determine whether the amount of sand and the proportion of diamond area in the pre-processed image meet the sand-less judgment condition, and obtain the sand-less judgment result of the diamond wire image; A proportion determination module, for obtaining the proportion of the number of diamond wire images in the diamond wire image collection that are in a state of less sand according to the determination result of less sand of each diamond wire image; The result determination module is used to determine whether the proportion of the number of images exceeds the set qualified proportion, obtain the proportion judgment result, and determine the quality status of the diamond wire roll to be tested based on the proportion judgment result.
13. An electronic device, characterized in that: include: Processor and memory; The processor is used to execute one or more programs stored in the memory to implement the diamond wire quality detection method according to any one of claims 1-11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the diamond wire quality detection method according to any one of claims 1-11.
Citation Information
Patent Citations
Surveying and mapping unmanned aerial vehicle result detection method and device, electronic equipment and storage medium
CN111754451A
Diamond wire surface carborundum particle quality detection method based on machine vision
CN113063705A
Defect detection method and device, electronic equipment and computer readable storage medium
CN113379680A
Diamond wire monitoring device
CN216816461U