Diamond wire exposure height detection method and device, electronic equipment and storage medium
By preprocessing, edge detection and straight line fitting of the diamond line image, the blade height of the diamond line is determined, which solves the problem of low detection efficiency and accuracy in the prior art, and achieves more efficient and accurate detection results.
Patent Information
- Application Number
- CN202311280783.9
- 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
In the prior art, the detection efficiency and accuracy of the blade height of the diamond wire are low, and mainly rely on manual operation micrometers for detection.
By acquiring the diamond line image, preprocessing is performed to separate the background, busbar and diamond pixel points, edge detection is performed and the boundary of the busbar is linearly fitted, the busbar midline is determined, and the distance between the diamond pixel point and the busbar midline is calculated to determine the blade height.
It improves the detection accuracy and efficiency of the diamond wire blade height, reduces the dependence of manual operation, and enhances the accuracy of the detection results.
Smart Images

Figure CN119762568A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of diamond wires, and more specifically, to a method, device, electronic device and computer-readable storage medium for detecting the cutting edge height of a diamond wire. Background Art
[0002] Diamond wire saw, also known as diamond wire, refers to a processing tool that uses electroplating, brazing or resin bonding to fix diamond abrasives on metal wires, and uses the hardness characteristics of diamond to process silicon wafers, sapphires or ceramics. At present, diamond wire saws are mostly manufactured using electroplating technology. The electroplating process uses metal wire as the matrix and diamond particles as the abrasive. The diamond particles are deposited on the surface of the metal wire through the electroplating diamond wire saw tooling to produce a diamond wire production method for diamond wire saws.
[0003] The diamond wire needs to have its blade height tested during production. The so-called blade height is the height of the diamond powder exposed from the metal wire as the matrix. However, in the prior art, the blade height of the diamond wire is tested by manually operating a micrometer, which results in low testing efficiency and accuracy. Summary of the invention
[0004] The purpose of the present application is to provide a method, device, electronic device and computer-readable storage medium for detecting the cutting edge height of a diamond wire, which can improve the detection efficiency and detection accuracy of the cutting edge height of a diamond wire.
[0005] In a first aspect, the present application provides a method for detecting the blade height of a diamond wire, comprising: acquiring a diamond wire image; preprocessing the diamond wire image to obtain a preprocessed image, wherein the preprocessed image includes a plurality of background pixels, a plurality of busbar pixels and a plurality of diamond pixels; performing edge detection on the preprocessed image to obtain a first boundary and a second boundary of the busbar; performing straight line fitting on the first boundary to obtain a first fitting straight line, and performing straight line fitting on the second boundary to obtain a second fitting straight line; determining a busbar centerline of the busbar based on the first fitting straight line and the second fitting straight line; determining a target blade height of the diamond wire in the diamond wire image based on the distance between the plurality of diamond pixels and the busbar centerline.
[0006] Compared with the prior art, in the method for detecting the blade height of the diamond wire provided in the embodiment of the present application, straight line fitting is performed on the first boundary and the second boundary of the busbar respectively to obtain the first fitting straight line and the second fitting straight line, thereby reducing the influence of the diamond pixel points in the image on the detection result of the boundary of the busbar. The first fitting straight line and the second fitting straight line obtained by fitting are more matched with the actual boundary of the busbar. Therefore, the center line of the busbar determined according to the first fitting straight line and the second fitting straight line are also more matched with the actual center line of the busbar, so that the target blade height of the diamond wire in the diamond wire image obtained according to the distance between the diamond pixel points and the center line of the busbar is also more accurate, thereby achieving the effect of improving the detection accuracy of the blade height of the diamond wire; in addition, compared with the prior art in which the blade height is detected and identified manually, the blade height of the diamond wire is directly obtained by performing image processing and analysis on the diamond wire image in the embodiment of the present application, and the detection efficiency of the blade height of the diamond wire is also improved.
[0007] In an optional embodiment, determining the target blade height of the diamond wire in the diamond wire image based on the distances between the multiple diamond pixel points and the busbar centerline includes: obtaining the inner diameter value of the diamond wire in the diamond wire image based on the distance between the first fitting straight line and the second fitting straight line; determining the upper blade height of the diamond wire in the diamond wire image based on the first distance and the inner diameter value, the first distance being the maximum value of the distances between all diamond pixel points located on the upper side of the busbar centerline and the busbar centerline; determining the lower blade height of the diamond wire in the diamond wire image based on the second distance and the inner diameter value, the second distance being the maximum value of the distances between all diamond pixel points located on the lower side of the busbar centerline and the busbar centerline; determining the target blade height based on the upper blade height and the lower blade height.
[0008] In this way, the upper blade height and the lower blade height of the diamond wire in the diamond wire image are respectively obtained according to the diamond pixel points distributed on the upper and lower sides of the busbar centerline, and then the target blade height is determined according to the upper blade height and the lower blade height. The distribution of diamond pixel points on the upper and lower sides of the busbar centerline can be comprehensively considered to determine the target blade height, thereby further improving the detection accuracy of the target blade height, thereby improving the detection accuracy of the diamond wire blade height.
[0009] In an optional embodiment, determining the upper blade height of the diamond wire in the diamond wire image based on the first distance and the inner diameter value includes: determining the upper blade height based on a first difference between the first distance and the radius value, wherein the radius value is half of the inner diameter value.
[0010] In an optional embodiment, determining the lower blade height of the diamond wire in the diamond wire image according to the second distance and the inner diameter value includes: determining the lower blade height according to a second difference between the second distance and the radius value.
[0011] In an optional embodiment, obtaining the inner diameter value of the diamond wire in the diamond wire image according to the distance between the first fitting straight line and the second fitting straight line includes: setting a plurality of sampling points on the centerline of the generatrix; for each of the plurality of sampling points, obtaining the sum of the distances between the sampling point and the first fitting straight line and the second fitting straight line; and determining the inner diameter value according to the mean of all the sums of the distances corresponding to the plurality of sampling points.
[0012] In this way, the inner diameter value is determined according to the mean of the distance between the sampling point and the first fitting straight line and the second fitting straight line, which can reduce the influence of the error of the first fitting straight line and the second fitting straight line in the fitting process on the inner diameter value, thereby further improving the detection accuracy of the diamond wire blade height.
[0013] In an optional embodiment, the preprocessing of the diamond wire image includes: converting the diamond wire image into a grayscale image; clustering the pixels in the grayscale image through three preset clustering centers to obtain a ternary image, and using the ternary image as the preprocessed image.
[0014] In an optional embodiment, if the diamond wire roll to be tested corresponds to multiple diamond wire images, the method further includes: for each diamond wire image in the multiple diamond wire images, obtaining the target blade height of the diamond wire in the diamond wire image; and determining the wire roll blade height of the diamond wire roll to be tested based on the target blade height of each diamond wire image.
[0015] In this way, the wire coil blade height of the diamond wire roll to be tested is determined based on the target blade height of each diamond wire image among the multiple diamond wire images corresponding to the diamond wire roll to be tested, thereby determining the target blade height of most of the diamond wires in the diamond wire roll to be tested, so that the wire coil blade height of the diamond wire roll to be tested obtained according to the target blade height of most of the diamond wires is more accurate.
[0016] In a second aspect, the present application provides a diamond wire blade height detection device, including an image acquisition module, the image acquisition module being used to acquire a diamond wire image; an image preprocessing module, the image preprocessing module being used to preprocess the diamond wire image to obtain a preprocessed image, wherein the preprocessed image includes multiple background pixel points, multiple busbar pixel points and multiple diamond pixel points; an edge detection module, the edge detection module being used to perform edge detection on the diamond wire image to obtain a first boundary and a second boundary of the busbar; a straight line fitting module, the straight line fitting module being used to perform straight line fitting on the first boundary to obtain a first fitting straight line, and perform straight line fitting on the second boundary to obtain a second fitting straight line; and a blade height determination module, the blade height determination module being used to determine the busbar centerline of the busbar based on the first fitting straight line and the second fitting straight line, and determine the target blade height of the diamond wire in the diamond wire image based on the distance between the multiple diamond pixel points and the busbar centerline.
[0017] In a third aspect, the present application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the diamond wire blade height detection method as described in any one of the aforementioned embodiments.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the diamond wire blade height detection method described in any one of the aforementioned embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A schematic flow chart of a method for detecting the height of a diamond wire provided in the first embodiment of the present application;
[0021] Figure 2 A schematic diagram of the process of obtaining a ternary image in the diamond wire blade height detection method provided in the first embodiment of the present application;
[0022] Figure 3 A schematic diagram of a ternary image of a diamond wire in a method for detecting the height of a diamond wire provided in Example 1 of the present application;
[0023] Figure 4 A schematic diagram of a process for obtaining the inner diameter value of a diamond wire in a method for detecting the height of a diamond wire provided in Embodiment 1 of the present application;
[0024] Figure 5 A schematic diagram of the structure of a diamond wire blade height detection device provided in Example 2 of the present application;
[0025] Figure 6 This is a schematic diagram of the structure of the electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0027] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0028] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0029] In the description of the present application, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, it is based on the orientation or position relationship shown in the drawings, or is the orientation or position relationship in which the product of the invention is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application.
[0030] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0031] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.
[0032] Embodiment 1 of the present application provides a method for detecting the height of a diamond wire blade. Figure 1As shown, the method for detecting the height of the diamond wire blade includes:
[0033] Step S101: Acquire a diamond wire image.
[0034] In some embodiments of the present application, the image of the diamond wire roll to be tested can be captured in real time by a camera module, and each image captured in real time can be used as a diamond wire image; or after the camera module has captured all the images of the diamond wire roll to be tested, they can be stored in a server, and then one or more captured images can be obtained from the server as diamond wire images.
[0035] Among them, the camera module can be a camera, a process camera, a video camera and other equipment, which can be flexibly configured according to actual conditions, and this manual does not impose specific restrictions.
[0036] Step S102: pre-processing the diamond wire image to obtain a pre-processed image.
[0037] In this step, the preprocessed image can be a ternary image, that is, the diamond wire image is converted into a ternary image. The ternary image is to map the common 256 grayscale levels (or higher grayscale levels) into an image including 3 different grayscale levels. In this application, the three different grayscale levels correspond to a plurality of background pixels, a plurality of diamond pixels, and a plurality of busbar pixels. Taking the diamond wire image as a color image as an example, the specific steps of the preprocessing process are as follows: Figure 2 As shown, including:
[0038] Step S201: converting the diamond wire image into a grayscale image.
[0039] In this step, converting the colored diamond wire image into a grayscale image can specifically be converting the three-channel RGBA pixel value of each pixel in the colored diamond wire image into a single-channel grayscale value. For example, the formula Gray=R*0.299+G*0.587+B*0.114 can be used for conversion, wherein Gray is the grayscale value of the pixel after conversion, R is the color intensity value of the colored pixel in the red channel, G is the color intensity value of the colored pixel in the green channel, and B is the color intensity value of the colored pixel in the blue channel.
[0040] Step S202: clustering the pixels in the grayscale image using three preset cluster centers to obtain a ternary image.
[0041] 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.
[0042] In some embodiments of the present application, the three randomly selected set values may be, for example, 50, 100, and 150. This set value is more consistent with the grayscale values of background pixels, diamond pixels, and busbar pixels in actual applications. Clustering operations using this set value can better separate diamond pixels in a single-channel grayscale image, improve the accuracy of diamond pixel separation, and thus improve the accuracy of the final diamond wire sand amount detection result.
[0043] In different embodiments of the present application, different clustering algorithms can be used to perform clustering operations on the grayscale values of multiple pixels. For example, clustering algorithms such as kmeans clustering algorithm, Mean-Shift clustering algorithm, and composite clustering algorithm can be used to perform clustering operations on the grayscale values of multiple pixels. Taking the kmeans clustering algorithm as an example, the absolute difference between the grayscale value of each pixel and three set values can be calculated respectively. The cluster center with the smallest absolute difference is the cluster center of the pixel. It is judged whether the clustering algorithm has converged (for example, it can be judged whether the sum of the absolute differences between all pixels belonging to the same cluster center and the cluster center is greater than a certain set threshold. If it is greater than the set threshold, the clustering algorithm has not converged. On the contrary, if it is less than or equal to the set threshold, the clustering algorithm has converged. Alternatively, it can also be judged whether the number of operations reaches the threshold number, etc.), if the clustering algorithm has converged Convergence, then the clustering result with the largest grayscale value at this time can be used as the diamond pixel, the clustering result with the smallest grayscale value can be used as the background pixel, and the clustering result with the grayscale value in the middle can be used as the busbar pixel; on the contrary, if the clustering algorithm does not converge, the cluster center can be recalculated according to the pixel grayscale values of the pixels belonging to the same cluster center, for example, the mean of the pixel grayscale values of all pixels whose cluster center is any set value can be used as the new cluster center of the diamond pixel, and the absolute difference between the pixel grayscale value of each pixel and the new cluster center is calculated again until the clustering algorithm converges. In the present application, three different grayscale levels correspond to multiple background pixels, multiple diamond pixels, and multiple busbar pixels, respectively. The background pixels, busbar pixels, and diamond pixels of the diamond line are separated in the ternary image, which can make the accuracy of the determined diamond pixels higher and improve the overall detection accuracy of the sand volume detection.
[0044] Step S103: performing edge detection on the preprocessed image to obtain a first boundary and a second boundary of a busbar.
[0045] In this step, an image edge detection algorithm can be used to perform edge detection on the ternary image to obtain the first boundary and the second boundary of the busbar. In different embodiments of the present application, the image edge detection algorithm can use various operators such as cross differential operator, Prewitt operator, Sobel operator, Canny operator, Laplacian operator, etc. to perform edge detection to obtain the boundary of the busbar. In an embodiment of the present application, since the length of the diamond wire is much larger than its radius, in the diamond wire image, the boundary of the busbar usually includes two relative boundaries, namely the relative first boundary and the second boundary.
[0046] Step S104: performing straight line fitting on the first boundary to obtain a first fitting straight line, and performing straight line fitting on the second boundary to obtain a second fitting straight line.
[0047] In this step, a set fitting algorithm can be used to perform straight-line fitting on the first boundary and the second boundary. In different embodiments of the present application, the set fitting algorithm can be, for example, various fitting algorithms such as least squares method, gradient descent method, linear regression method, etc., which can be used according to actual needs. In addition, in an embodiment of the present application, for the first boundary and the second boundary in the same ternary image, the same fitting algorithm can be used for straight-line fitting, or different fitting algorithms can be used for straight-line fitting, such as using the least squares method to perform straight-line fitting on the first boundary, and using the linear regression method to perform straight-line fitting on the second boundary, etc., which can be used according to actual needs.
[0048] Step S105: Determine the busbar centerline of the busbar according to the first fitting straight line and the second fitting straight line.
[0049] In this step, the centerline of the busbar can be determined based on the distance between the first fitting straight line and the second fitting straight line, that is, the distance between any point on the centerline of the busbar and the first fitting straight line is equal to the distance between any point on the centerline of the busbar and the second fitting straight line. It can be understood that in some other embodiments of the present application, the axis of symmetry between the first fitting straight line and the second fitting straight line can also be used as the centerline of the busbar, which can be used according to actual needs.
[0050] Step S106: determining a target cutting height of the diamond wire in the diamond wire image according to the distances between the plurality of diamond pixel points and the center line of the generatrix.
[0051] In this step, if Figure 3As shown, the inner diameter value r of the diamond wire in the diamond wire image can be obtained according to the distance between the first fitting straight line A1 and the second fitting straight line A2. The maximum value of the distance between all diamond pixel points K located on the upper side of the busbar midline and the busbar midline is obtained as the first distance k1, and the upper blade height of the diamond wire in the diamond wire image is determined according to the first distance k1 and the inner diameter value r. The maximum value of the distance between all diamond pixel points K located on the lower side of the busbar midline and the busbar midline is obtained as the second distance k2, and the lower blade height of the diamond wire in the diamond wire image is determined according to the second distance k2 and the inner diameter value r. According to the upper blade height and the lower blade height, the target blade height of the diamond wire in the current diamond wire image is determined.
[0052] Among them, in some embodiments of the present application, the upper blade height of the diamond wire in the diamond wire image is determined according to the first distance k1 and the inner diameter value r, specifically, a value of half of the inner diameter value r is obtained as the radius value r / 2 of the diamond wire in the diamond wire image, a first difference k1-r / 2 between the first distance k1 and the radius value r / 2 is obtained, and the upper blade height is determined according to the first difference k1-r / 2. The upper blade height can be, for example, directly the first difference k1-r / 2, or can also be a value of a preset multiple of the first difference k1-r / 2, or can also be the sum / difference of the first difference k1-r / 2 and a preset constant value, etc., and can be set according to actual needs.
[0053] In some embodiments of the present application, the lower blade height of the diamond wire in the diamond wire image is determined based on the second distance k2 and the inner diameter value r, specifically by obtaining a value of half of the inner diameter value r as the radius value r / 2 of the diamond wire in the current diamond wire image, obtaining a second difference k2-r / 2 between the second distance k2 and the radius value r / 2, and determining the lower blade height based on the second difference k2-r / 2. The lower blade height can be, for example, directly the second difference k2-r / 2, or can also be a value of a preset multiple of the second difference k2-r / 2, or can also be the sum / difference of the second difference k2-r / 2 and a preset constant value, etc., and can be specifically set according to actual needs.
[0054] Among them, in some embodiments of the present application, according to the distance between the first fitting straight line A1 and the second fitting straight line A2, the inner diameter value r of the diamond wire in the diamond wire image can be obtained by taking the minimum value of the distance between the first fitting straight line and the second fitting straight line as the inner diameter value of the diamond wire. In other embodiments of the present application, the maximum value of the distance between the first fitting straight line and the second fitting straight line can be taken as the inner diameter value of the diamond wire. Or in some other embodiments of the present application, the mean value of the distance between the first fitting straight line and the second fitting straight line can be taken as the inner diameter value of the diamond wire. The specific method can be selected according to actual needs.
[0055] In some embodiments of the present application, according to the distance between the first fitting straight line A1 and the second fitting straight line A2, the inner diameter value r of the diamond wire in the diamond wire image can be obtained as follows: Figure 4 As shown, the specific steps include:
[0056] Step S301: setting a plurality of sampling points on the busbar centerline.
[0057] Step S302: for each sampling point among the plurality of sampling points, obtain the sum of the distances between the sampling point and the first fitting straight line and the second fitting straight line.
[0058] In this step, for each sampling point, the distance between the sampling point and the first fitting straight line can be obtained as the third distance, the distance between the sampling point and the second fitting straight line can be obtained as the fourth distance, and the sum of the third distance and the fourth distance can be used as the distance sum corresponding to the sampling point. For multiple sampling points, the distance sum corresponding to each sampling point can be obtained using the above method, and multiple distance sums of the same number can be obtained for multiple sampling points.
[0059] Step S303: Determine the inner diameter value according to the average of all the distances and the distances corresponding to the multiple sampling points.
[0060] In different embodiments of the present application, the mean of the sum of all distances may be directly used as the inner diameter value, or a set multiple of the mean of the sum of all distances may be used as the inner diameter value, or the difference / sum of the mean of the sum of all distances and a set constant value may be used as the inner diameter value, and various methods may be used according to actual needs.
[0061] In some embodiments of the present application, the target blade height of the diamond wire in the current diamond wire image is determined based on the upper blade height and the lower blade height. Specifically, the upper blade height and the lower blade height can be directly used as the target blade height, or the average / maximum / minimum value of the upper blade height and the lower blade height can be used as the target blade height. The specific setting can be based on actual needs.
[0062] Thus, compared with the prior art, in the method for detecting the blade height of the diamond wire provided in the embodiment of the present application, straight line fitting is performed on the first boundary and the second boundary of the busbar respectively to obtain the first fitting straight line and the second fitting straight line, thereby reducing the influence of the diamond pixel points in the image on the detection result of the boundary of the busbar. The first fitting straight line and the second fitting straight line obtained by fitting are more matched with the actual boundary of the busbar. Therefore, the center line of the busbar determined according to the first fitting straight line and the second fitting straight line are also more matched with the actual center line of the busbar, so that the target blade height of the diamond wire in the diamond wire image obtained according to the distance between the diamond pixel points and the center line of the busbar is also more accurate, thereby achieving the effect of improving the detection accuracy of the blade height of the diamond wire; in addition, compared with the prior art in which the blade height is detected and identified manually, the blade height of the diamond wire is directly obtained by performing image processing and analysis on the diamond wire image in the embodiment of the present application, and the detection efficiency of the blade height of the diamond wire is also improved.
[0063] In another embodiment, if the diamond wire reel to be tested corresponds to multiple diamond wire images, for each of the multiple diamond wire images, a target blade height of the diamond wire in the diamond wire image is obtained; based on the target blade height of each diamond wire image, the wire reel blade height of the diamond wire reel to be tested is determined.
[0064] In the specific implementation process, since the diamond wire reel to be tested is usually more than 100 kilometers, the number of multiple diamond wire images corresponding to the diamond wire reel to be tested is usually more than 1,000. For each diamond wire image, the diamond wire is processed through steps S101-S106 to obtain the target blade height of the diamond wire image.
[0065] Specifically, after obtaining the target blade height of each diamond wire image, if the target blade height includes the upper blade height and the lower blade height of the diamond wire image, the upper blade height of the diamond wire roll to be tested can be determined according to the average value of all upper blade heights corresponding to multiple diamond wire images; the lower blade height of the diamond wire roll to be tested can be determined according to the average value of all lower blade heights corresponding to multiple diamond wire images; the wire roll blade height of the diamond wire roll to be tested can be determined according to the upper blade height and the lower blade height.
[0066] Specifically, the average value of all upper blade heights corresponding to multiple diamond wire images can be directly used as the upper blade height of the wire roll, or the product of the average value of all upper blade heights corresponding to multiple diamond wire images and a set weight can be used as the upper blade height of the wire roll, or the sum or difference of the average value of all upper blade heights corresponding to multiple diamond wire images and a set value can be used as the upper blade height of the wire roll.
[0067] Similarly, the average value of all lower blade heights corresponding to multiple diamond wire images can be directly used as the lower blade height of the wire roll, or the product of the average value of all lower blade heights corresponding to multiple diamond wire images and the set weight can be used as the lower blade height of the wire roll, or the sum or difference of the average value of all lower blade heights corresponding to multiple diamond wire images and the set value can be used as the lower blade height of the wire roll.
[0068] In some embodiments of the present application, the upper blade height of the wire roll and the lower blade height of the wire roll can be directly used as the wire roll blade height, or the average / maximum / minimum value of the upper blade height of the wire roll and the lower blade height of the wire roll can be used as the wire roll blade height. The specific setting can be made according to actual needs.
[0069] In this way, since multiple diamond wire images usually correspond to most of the diamond wires in the diamond wire roll to be tested, the target blade height of most of the diamond wires in the diamond wire roll to be tested can be obtained, so that the accuracy of the wire roll blade height of the diamond wire roll to be tested obtained based on the target blade height of most of the diamond wires is higher.
[0070] Compared with the prior art, in the diamond wire blade height detection method provided in the first embodiment of the present application, straight line fitting is performed on the first boundary and the second boundary of the busbar respectively to obtain the first fitting straight line and the second fitting straight line, which reduces the influence of the diamond pixel points in the image on the detection result of the boundary of the busbar. The first fitting straight line and the second fitting straight line obtained by fitting are more matched with the actual boundary of the busbar. Therefore, the centerline of the busbar determined according to the first fitting straight line and the second fitting straight line is also more matched with the actual centerline of the busbar. The target blade height of the diamond wire in the diamond wire image obtained according to the distance between the diamond pixel points and the centerline of the busbar is also more accurate. Finally, the diamond wire blade height of the diamond wire obtained according to the target blade height is also more accurate, thereby achieving the effect of improving the detection accuracy of the diamond wire blade height. In addition, compared with the prior art in which the blade height is detected and identified manually, the blade height of the diamond wire is directly obtained by performing image processing and analysis on the diamond wire image in the embodiment of the present application, and the detection efficiency of the diamond wire blade height is also improved.
[0071] Embodiment 2 of the present application relates to a diamond wire blade height detection device, such as Figure 5As shown, it includes: an image acquisition module 401, which is used to acquire a diamond wire image; an image preprocessing module 402, which is used to preprocess the diamond wire image to obtain a preprocessed image, wherein the preprocessed image includes multiple background pixel points, multiple busbar pixel points and multiple diamond pixel points; an edge detection module 403, which is used to perform edge detection on the diamond wire image to obtain a first boundary and a second boundary of the busbar; a straight line fitting module 404, which is used to perform straight line fitting on the first boundary to obtain a first fitting straight line, and perform straight line fitting on the second boundary to obtain a second fitting straight line; a blade height determination module 405, which is used to determine the busbar centerline of the busbar according to the first fitting straight line and the second fitting straight line, and determine the target blade height of the diamond wire in the diamond wire image according to the distances between the multiple diamond pixel points and the busbar centerline.
[0072] Compared with the prior art, in the diamond wire blade height detection device provided in the embodiment of the present application, the edge detection module 403 is used to perform edge detection on the diamond wire image to obtain the first boundary and the second boundary of the busbar, and the straight line fitting module 404 performs straight line fitting on the first boundary and the second boundary of the busbar respectively to obtain the first fitting straight line and the second fitting straight line, thereby reducing the influence of the diamond pixel points in the image on the detection result of the boundary of the busbar. The first fitting straight line and the second fitting straight line fitted by the straight line fitting module 404 are more matched with the actual boundary of the busbar, so the blade height determination module 405 determines the busbar according to the first fitting straight line and the second fitting straight line. The center line is more closely matched with the actual center line of the busbar, and the target blade height of the diamond wire in the diamond wire image obtained by the blade height determination module 405 according to the distance between the diamond pixel point and the center line of the busbar is also more accurate. Finally, the diamond wire blade height of the diamond wire obtained by the blade height determination module 405 according to the target blade height is also more accurate, thereby achieving the effect of improving the detection accuracy of the diamond wire blade height; in addition, compared with the prior art in which the blade height is detected and identified manually, the blade height of the diamond wire is directly obtained by performing image processing and analysis on the diamond wire image in the embodiment of the present application, and the detection efficiency of the diamond wire blade height is also improved.
[0073] Furthermore, in some embodiments of the present application, the image preprocessing module 402 is specifically used to: convert the diamond wire image into a grayscale image; cluster the pixels in the grayscale image through three preset clustering centers to obtain a ternary image, and use the ternary image as a preprocessed image.
[0074] In an optional embodiment, the blade height determination module 405 is also used to: obtain the inner diameter value of the diamond wire in the diamond wire image according to the distance between the first fitting straight line and the second fitting straight line; determine the upper blade height of the diamond wire in the diamond wire image according to the first distance and the inner diameter value, the first distance being the maximum value of the distance between all diamond pixel points located on the upper side of the busbar centerline and the busbar centerline; determine the lower blade height of the diamond wire in the diamond wire image according to the second distance and the inner diameter value, the second distance being the maximum value of the distance between all diamond pixel points located on the lower side of the busbar centerline and the busbar centerline; determine the target blade height according to the upper blade height and the lower blade height.
[0075] In an optional implementation, the upper blade height determination module 405 is further used to determine the upper blade height according to a first difference between the first distance and a radius value, wherein the radius value is half of the inner diameter value.
[0076] In an optional implementation, the blade height determination module 405 is further configured to determine the lower blade height according to a second difference between the second distance and the radius value.
[0077] In an optional embodiment, the blade height determination module 405 is also used to: set multiple sampling points on the center line of the busbar; for each of the multiple sampling points, obtain the sum of the distances between the sampling point and the first fitting straight line and the second fitting straight line; and determine the inner diameter value based on the average of all the sums of the distances corresponding to the multiple sampling points.
[0078] In an optional embodiment, the blade height determination module 405 is also used to obtain the target blade height of the diamond wire in the diamond wire image for each of the multiple diamond wire images if the diamond wire roll to be tested corresponds to multiple diamond wire images; and determine the blade height of the diamond wire roll to be tested based on the target blade height of each diamond wire image.
[0079] Embodiment 3 of the present application relates to an electronic device, such as Figure 6 As shown, it includes: at least one processor 601; and a memory 602 that is communicatively connected to the at least one processor 601; wherein the memory 602 stores instructions that can be executed by the at least one processor 601, and the instructions are executed by the at least one processor 601, so that the at least one processor 601 can execute the diamond wire blade height detection method in the above-mentioned embodiments.
[0080] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0081] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0082] Embodiment 4 of the present application relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiment is implemented.
[0083] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0084] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for detecting the height of a diamond wire blade, characterized in that: include: Get the diamond wire image; Preprocessing the diamond wire image to obtain a preprocessed image, wherein the preprocessed image includes a plurality of background pixel points, a plurality of busbar pixel points, and a plurality of diamond pixel points; Perform edge detection on the preprocessed image to obtain a first boundary and a second boundary of a busbar; Performing straight line fitting on the first boundary to obtain a first fitting straight line, and performing straight line fitting on the second boundary to obtain a second fitting straight line; Determine a busbar midline of the busbar according to the first fitting straight line and the second fitting straight line; A target cutting height of the diamond wire in the diamond wire image is determined according to the distances between the plurality of diamond pixel points and the center line of the generatrix.
2. The method for detecting the diamond wire cutting height according to claim 1, characterized in that: The step of determining a target cutting height of the diamond wire in the diamond wire image according to the distances between the plurality of diamond pixel points and the center line of the generatrix comprises: Acquire the inner diameter value of the diamond wire in the diamond wire image according to the distance between the first fitting straight line and the second fitting straight line; Determine the upper blade height of the diamond wire in the diamond wire image according to the first distance and the inner diameter value, wherein the first distance is the maximum value of the distance between all diamond pixel points located above the generatrix midline and the generatrix midline; Determine the lower blade height of the diamond wire in the diamond wire image according to the second distance and the inner diameter value, wherein the second distance is the maximum value of the distance between all diamond pixel points located below the center line of the generatrix and the center line of the generatrix; The target blade height is determined according to the upper blade height and the lower blade height.
3. The method for detecting the diamond wire cutting height according to claim 2, characterized in that: Determining the upper blade height of the diamond wire in the diamond wire image according to the first distance and the inner diameter value includes: The upper blade height is determined according to a first difference between the first distance and a radius value, wherein the radius value is half of the inner diameter value.
4. The method for detecting the diamond wire cutting height according to claim 3, characterized in that: Determining the lower blade height of the diamond wire in the diamond wire image according to the second distance and the inner diameter value includes: The lower blade height is determined according to a second difference between the second distance and the radius value.
5. The method for detecting the diamond wire cutting height according to claim 2, characterized in that: The obtaining the inner diameter value of the diamond wire in the diamond wire image according to the distance between the first fitting straight line and the second fitting straight line includes: Setting a plurality of sampling points on the busbar midline; For each sampling point among the plurality of sampling points, obtaining a sum of the distances between the sampling point and the first fitting straight line and the second fitting straight line; The inner diameter value is determined according to the average of all the distances and the distances corresponding to the multiple sampling points.
6. The method for detecting the diamond wire cutting height according to claim 1, characterized in that: The preprocessing of the diamond wire image comprises: Converting the diamond wire image into a grayscale image; The pixels in the grayscale image are clustered using three preset cluster centers to obtain a ternary image, and the ternary image is used as the preprocessed image.
7. The method for detecting the diamond wire cutting height according to claim 1, characterized in that: If the diamond wire coil to be tested corresponds to a plurality of diamond wire images, the method further includes: For each diamond wire image in the plurality of diamond wire images, obtaining a target blade height of the diamond wire in the diamond wire image; The wire coil blade height of the diamond wire coil to be tested is determined according to the target blade height of each diamond wire image.
8. A diamond wire blade height detection device, characterized in that: include: An image acquisition module, wherein the image acquisition module is used to acquire a diamond wire image; An image preprocessing module, the image preprocessing module is used to preprocess the diamond wire image to obtain a preprocessed image, wherein the preprocessed image includes a plurality of background pixel points, a plurality of busbar pixel points and a plurality of diamond pixel points; An edge detection module, the edge detection module is used to perform edge detection on the preprocessed image to obtain a first boundary and a second boundary of a busbar; A straight line fitting module, the straight line fitting module is used to perform straight line fitting on the first boundary to obtain a first fitting straight line, and perform straight line fitting on the second boundary to obtain a second fitting straight line; A blade height determination module is used to determine the busbar centerline of the busbar based on the first fitting straight line and the second fitting straight line, and to determine the target blade height of the diamond wire in the diamond wire image based on the distance between the multiple diamond pixel points and the busbar centerline.
9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the diamond wire cutting height detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: The computer program is executed by a processor to implement the diamond wire cutting height detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Rapid multiple target segmentation method based on three-valued image clustering
CN103473785A
Electroplated diamond fretsaw surface image acquisition device and image splicing method
CN112669208A
Method and device for measuring transverse vibration of diamond fretsaw
CN115082397A
Cited By
Method for detecting number of effective exposed abrasive particles of diamond fretsaw
CN121053061A