Diamond wire sand amount distribution state identification method, electronic equipment and storage medium

By preprocessing the diamond line image and calculating the diamond area proportion of the window image, combined with the comparison of the uneven distribution proportion threshold, the sand distribution status of the diamond line is automatically identified, which solves the problems of large workload, poor timeliness and strong subjectivity of artificial quality inspection, and achieves efficient and objective quality inspection results.

CN119762573APending Publication Date: 2025-04-04QINGDAO GAOCE TECH CO LTD

Patent Information

Application Number
CN202311284188.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

The prior art relies on artificial quality inspection in diamond wire quality inspection, resulting in large workload, poor timeliness, and strong subjectivity, and unable to give objective quality inspection results.

Method used

By preprocessing the diamond line image to be detected, multiple window images in the diamond line area are extracted, the diamond area ratio of each window image is calculated, and it is compared with the threshold for uneven distribution proportion to determine the sand distribution state.

Benefits of technology

Automatic diamond line quality inspection is realized, quality inspection efficiency and timeliness are improved, objective quality inspection results are provided, and subjective problems of artificial quality inspection are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762573A_ABST
    Figure CN119762573A_ABST
Patent Text Reader

Abstract

The invention provides a diamond wire sand amount distribution state identification method, electronic equipment and a storage medium, and the method comprises the steps: carrying out the preprocessing of a to-be-detected diamond wire image, and obtaining a preprocessed image, and the preprocessed image comprises a plurality of diamond pixels and a plurality of non-diamond pixels; m window images are extracted from a diamond wire area of the preprocessed image, M is an integer larger than 1, and image areas corresponding to the M window images cover the diamond wire area; obtaining a diamond area proportion of each window image in the M window images, and obtaining M diamond area proportions corresponding to the M window images; comparing the area proportions of the M diamonds with a non-uniform distribution proportion threshold value to obtain a comparison result; and according to the comparison result, the sand amount distribution state in the diamond wire image is determined. According to the scheme, the timeliness of quality inspection of the diamond wire is improved, and an objective quality inspection result can be provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of diamond wire quality detection, and in particular to a method for identifying the sand distribution state of a diamond wire, an electronic device, and a computer-readable storage medium. Background Art

[0002] In the field of diamond wire quality inspection, many manufacturers have not formed the same standard. Most companies use manual quality inspection and quality inspection machines for quality inspection, and the quality inspection content can include breaking force detection, diameter measurement, etc. Manual quality inspection requires the use of industrial cameras to take pictures of the diamond wire production line, and then check the photos. However, 1 meter of diamond wire may require hundreds of photos for quality inspection, and a roll of diamond wire is as long as 200 kilometers. The quality inspection process requires a large number of photos, and the workload of manual quality inspection is extremely large. In this case, manual quality inspection cannot give quality inspection results in a short time, and the timeliness is poor. In addition, manual quality inspection relies on experience and is too subjective to give objective quality inspection results. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method for identifying the sand distribution state of a diamond wire, an electronic device, and a storage medium, so as to improve the timeliness of quality inspection of the diamond wire and provide objective quality inspection results.

[0004] On the one hand, the present application provides a method for identifying the sand distribution state of a diamond wire, comprising:

[0005] Preprocessing the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of diamond pixels and a plurality of non-diamond pixels;

[0006] Extracting M window images from the diamond line region of the preprocessed image, wherein M is an integer greater than 1, and image regions corresponding to the M window images cover the diamond line region;

[0007] Obtaining the diamond area ratio of each window image in the M window images, and obtaining M diamond area ratios corresponding to the M window images;

[0008] Compare the area proportions of the M diamonds with the uneven distribution proportion threshold to obtain a comparison result;

[0009] According to the comparison result, the distribution state of the sand amount in the diamond wire image is determined.

[0010] In one embodiment, extracting M window images from the diamond line region of the pre-processed image includes:

[0011] According to a preset step length, the sliding window is controlled to slide in the horizontal and vertical directions of the diamond wire area until the entire diamond wire area is traversed;

[0012] The image areas within all the sliding windows obtained by traversal are taken as the M window images.

[0013] In one embodiment, the obtaining of the diamond area ratio of each window image in the M window images to obtain the M diamond area ratios corresponding to the M window images includes:

[0014] For each window image in the M window images, obtaining a diamond pixel area of ​​the window image;

[0015] According to the diamond pixel area of ​​the window image and the total area of ​​the window pixels, the diamond area ratio of the window image is obtained;

[0016] The above operation is performed on each of the M window images to obtain the M diamond area proportions.

[0017] In one embodiment, for each window image in the M window images, obtaining the diamond pixel area of ​​the window image includes:

[0018] For each window image in the M window images, a diamond connected domain in the window image is selected from a pre-acquired diamond connected domain set, and the pixel areas corresponding to all diamond connected domains in the window image are used as the diamond pixel area of ​​the window image, wherein the diamond connected set is obtained by performing connected domain analysis on the preprocessed image.

[0019] In one embodiment, the step of obtaining the diamond connected domain set includes:

[0020] Performing connected domain analysis on the preprocessed image to obtain all connected domains corresponding to diamond pixels;

[0021] All connected domains corresponding to the diamond pixels are added to the diamond connected domain set.

[0022] In one embodiment, determining the distribution state of sand in the diamond wire image according to the comparison result includes:

[0023] If the comparison result indicates that there is at least one diamond area whose proportion is less than the uneven distribution proportion threshold, it is determined that the amount of sand in the diamond wire image is in an uneven sand distribution state;

[0024] If the comparison result indicates that the area proportions of the M diamonds are not less than the uneven distribution proportion threshold, it is determined that the amount of sand in the diamond wire image is in a uniform sand distribution state.

[0025] In one embodiment, the step of preprocessing the diamond wire image to be detected to obtain a preprocessed image includes:

[0026] Converting the diamond wire image into a corresponding target grayscale image;

[0027] Clustering the pixel points in the target grayscale image through three preset initial clustering 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;

[0028] The ternary image is converted into a binary image, and the binary image is used as a preprocessed image; wherein the binary image includes a plurality of diamond pixels and a plurality of non-diamond pixels.

[0029] In one embodiment, the method further comprises:

[0030] After obtaining the grit distribution states of the target diamond wire corresponding to the plurality of diamond wire images, a comprehensive evaluation result of the grit distribution of the target diamond wire is determined based on the plurality of grit distribution states.

[0031] On the other hand, the present application provides a device for identifying the sand distribution state of a diamond wire, comprising:

[0032] A preprocessing module, used for preprocessing the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of diamond pixels and a plurality of non-diamond pixels;

[0033] An extraction module, used to extract M window images from the diamond line area of ​​the pre-processed image, wherein M is an integer greater than 1, and the image areas corresponding to the M window images cover the diamond line area;

[0034] An acquisition module, used to acquire the diamond area ratio of each window image in the M window images, and obtain M diamond area ratios corresponding to the M window images;

[0035] A comparison module, used for comparing the area proportions of the M diamonds with a threshold value of uneven distribution proportion to obtain a comparison result;

[0036] A determination module is used to determine the distribution state of the sand amount in the diamond wire image according to the comparison result.

[0037] On the other hand, the present application provides an electronic device, the electronic device comprising:

[0038] processor;

[0039] a memory for storing processor-executable instructions;

[0040] Wherein, the processor is configured to execute the above-mentioned method for identifying the sand amount distribution state of the diamond wire.

[0041] In addition, the present application provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to complete the above-mentioned method for identifying the sand distribution state of the diamond wire.

[0042] The present application scheme converts the diamond wire image into a pre-processed image, and after calculating the diamond area ratio of the M window images extracted from the diamond wire area in the pre-processed image, since each diamond area ratio can characterize the sand distribution of the window image, by comparing each diamond area ratio with the uneven distribution ratio threshold, the identification result of the sand distribution state can be accurately obtained according to the comparison result. This process can be automatically performed by electronic equipment, which greatly improves the quality inspection efficiency and the timeliness of the diamond wire quality inspection compared to manual quality inspection; in addition, the identification process of the sand distribution state is realized based on the uneven distribution ratio threshold, avoiding the problem that manual quality inspection cannot give objective quality inspection results due to strong subjectivity. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application are briefly introduced below.

[0044] Figure 1 A schematic flow chart of a method for identifying the sand distribution state of a diamond wire provided in one embodiment of the present application;

[0045] Figure 2 An embodiment of the present application provides Figure 1 Detailed flow chart of step 130;

[0046] Figure 3 A schematic diagram of a diamond wire area in a diamond wire image provided by an embodiment of the present application;

[0047] Figure 4 A schematic flow chart of a method for determining a diamond wire area provided in one embodiment of the present application;

[0048] Figure 5 A schematic flow chart of a method for identifying a diamond wire area provided in one embodiment of the present application;

[0049] Figure 6 A block diagram of a device for identifying the sand distribution state of a diamond wire provided in one embodiment of the present application;

[0050] Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0051] 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.

[0052] Similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0053] See also Figure 1 , is a flow chart of a method for identifying the sand distribution state of a diamond wire provided in an embodiment of the present application, such as Figure 1 As shown, the method may include the following steps 110 to 150.

[0054] Step 110: preprocessing the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of diamond pixels and a plurality of non-diamond pixels.

[0055] During the production process of the target diamond wire, multiple diamond wire images can be taken by the industrial camera on the production line for the identification of the sand distribution status. Among them, the target diamond wire is the diamond wire that needs to be analyzed for the sand distribution status. Each diamond wire image can characterize the sand distribution status of a section of the target diamond wire. Electronic devices (such as host computers, servers, etc.) connected to the industrial camera can obtain the diamond wire images taken by the industrial camera and identify the sand distribution status of the target diamond wire based on the diamond wire images.

[0056] The electronic device may use each diamond wire image of the target diamond wire for sand amount distribution state identification, or may select a diamond wire image every few images for sand amount distribution state identification, or may periodically select a diamond wire image for sand amount distribution state identification, or may randomly select several diamond wire images for sand amount distribution state identification.

[0057] For the diamond wire image to be detected, the electronic device can pre-process it to distinguish the diamond pixels and non-diamond pixels in the image to obtain a pre-processed image. The pixel values ​​of the diamond pixels in the pre-processed image are different from the pixel values ​​of the non-diamond pixels.

[0058] Step 120: extracting M window images from the diamond line region of the preprocessed image, wherein M is an integer greater than 1, and the image regions corresponding to the M window images cover the diamond line region.

[0059] The electronic device can extract M window images from the diamond line area, and the sizes of the M window images can be the same or different.

[0060] In one embodiment, the electronic device may divide the diamond line area equally in the horizontal direction and the vertical direction, thereby obtaining M window images. For example, the diamond line area may be divided into 4 equally in the horizontal direction and the vertical direction, thereby obtaining 16 window images.

[0061] In one embodiment, the electronic device may randomly cut the window image at various positions in the diamond line area according to at least one preset window size of the window image, thereby obtaining a plurality of window images.

[0062] Step 130: Obtain the diamond area ratio of each window image in the M window images, and obtain M diamond area ratios corresponding to the M window images.

[0063] For each window image, the ratio between the diamond pixel area in the window image and the total window pixel area can be calculated to obtain the diamond area ratio.

[0064] In one embodiment, the diamond pixel area in the window image can be represented by the number of diamond pixels; the total window pixel area can be represented by the total number of pixels in the window image. Figure 2 , provided in one embodiment of the present application Figure 1 The detailed flow chart of step 130 is as follows: Figure 2 As shown, the following steps 131 to 133 may be included.

[0065] Step 131: For each window image in the M window images, obtain the diamond pixel area of ​​the window image.

[0066] Step 132: Obtain the diamond area ratio of the window image according to the diamond pixel area of ​​the window image and the total window pixel area.

[0067] For each window image, the electronic device can count the number of diamond pixels in the window image and the total number of pixels in the window image to obtain the diamond pixel area and the window pixel area, and then divide the diamond pixel area by the window pixel area to obtain the diamond area ratio corresponding to the window image.

[0068] Exemplarily, the diamond area ratio can be expressed by the following formula (1):

[0069] Q=cn / M*H (1)

[0070] Among them, Q is the proportion of diamond area; cn is the diamond pixel area in the window image; M is the width of the window image (expressed in the number of pixels); H is the height of the window image (expressed in the number of pixels).

[0071] Step 133: Perform the above operation on each of the M window images to obtain M diamond area proportions.

[0072] After calculating the diamond pixel area ratios for each of the M windows, M diamond area ratios can be obtained.

[0073] Step 140: Compare the area proportions of the M diamonds with the uneven distribution proportion threshold to obtain a comparison result.

[0074] Step 150: Determine the distribution state of the sand amount in the diamond wire image according to the comparison result.

[0075] The uneven distribution ratio threshold is used to characterize the boundary between uneven distribution and uniform distribution. The uneven distribution ratio threshold can be configured as needed. For example, the uneven distribution ratio threshold can be 0.04.

[0076] After obtaining the M diamond area proportions, the electronic device can compare the diamond area proportions with the uneven distribution proportion threshold one by one to obtain a comparison result. Further, the electronic device can determine the sand amount distribution state in the diamond wire image according to the comparison result.

[0077] In one embodiment, if the comparison result indicates that the proportion of the M diamond areas is not less than the uneven distribution proportion threshold, it can be determined that the amount of sand in the diamond wire image is in a uniform sand distribution state. On the other hand, if the comparison result indicates that there is at least one diamond area proportion less than the uneven distribution proportion threshold, it can be determined that the amount of sand in the diamond wire image is in an uneven sand distribution state.

[0078] Through the above measures, the diamond wire image is converted into a pre-processed image, and after calculating the diamond area ratio of the M window images extracted from the diamond wire area in the pre-processed image, since each diamond area ratio can characterize the sand distribution of the window image, by comparing each diamond area ratio with the uneven distribution ratio threshold, the identification result of the sand distribution state can be accurately obtained according to the comparison result. This process can be automatically performed by electronic equipment, which greatly improves the quality inspection efficiency and the timeliness of diamond wire quality inspection compared with manual quality inspection; in addition, the identification process of the sand distribution state is realized based on the uneven distribution ratio threshold, avoiding the problem that manual quality inspection cannot give objective quality inspection results due to strong subjectivity.

[0079] In one embodiment, when extracting M window images from the diamond line area, the electronic device can control the sliding window to slide horizontally and vertically in the diamond line area of ​​the diamond line image according to a preset sliding step length until the entire diamond line area is traversed. Here, the sliding step length can be configured as needed. Exemplarily, the sliding step length can be 2 pixels, 3 pixels, 4 pixels, etc.

[0080] The sliding window slides horizontally and vertically, and after passing through the entire diamond line area, the entire diamond line area is traversed.

[0081] The electronic device may use the image area in each sliding window as a window image during the sliding process of the sliding window, thereby obtaining M window images.

[0082] Through this measure, the areas within adjacent windows may overlap during the sliding process of the sliding window. Therefore, multiple window images extracted from the diamond wire area may overlap. In this case, a more detailed identification of the sand distribution state can be performed at each position of the diamond wire area.

[0083] In one embodiment, before extracting the window image from the diamond wire region based on the sliding window, the size of the sliding window can be determined. The electronic device can convert the width and height of the sliding window based on the width and height of the diamond wire region to obtain the size of the sliding window. Here, the width and height of the diamond wire region, as well as the width and height of the sliding window, are both expressed in pixels.

[0084] For example, the width of the diamond wire area can be multiplied by a preset conversion coefficient to obtain the width of the sliding window; the height of the diamond wire area can be multiplied by the conversion coefficient to obtain the height of the sliding window. Here, the conversion coefficient can be configured as needed, generally a value between 0 and 1, and for example, the conversion coefficient can be 0.2, 0.25, etc.

[0085] Through the above measures, the size of the sliding window can be adaptively converted based on the size of the diamond wire area, so that a sliding window of appropriate size can extract a window image of the diamond wire area for identification of the sand distribution state.

[0086] In one embodiment, when executing step 131 to obtain the diamond pixel area of ​​the window image, for each window image in the M window images, the electronic device can select a diamond connected domain in the window image from a pre-acquired diamond connected domain set. The diamond connected domain set is obtained by performing a connected domain analysis on the pre-processed image. The diamond connected domain may be located on the boundary of the window image. In this case, the diamond connected domain is not completely in the window image. For the diamond connected domain, only the portion in the window image is selected.

[0087] The electronic device can use the pixel areas (number of pixels) corresponding to all diamond connected domains in the window image as the diamond pixel area of ​​the window image. The electronic device can accumulate the pixel areas corresponding to all diamond connected domains in the window image to obtain the diamond pixel area of ​​the window image.

[0088] Through the above measures, since there may be connected domains such as broken particles and white spots in the image that do not belong to diamonds, the diamond connected domains in the window image are selected from the diamond connected domain set to count the diamond pixel area, which can avoid the interference of the corresponding connected domains such as broken particles and white spots in calculating the correct diamond pixel area.

[0089] In one embodiment, when obtaining a diamond connected domain set, the electronic device may perform a connected domain analysis on the preprocessed image to obtain all connected domains corresponding to the diamond pixels. In the preprocessed image, diamond pixels may constitute a connected domain. In addition, pixels corresponding to broken particles and white spots may also constitute a connected domain. However, the number of pixels in the connected domain where broken particles and white spots are located is relatively small. After performing a connected domain analysis on the preprocessed image, multiple connected domains may be obtained. Further, connected domains with a pixel count less than a set number threshold are filtered out from the multiple connected domains, and connected domains with a remaining pixel count not less than the set number threshold are used as connected domains corresponding to diamond pixels. Here, the set number threshold may be configured as needed to characterize the minimum number of pixels in the connected domain where a single diamond is located.

[0090] The electronic device may add all connected domains corresponding to the diamond pixels to the diamond connected domain set.

[0091] Through the above measures, multiple connected domains can be obtained through connected domain analysis, and all connected domains corresponding to the diamond can be screened out with the minimum number of pixels in the connected domain where a single diamond is located to form a diamond connected domain set.

[0092] In one embodiment, during the process of preprocessing the diamond wire image to obtain the preprocessed image, the electronic device may convert the diamond wire image into a corresponding target grayscale image.

[0093] The diamond wire image is a three-channel image with the color channel order of BGR (Blue Green Red). The detection of the sand distribution state only requires a single-channel image. In order to reduce the amount of calculation and facilitate subsequent processing, the diamond wire image is converted into a single-channel grayscale image as the target grayscale image. For example, the three-channel RGB pixel value of each pixel in the colored diamond wire image can be converted 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, where Gray is the grayscale value of the pixel after conversion, R is the color intensity value of the color pixel in the red channel, G is the color intensity value of the color pixel in the green channel, and B is the color intensity value of the color pixel in the blue channel.

[0094] See also Figure 3 , is a schematic diagram of a diamond wire image provided by an embodiment of the present application, such as Figure 3As shown in the figure, the black part of the diamond wire image is the background; the gray part is the edge of the busbar, and the busbar is between the two busbar edges; the brightest part is the diamond on the busbar. The busbar and diamond together constitute the diamond wire.

[0095] The electronic device can cluster the pixels in the target grayscale image through three preset initial clustering 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. After obtaining the ternary image, the ternary image is converted into a binary image, and the binary image is used as a preprocessed image.

[0096] According to the first initial cluster center corresponding to the background, the second initial cluster center corresponding to the busbar, and the third initial cluster center corresponding to the diamond, the pixel values ​​of multiple pixels in the target grayscale image are clustered using the K-means clustering algorithm. During the clustering process, the cluster center will change. After the clustering is completed, three clusters can be obtained. Each cluster includes multiple pixels. After obtaining the three clusters, the electronic device can classify the pixels in each cluster, obtain the category information of the pixels in each cluster, and can mark the corresponding category information for each pixel.

[0097] In the present application, three different gray levels correspond to multiple background pixels, multiple diamond pixels, and multiple busbar pixels. Separating the background pixels, busbar pixels, and diamond pixels of the diamond wire in the ternary image can make the determined diamond pixels more accurate and improve the overall detection accuracy of the sand volume detection.

[0098] In the target grayscale image, the brightness of the pixel corresponding to diamond is the largest and the pixel value is the largest. Therefore, the result cluster center of the cluster where the pixel value corresponding to diamond is located is the largest. Here, the result cluster center is the actual cluster center of each cluster after clustering is completed. The electronic device can select the maximum value from the result cluster centers of the three clusters, and determine the category information of each pixel in the cluster corresponding to the selected maximum value as a diamond pixel. At this time, the pixels corresponding to the remaining two pixel values ​​can be determined as background pixels and busbar pixels, and these two types of pixels are classified as non-diamond pixels.

[0099] Furthermore, 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, and using the binary image as the preprocessed image.

[0100] Through the above measures, after the diamond wire image is converted into a target grayscale image, the pixels in the target grayscale image can be first divided by clustering to obtain diamond pixels and non-diamond pixels, and then corresponding pixel values ​​are set for the diamond pixels and non-diamond pixels respectively, thereby generating a preprocessed image corresponding to the diamond wire image.

[0101] After the preprocessed image is generated, the diamond wire region can be identified from the preprocessed image. The diamond wire region is the region where the diamond wire is located in the diamond wire image. Figure 4 , is a schematic diagram of a diamond wire area in a diamond wire image provided by an embodiment of the present application, such as Figure 4 As shown, the area between the upper boundary and the lower boundary of the diamond wire is the diamond wire area.

[0102] In one embodiment, see Figure 5 , is a flow chart of a method for identifying a diamond wire region provided in an embodiment of the present application, such as Figure 5 As shown, the method may include the following steps 510 to 540.

[0103] Step 510: summing the pixel values ​​of each row of pixels in the preprocessed image, and determining whether the summation result is greater than a preset numerical threshold.

[0104] Here, the numerical threshold is used to distinguish the diamond line boundary. The numerical threshold can be configured as needed and is adaptively adjusted based on the specified positive integer. If the specified positive integer is 1, the numerical threshold is smaller; if the specified positive integer is 255, the numerical threshold is larger.

[0105] The electronic device may scan each row of pixels in the preprocessed image row by row, and sum the pixel values ​​of the scanned row of pixels. After obtaining the summation result, it may be determined whether the summation result is greater than a numerical threshold.

[0106] Step 520: Scan the pixels of the first row of pixels whose sum is greater than the numerical threshold from the top row of pixels of the pre-processed image row by row, and use it as the upper boundary of the target diamond line.

[0107] From the top row of pixels in the preprocessed image, when scanning down row by row, if the sum of the scanned row of pixels is not greater than the numerical threshold, the scanning can continue. When the sum of the scanned first row of pixels is greater than the numerical threshold, this row of pixels can be used as the upper boundary of the target diamond line in the image.

[0108] Step 530: Scan upward row by row from the bottom row of pixels in the preprocessed image, and find the first row of pixels whose sum is greater than the numerical threshold, as the lower boundary of the target diamond line.

[0109] Step 540: The area between the upper boundary and the lower boundary is used as the diamond wire area.

[0110] From the bottom row of pixels in the preprocessed image, when scanning upwards row by row, if the sum of the scanned row of pixels is not greater than the numerical threshold, the scanning upwards can be continued. When the sum of the scanned first row of pixels is greater than the numerical threshold, this row of pixels can be used as the lower boundary of the target diamond line in the image.

[0111] After determining the upper boundary and the lower boundary, the area between the upper boundary and the lower boundary can be used as the diamond line area. Based on the diamond line area in the preprocessed image, the diamond line area in the denoised image and the diamond line area in the diamond line image can be determined accordingly.

[0112] Through the above measures, since the pixel value of the diamond corresponding pixel in the preprocessed image is a specified positive integer, and the pixel value of the non-diamond (motherline or background) corresponding pixel is zero, in the process of scanning pixels line by line and summing pixel values, if a diamond on the edge of the diamond line is encountered, the sum result will change significantly. Therefore, based on the numerical threshold, a row of pixels with a large number of diamond corresponding pixels can be effectively screened out, thereby accurately identifying the upper and lower boundaries of the target diamond line.

[0113] In one embodiment, after determining the grit distribution state for each diamond wire image of the target diamond wire, a comprehensive evaluation result of the grit distribution of the target diamond wire can be determined based on the multiple grit distribution states. The comprehensive evaluation result can characterize the grit distribution state of the entire target diamond wire.

[0114] Exemplarily, the electronic device can count the proportion of uneven distribution in multiple sand distribution states, and determine the grade interval to which the proportion belongs. Here, multiple grade intervals can be pre-configured, and each grade interval corresponds to an evaluation level of the sand distribution state. For example: the grade interval is greater than or equal to 80%, and the evaluation level is 4; the grade interval is greater than or equal to 50% and less than 80%, and the evaluation level is 3; the grade interval is greater than or equal to 20% and less than 50%, and the evaluation level is 2; the grade interval is less than 20%, and the evaluation level is 1. The higher the evaluation level, the more uneven the overall distribution state of the diamond sand on the target diamond wire.

[0115] After determining the grade interval to which the uneven distribution ratio belongs, an evaluation grade can be obtained, and the evaluation grade can be used as a comprehensive evaluation result of the sand amount distribution of the target diamond wire.

[0116] Through the above measures, due to the recognition results corresponding to each diamond wire image, the sand distribution state of a section of the target diamond wire can be characterized. By fusing multiple sand distribution states, a comprehensive evaluation result representing the overall sand distribution state of the target diamond wire can be obtained.

[0117] Figure 6 is a block diagram of a device for identifying the sand distribution state of a diamond wire according to an embodiment of the present invention. Figure 6 As shown, the device may include:

[0118] A preprocessing module 610 is used to preprocess the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of diamond pixels and a plurality of non-diamond pixels;

[0119] An extraction module 620, configured to extract M window images from the diamond line region of the preprocessed image, wherein M is an integer greater than 1, and the image regions corresponding to the M window images cover the diamond line region;

[0120] An acquisition module 630 is used to acquire the diamond area ratio of each window image in the M window images, and obtain M diamond area ratios corresponding to the M window images;

[0121] A comparison module 640 is used to compare the M diamond area proportions with the uneven distribution proportion threshold to obtain a comparison result;

[0122] The determination module 650 is used to determine the distribution state of the sand amount in the diamond wire image according to the comparison result.

[0123] In one embodiment, the extraction module 620 is further configured to:

[0124] According to a preset step length, the sliding window is controlled to slide in the horizontal and vertical directions of the diamond wire area until the entire diamond wire area is traversed;

[0125] The image areas within all the sliding windows obtained by traversal are taken as the M window images.

[0126] In one embodiment, the acquisition module 630 is further configured to:

[0127] For each window image in the M window images, obtaining a diamond pixel area of ​​the window image;

[0128] According to the diamond pixel area of ​​the window image and the total area of ​​the window pixels, the diamond area ratio of the window image is obtained;

[0129] The above operation is performed on each of the M window images to obtain the M diamond area proportions.

[0130] In one embodiment, the acquisition module 630 is further configured to:

[0131] For each window image in the M window images, a diamond connected domain in the window image is selected from a pre-acquired diamond connected domain set, and the pixel areas corresponding to all diamond connected domains in the window image are used as the diamond pixel area of ​​the window image, wherein the diamond connected set is obtained by performing connected domain analysis on the preprocessed image.

[0132] In one embodiment, the acquisition module 630 is further configured to:

[0133] Performing connected domain analysis on the preprocessed image to obtain all connected domains corresponding to diamond pixels;

[0134] All connected domains corresponding to the diamond pixels are added to the diamond connected domain set.

[0135] In one embodiment, the determination module 650 is further configured to:

[0136] If the comparison result indicates that there is at least one diamond area whose proportion is less than the uneven distribution proportion threshold, it is determined that the amount of sand in the diamond wire image is in an uneven sand distribution state;

[0137] If the comparison result indicates that the area proportions of the M diamonds are not less than the uneven distribution proportion threshold, it is determined that the amount of sand in the diamond wire image is in a uniform sand distribution state.

[0138] In one embodiment, the pre-processing module 610 is used to:

[0139] Converting the diamond wire image into a corresponding target grayscale image;

[0140] Clustering the pixel points in the target grayscale image through three preset initial clustering 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;

[0141] The ternary image is converted into a binary image, and the binary image is used as a preprocessed image; wherein the binary image includes a plurality of diamond pixels and a plurality of non-diamond pixels.

[0142] In one embodiment, the determination module 650 is further configured to:

[0143] After obtaining the grit distribution states of the target diamond wire corresponding to the plurality of diamond wire images, a comprehensive evaluation result of the grit distribution of the target diamond wire is determined based on the plurality of grit distribution states.

[0144] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method for identifying the sand distribution state of the diamond wire, and will not be repeated here.

[0145] like Figure 7 As shown, this embodiment provides an electronic device 1, including: at least one processor 11 and a memory 12, Figure 7 A processor 11 is taken as an example. The processor 11 and the memory 12 are connected via a bus 10. The memory 12 stores instructions that can be executed by the processor 11. The instructions are executed by the processor 11 so that the electronic device 1 can execute all or part of the process of the method in the above embodiment. In one embodiment, the electronic device 1 can be a host, a server, a server cluster, etc., for executing the method for identifying the sand distribution state of the diamond wire.

[0146] The memory 12 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0147] The present application also provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by the processor 11 to complete the method for identifying the sand distribution state of the diamond wire provided in the present application.

[0148] In several embodiments provided in the present application, the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0149] In addition, 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.

[0150] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments 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.

Claims

1. A method for identifying the sand distribution state of a diamond wire, 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 diamond pixels and a plurality of non-diamond pixels; Extracting M window images from the diamond line region of the preprocessed image, wherein M is an integer greater than 1, and image regions corresponding to the M window images cover the diamond line region; Obtaining the diamond area ratio of each window image in the M window images, and obtaining M diamond area ratios corresponding to the M window images; Compare the area proportions of the M diamonds with the uneven distribution proportion threshold to obtain a comparison result; According to the comparison result, the distribution state of the sand amount in the diamond wire image is determined.

2. The method according to claim 1, characterized in that: The extracting M window images from the diamond line region of the pre-processed image comprises: According to a preset step length, the sliding window is controlled to slide in the horizontal and vertical directions of the diamond wire area until the entire diamond wire area is traversed; The image areas within all the sliding windows obtained by traversal are taken as the M window images.

3. The method according to claim 1, characterized in that The obtaining of the diamond area ratio of each window image in the M window images to obtain the M diamond area ratios corresponding to the M window images includes: For each window image in the M window images, obtaining a diamond pixel area of ​​the window image; According to the diamond pixel area of ​​the window image and the total area of ​​the window pixels, the diamond area ratio of the window image is obtained; The above operation is performed on each of the M window images to obtain the M diamond area proportions.

4. The method according to claim 3, characterized in that The step of obtaining the diamond pixel area of ​​each window image in the M window images includes: For each window image in the M window images, a diamond connected domain in the window image is selected from a pre-acquired diamond connected domain set, and the pixel areas corresponding to all diamond connected domains in the window image are used as the diamond pixel area of ​​the window image, wherein the diamond connected set is obtained by performing connected domain analysis on the preprocessed image.

5. The method according to claim 4, characterized in that The step of obtaining the diamond connected domain set comprises: Performing connected domain analysis on the preprocessed image to obtain all connected domains corresponding to diamond pixels; All connected domains corresponding to the diamond pixels are added to the diamond connected domain set.

6. The method according to claim 1, characterized in that Determining the distribution state of the amount of sand in the diamond wire image according to the comparison result includes: If the comparison result indicates that there is at least one diamond area whose proportion is less than the uneven distribution proportion threshold, it is determined that the amount of sand in the diamond wire image is in an uneven sand distribution state; If the comparison result indicates that the area proportions of the M diamonds are not less than the uneven distribution proportion threshold, it is determined that the amount of sand in the diamond wire image is in a uniform sand distribution state.

7. The 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 corresponding target grayscale image; Clustering the pixels in the target grayscale image through three preset initial clustering 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 ternary image is converted into a binary image, and the binary image is used as a preprocessed image; wherein the binary image includes a plurality of diamond pixels and a plurality of non-diamond pixels.

8. The method according to claim 1, characterized in that: The method further comprises: After obtaining the grit distribution states of the target diamond wire corresponding to the plurality of diamond wire images, a comprehensive evaluation result of the grit distribution of the target diamond wire is determined based on the plurality of grit distribution states.

9. A device for identifying the sand distribution state of a diamond wire, characterized in that: include: A preprocessing module, used for preprocessing the diamond wire image to be detected to obtain a preprocessed image, wherein the preprocessed image includes a plurality of diamond pixels and a plurality of non-diamond pixels; An extraction module, used to extract M window images from the diamond line area of ​​the pre-processed image, wherein M is an integer greater than 1, and the image areas corresponding to the M window images cover the diamond line area; An acquisition module, used to acquire the diamond area ratio of each window image in the M window images, and obtain M diamond area ratios corresponding to the M window images; A comparison module, used for comparing the area proportions of the M diamonds with a threshold value of uneven distribution proportion to obtain a comparison result; A determination module is used to determine the distribution state of the sand amount in the diamond wire image according to the comparison result.

10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the method for identifying the sand distribution state of the diamond wire as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to complete the method for identifying the sand distribution state of the diamond wire according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Diamond abrasive wear rate determination method based on image processing

    CN108335285A

  • Method for detecting blue oil fitting processing quality

    CN111311534A

  • Diamond fretsaw surface abrasive particle distribution uniformity evaluation method

    CN112801973A

  • Diamond wire surface carborundum particle quality detection method based on machine vision

    CN113063705A

  • Geosynthetic fabric quality detection system

    CN116309671A

Cited By

  • CPG filter element detection method based on visual detection

    CN121141655A