A method, system, equipment and medium for visual quality inspection of surface defects of diamond cutting tools

By using a single-channel grayscale camera and a zero-angle ring light source to collect diamond tool images, perform pre-processing, texture extraction, correction and projection processing, automated detection of diamond tool surface defects is achieved, solving the subjectivity, efficiency and accuracy of traditional quality inspection methods, and improving detection efficiency and accuracy.

CN118111993BActive Publication Date: 2025-04-18SHENZHEN POLYTECHNIC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410057780.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-12
Publication Date
2025-04-18
Estimated Expiration
2044-01-12

AI Technical Summary

Technical Problem

The traditional visual quality inspection method of diamond tools relies on manual visual inspection, and has problems such as strong subjectivity, low efficiency, poor accuracy and high cost, making it difficult to meet the needs of large-scale production and real-time monitoring.

Method used

A single-channel grayscale camera and a zero-angle ring light source are used to collect diamond tool images, perform pre-processing, texture extraction, correction and projection processing, and defect detection is carried out through texture projection line diagram to achieve automated detection.

Benefits of technology

It improves the accuracy and efficiency of quality inspection, reduces labor costs, ensures the stability and consistency of product quality, and meets the needs of large-scale production and real-time monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118111993B_ABST
    Figure CN118111993B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system, equipment and medium for visual quality inspection of diamond tool surface defects. The method includes: using a single-channel grayscale camera and a zero-angle annular light source to collect diamond tool images; preprocessing the diamond tool images to obtain preprocessed diamond tool images; extracting the texture of the preprocessed diamond tool images to obtain texture images; correcting the texture images to obtain corrected texture images; projecting the corrected texture images on the horizontal and vertical axes to obtain texture projection line graphs; and performing defect detection based on the texture projection line graphs. The present application realizes automated detection of surface defects of diamond tools, thereby replacing detection methods that rely on subjective experience estimation of the human eye, and improving the accuracy and efficiency of quality inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of defect detection technology, and in particular to a method, system, equipment and medium for visual quality inspection of surface defects of diamond cutting tools. Background Art

[0002] The demand for visual quality inspection of diamond tools mainly comes from improving automated production efficiency, ensuring product quality consistency, improving quality inspection accuracy, and meeting the requirements of large-scale production and real-time monitoring.

[0003] The traditional visual quality inspection of diamond tools mainly relies on manual inspection, which has the following limitations:

[0004] (1) High subjectivity: Due to differences in vision, experience, and fatigue, different inspectors may have different judgments on the same defect, resulting in poor consistency in the inspection results; (2) Low efficiency: Manual visual inspection requires a lot of manpower and is slow, which cannot meet the needs of large-scale production; (3) Poor accuracy: Due to the limited resolution of the human eye, some tiny defects, such as tiny scratches or flaws on the surface of diamond tools, are often difficult to detect through manual visual inspection; (4) High cost: Manual quality inspection requires a lot of manpower and time costs, which puts pressure on the production costs of enterprises. Therefore, the above problems need to be solved. Summary of the invention

[0005] The main purpose of this application is to overcome the shortcomings and deficiencies of the prior art and to provide a method, system, equipment and medium for visual quality inspection of surface defects of diamond tools, so as to realize automated detection of surface defects of diamond tools, thereby replacing the detection method that relies on subjective experience estimation of the human eye and improving the accuracy and efficiency of quality inspection.

[0006] In order to achieve the above objectives, this application adopts the following technical solutions:

[0007] In a first aspect, the present application provides a method for visual inspection of surface defects of diamond cutting tools, comprising the following steps:

[0008] The diamond tool image is collected using a single-channel grayscale camera and a zero-angle ring light source;

[0009] Preprocessing the diamond tool image to obtain a preprocessed diamond tool image;

[0010] Extracting the texture of the preprocessed diamond tool image to obtain a texture image;

[0011] Correcting the texture image to obtain a corrected texture image;

[0012] Projecting the corrected texture map on the horizontal and vertical axes to obtain a texture projection line graph;

[0013] Defect detection is performed according to the texture projection line graph.

[0014] As a preferred technical solution, the preprocessing of the diamond tool image refers to performing binarization processing on the collected diamond tool image using a set threshold value to obtain a binary image.

[0015] As a preferred technical solution, the steps of correcting the texture image include:

[0016] Obtaining a minimum bounding rectangle of the texture image, and obtaining a rotation angle, a center point, and a size according to the minimum bounding rectangle;

[0017] A rotation matrix is ​​constructed according to the rotation angle, center point and size, and the texture image is rotated to be horizontally aligned according to the rotation matrix to obtain a corrected texture image.

[0018] As a preferred technical solution, the method further includes cutting out the diamond tool workpiece portion in the corrected texture image, removing the surrounding background, and scaling the cut-out image to a preset size.

[0019] As a preferred technical solution, the corrected texture map is projected on the horizontal axis and the vertical axis, specifically:

[0020] Reversing the pixel values ​​of the corrected texture image to obtain a reversed texture image;

[0021] The inverted texture image is projected onto the horizontal axis and the vertical axis respectively to obtain a horizontal axis projection line graph and a vertical axis projection line graph.

[0022] As a preferred technical solution, the steps of obtaining the horizontal axis projection line graph and the vertical axis projection line graph include:

[0023] Calculate the sum of the pixel values ​​of the entire texture image;

[0024] For projecting the inverted texture image onto the horizontal axis, the sum of the pixel values ​​of each column is calculated; for projecting the inverted texture image onto the vertical axis, the sum of the pixel values ​​of each row is calculated;

[0025] The projection value of each column and the projection value of each row are calculated according to the ratio of the sum of the pixel values ​​of each column, the sum of the pixel values ​​of each row and the sum of the pixel values ​​of the entire texture image;

[0026] Generate a horizontal axis projection value sequence according to the projection value of each column; generate a vertical axis projection value sequence according to the projection value of each row;

[0027] The horizontal axis projection value sequence and the vertical axis projection value sequence are respectively plotted into line graphs to obtain a horizontal axis projection line graph and a vertical axis projection line graph.

[0028] As a preferred technical solution, the defect detection is performed according to the texture projection line graph, specifically:

[0029] Select a projection line graph of a defect-free diamond tool image as a standard graph;

[0030] Compare the deviation between the projection value of the standard image and the projection value of the image of the diamond tool to be tested;

[0031] If the deviation exceeds a preset deviation threshold, it is determined that the image of the diamond tool to be inspected has defects.

[0032] In a second aspect, the present application provides a diamond tool surface defect visual quality inspection system, which is applied to a diamond tool surface defect visual quality inspection method, including an image acquisition module, a preprocessing module, a texture image module, a texture image correction module, an image projection module and a defect detection module;

[0033] The image acquisition module is used to acquire diamond tool images using a single-channel grayscale camera and a zero-angle annular light source;

[0034] The preprocessing module is used to preprocess the diamond tool image to obtain a preprocessed diamond tool image;

[0035] The texture image module is used to extract the texture of the preprocessed diamond tool image to obtain a texture image;

[0036] The texture image correction module is used to correct the texture image to obtain a corrected texture image;

[0037] The image projection module is used to project the corrected texture map on the horizontal axis and the vertical axis to obtain a texture projection line graph;

[0038] The defect detection module is used to perform defect detection according to the texture projection line graph.

[0039] In a third aspect, the present application provides an electronic device, the electronic device comprising:

[0040] at least one processor; and,

[0041] a memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the diamond tool surface defect visual quality inspection method.

[0043] In a fourth aspect, the present application provides a computer-readable storage medium storing a program, which, when executed by a processor, implements the method for visual inspection of surface defects of diamond tools.

[0044] In summary, compared with the prior art, the effective effects brought about by the technical solution provided by this application include at least:

[0045] The present application proposes a method for visual quality inspection of diamond tool surface defects, including: using a single-channel grayscale camera and a zero-angle annular light source to collect diamond tool images; preprocessing the diamond tool images to obtain preprocessed diamond tool images; extracting the texture of the preprocessed diamond tool images to obtain texture images; correcting the texture images to obtain corrected texture images; projecting the corrected texture images on the horizontal and vertical axes to obtain a texture projection line graph; and performing defect detection based on the texture projection line graph. The present application uses machine vision to achieve automated detection of surface defects of diamond tools without the need for manual operation, thereby reducing labor costs and improving production efficiency. At the same time, the present application extracts the texture map of the diamond tool, projects the texture map, and identifies the defect location based on the texture projection map, thereby improving the accuracy of detection and ensuring the stability and consistency of product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 A flow chart of a method for visual inspection of diamond tool surface defects provided in one embodiment of the present application;

[0048] Figure 2 A schematic diagram of image acquisition provided for one embodiment of the present application;

[0049] Figure 3 A schematic diagram of a zero-angle light source provided by an embodiment of the present application;

[0050] Figure 4 An original image (a) of a defect-free diamond tool and a texture image (b) of a defect-free diamond tool image provided in one embodiment of the present application;

[0051] Figure 5 An original image of a defective diamond tool (a) and a texture image of the defective diamond tool image (b) provided in one embodiment of the present application;

[0052] Figure 6 A schematic diagram (a) comparing the texture image of a defect-free diamond tool before and after correction and a schematic diagram (b) comparing the texture image of a defective diamond tool before and after correction provided by an embodiment of the present application;

[0053] Figure 7 A horizontal axis projection line graph (a) of a texture image of a defect-free diamond tool and a horizontal axis projection line graph (b) of a texture image of a defective diamond tool provided in one embodiment of the present application;

[0054] Figure 8 A line graph of the horizontal and vertical projections of a small-scale defect provided by an embodiment of the present application;

[0055] Fig. 9 A line graph of the horizontal and vertical projections of a large-scale defect provided by one embodiment of the present application;

[0056] Fig.10 A block diagram of a diamond tool surface defect visual inspection system provided in accordance with one embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to enable those skilled in the art to better understand the present application, the technical solutions 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 only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0058] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0059] Example

[0060] See also Figure 1 In one embodiment of the present application, a method for visual inspection of surface defects of diamond cutting tools is provided, comprising the following steps:

[0061] S1. Use a single-channel grayscale camera and a zero-angle ring light source to capture diamond tool images.

[0062] Further, the image acquisition and placement diagram of the diamond tool in this embodiment is as follows: Figure 2 As shown in FIG. 1 , a single-channel grayscale camera and a zero-angle annular light source are used to collect images of the diamond tool. When the diamond tool reaches a fixed position, the camera is triggered to take a picture of the surface of the diamond tool to collect images of the surface of the diamond tool. The vertical section of the zero-angle annular light source is as follows: Figure 3 As shown in the figure, the lamp beads are installed horizontally on the ring, and the light is directed to the center of the ring; there are horizontal baffles above and below the lamp beads to block the light directed to the periphery, reducing the light shining on the part outside the imaging surface of the diamond tool, so that the light can be well illuminated on the imaging surface of the diamond tool, making the texture features of the image surface more prominent. This imaging solution is particularly suitable for conical workpieces with a small top surface and a large bottom surface. The side will not be imaged due to insufficient light, avoiding interference with the imaging surface.

[0063] S2. Preprocessing the diamond tool image to obtain a preprocessed diamond tool image.

[0064] Furthermore, the preprocessing refers to performing binarization processing on the collected diamond tool image using a set threshold value to obtain a binarized image so as to better extract the texture in the image.

[0065] S3, extracting the texture of the pre-processed diamond tool image to obtain a texture image.

[0066] Furthermore, this application uses OpenCV's cv2.drawContours() function to extract the texture of the diamond tool, see Figure 4 (a) Figure 4 (b) The original image of a defect-free diamond tool and its extracted texture image; Figure 5 (a) Figure 5 (b) The original image of the defective diamond tool and its extracted texture image.

[0067] S4. Correct the texture image to obtain a corrected texture image.

[0068] Furthermore, since the position and angle of the diamond tool on the conveyor belt will shift, the position of the diamond tool workpiece imaging in the field of view will shift, which will cause the extracted texture image to be translated or rotated. Therefore, the texture image needs to be corrected to align it with the horizontal or vertical direction so that each texture image is in the same position and angle to facilitate subsequent processing.

[0069] Specifically, first, for the texture image extracted from the above steps, use the cv2.minAreaRect() function to obtain the minimum bounding rectangle of the texture image, and obtain the rotation angle, center point and size according to the minimum bounding rectangle; secondly, construct a rotation matrix and use the cv2.warpAffine() function to rotate the texture image to horizontal alignment to obtain the corrected texture image, see Figure 6 (a) Figure 6 (b) is the comparison between before and after correction.

[0070] In addition, it also includes cutting out the diamond tool workpiece part in the corrected horizontal texture image, removing the surrounding background, and scaling the cutout workpiece part to a fixed size of 500×400.

[0071] S5, projecting the corrected texture map on the horizontal axis and the vertical axis to obtain a texture projection line graph.

[0072] S51. Further, taking projection onto the horizontal axis (long side) as an example, the projection process includes:

[0073] First, the pixel value of the texture image is inverted, that is, the original value of each pixel is subtracted from 255 to obtain the inverted texture image;

[0074] Secondly, project the inverted texture image onto the horizontal axis. The size of the inverted texture image is 500×400, so there are 500 columns in the horizontal axis direction.

[0075] For each column i, sum the pixel values ​​contained in the column to get S i , sum up the pixel values ​​contained in the entire texture image to get S0;

[0076] According to the ratio of the sum of the pixel values ​​of each column to the sum of the pixel values ​​of the entire texture image, that is, S i / S0, you can get the 500 horizontal axis projection value sequences corresponding to all columns;

[0077] Plotting the 500 projection value sequences into a line graph will yield a projection line graph of the horizontal axis. Figure 7 (a) Figure 7 (b);

[0078] S52. Taking projection to the longitudinal axis (short side) as an example, the projection process includes:

[0079] Project the inverted texture image onto the vertical axis. The size of the inverted texture image is 500×400, so there are 400 rows in the vertical axis direction.

[0080] For each row j, sum the pixel values ​​contained in the column to get S j , and the sum of the pixel values ​​contained in the entire texture image is S0;

[0081] According to the ratio of the sum of the pixel values ​​of each row to the sum of the pixel values ​​of the entire texture image, that is, S j / S0, you can get the 400 vertical axis projection value sequences corresponding to all rows;

[0082] By plotting the 400 projection value sequences into a line graph, we can obtain a vertical axis projection line graph.

[0083] S6. Perform defect detection according to the texture projection image.

[0084] Further, a projection line graph of a defect-free diamond tool image is selected as a standard graph;

[0085] Compare the deviation between the projection value of the standard image and the projection value of the image of the diamond tool to be tested;

[0086] If the deviation exceeds a preset deviation threshold, it is determined that the image of the diamond tool to be inspected has defects;

[0087] The preset deviation threshold in this embodiment is 0.01, which can be seen in Figure 8 , Fig. 9 The horizontal line in the middle;

[0088] In a specific example, the first and last 20 data points of the projection line graph can be removed respectively, because the projection values ​​of the beginning and the end are from the entire edge, which is easily affected by the lighting conditions and the posture of the workpiece. This processing method will not miss the detection of the edge of the workpiece.

[0089] from Figure 8 The projection line graph of diamond tool with small and medium-sized defects shows that in normal parts, the projection deviation is generally less than 0.005; however, the defective part can bring a projection deviation of more than 0.01; therefore, by setting a threshold, such as 0.01 ( Figure 8 , Fig. 9 The horizontal line in the figure is used as the basis for judging defective products;

[0090] See also Fig. 9 From the line graph of diamond tool projection for medium and large-scale defects, it can be seen that the projection deviation of workpieces with large-scale defects exceeds the threshold by a large amount.

[0091] Combination Figure 8 and Fig. 9 It can be seen that small-scale defects will cause the projection value of a certain point to increase abnormally, while the projection value of a workpiece with large-scale defects is very different from that of the standard part. Therefore, it is easy to identify defective products, thereby improving the accuracy of identification.

[0092] It should be noted that, for the sake of convenience of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously.

[0093] Based on the same idea as the visual quality inspection method for diamond tool surface defects in the above-mentioned embodiment, the present application also provides a visual quality inspection system for diamond tool surface defects, which can be used to execute the above-mentioned visual quality inspection method for diamond tool surface defects. For ease of explanation, the structural schematic diagram of an embodiment of a visual quality inspection system for diamond tool surface defects only shows the parts related to the embodiment of the present application. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the system, and may include more or fewer components than shown in the diagram, or combine certain components, or arrange the components differently.

[0094] See also Fig.10 In another embodiment of the present application, a diamond tool surface defect visual quality inspection system 100 is provided, the system comprising an image acquisition module 101, a preprocessing module 102, a texture image module 103, a texture image correction module 104, an image projection module 105 and a defect detection module 106;

[0095] The image acquisition module 101 is used to acquire diamond tool images using a single-channel grayscale camera and a zero-angle annular light source;

[0096] The preprocessing module 102 is used to preprocess the diamond tool image to obtain a preprocessed diamond tool image;

[0097] The texture image module 103 is used to extract the texture of the pre-processed diamond tool image to obtain a texture image;

[0098] The texture image correction module 104 is used to correct the texture image to obtain a corrected texture image;

[0099] The image projection module 105 is used to project the corrected texture image on the horizontal axis and the vertical axis to obtain a texture projection line graph;

[0100] The defect detection module 106 is used to perform defect detection according to the texture projection line graph.

[0101] It should be noted that a diamond tool surface defect visual quality inspection system of the present application corresponds one-to-one to a diamond tool surface defect visual quality inspection method of the present application. The technical features and beneficial effects described in the embodiment of the above-mentioned diamond tool surface defect visual quality inspection method are applicable to the embodiment of a diamond tool surface defect visual quality inspection system. For specific contents, please refer to the description in the embodiment of the method of the present application. It will not be repeated here. This is hereby declared.

[0102] In addition, in the implementation of a diamond tool surface defect visual quality inspection system in the above embodiment, the logical division of each program module is only an example. In actual application, the above functions can be assigned to different program modules as needed, for example, for the convenience of corresponding hardware configuration requirements or software implementation. That is, the internal structure of the diamond tool surface defect visual quality inspection system is divided into different program modules to complete all or part of the functions described above.

[0103] In another embodiment, an electronic device for implementing a method for visual inspection of diamond tool surface defects is provided, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor; when the processor executes the computer program, a method for visual inspection of diamond tool surface defects according to any embodiment of the present application is implemented.

[0104] Exemplarily, in this embodiment, the computer program may be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor to complete the present application. The one or more module elements may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the device;

[0105] The device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The device may include, but is not limited to, a processor, a memory;

[0106] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, and uses various interfaces and lines to connect various parts of the entire device;

[0107] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; in addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0108] Accordingly, the present application also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a diamond tool surface defect visual quality inspection method as described in any one of the above embodiments.

[0109] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0110] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0111] The above embodiments are preferred implementation modes of the present application, but the implementation modes of the present application are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present application should be equivalent replacement methods and are included in the protection scope of the present application.

Claims

1. A method for visual inspection of surface defects of diamond cutting tools, characterized in that: The steps include: The diamond tool image is collected using a single-channel grayscale camera and a zero-angle ring light source; Preprocessing the diamond tool image to obtain a preprocessed diamond tool image; Extracting the texture of the preprocessed diamond tool image to obtain a texture image; Correcting the texture image to obtain a corrected texture image; Projecting the corrected texture map on the horizontal and vertical axes to obtain a texture projection line graph; The corrected texture map is projected on the horizontal axis and the vertical axis, specifically: Reversing the pixel values ​​of the corrected texture image to obtain a reversed texture image; The inverted texture image is projected onto the horizontal axis and the vertical axis respectively to obtain a horizontal axis projection line graph and a vertical axis projection line graph; The steps of obtaining the horizontal axis projection line graph and the vertical axis projection line graph specifically include: Calculate the sum of the pixel values ​​of the entire texture image; For projecting the inverted texture image onto the horizontal axis, the sum of the pixel values ​​of each column is calculated; for projecting the inverted texture image onto the vertical axis, the sum of the pixel values ​​of each row is calculated; The projection value of each column and the projection value of each row are calculated according to the ratio of the sum of the pixel values ​​of each column, the sum of the pixel values ​​of each row and the sum of the pixel values ​​of the entire texture image; Generate a horizontal axis projection value sequence according to the projection value of each column; generate a vertical axis projection value sequence according to the projection value of each row; The horizontal axis projection value sequence and the vertical axis projection value sequence are respectively plotted into line graphs to obtain a horizontal axis projection line graph and a vertical axis projection line graph; Defect detection is performed according to the texture projection line graph, specifically: Select a projection line graph of a defect-free diamond tool image as a standard graph; Compare the deviation between the projection value of the standard image and the projection value of the image of the diamond tool to be tested; If the deviation exceeds a preset deviation threshold, it is determined that the image of the diamond tool to be inspected has defects.

2. A diamond tool surface defect visual inspection method according to claim 1, characterized in that: The preprocessing of the diamond tool image refers to performing binarization processing on the collected diamond tool image using a set threshold value to obtain a binarized image.

3. A method for visual inspection of surface defects of diamond tools according to claim 1, characterized in that: The step of correcting the texture image comprises: Obtaining a minimum bounding rectangle of the texture image, and obtaining a rotation angle, a center point, and a size according to the minimum bounding rectangle; A rotation matrix is ​​constructed according to the rotation angle, center point and size, and the texture image is rotated to be horizontally aligned according to the rotation matrix to obtain a corrected texture image.

4. A method for visual inspection of surface defects of diamond cutting tools according to claim 3, characterized in that: The method also includes cutting out the diamond tool workpiece portion in the corrected texture image, removing the surrounding background, and scaling the cut-out image to a preset size.

5. A diamond tool surface defect visual quality inspection system, characterized in that: A diamond tool surface defect visual quality inspection method applied to any one of claims 1 to 4, comprising an image acquisition module, a preprocessing module, a texture image module, a texture image correction module, an image projection module and a defect detection module; The image acquisition module is used to acquire diamond tool images using a single-channel grayscale camera and a zero-angle annular light source; The preprocessing module is used to preprocess the diamond tool image to obtain a preprocessed diamond tool image; The texture image module is used to extract the texture of the preprocessed diamond tool image to obtain a texture image; The texture image correction module is used to correct the texture image to obtain a corrected texture image; The image projection module is used to project the corrected texture map on the horizontal axis and the vertical axis to obtain a texture projection line graph; The corrected texture map is projected on the horizontal axis and the vertical axis, specifically: Reversing the pixel values ​​of the corrected texture image to obtain a reversed texture image; The inverted texture image is projected onto the horizontal axis and the vertical axis respectively to obtain a horizontal axis projection line graph and a vertical axis projection line graph; The steps of obtaining the horizontal axis projection line graph and the vertical axis projection line graph specifically include: Calculate the sum of the pixel values ​​of the entire texture image; For projecting the inverted texture image onto the horizontal axis, the sum of the pixel values ​​of each column is calculated; for projecting the inverted texture image onto the vertical axis, the sum of the pixel values ​​of each row is calculated; The projection value of each column and the projection value of each row are calculated according to the ratio of the sum of the pixel values ​​of each column, the sum of the pixel values ​​of each row and the sum of the pixel values ​​of the entire texture image; Generate a horizontal axis projection value sequence according to the projection value of each column; generate a vertical axis projection value sequence according to the projection value of each row; The horizontal axis projection value sequence and the vertical axis projection value sequence are respectively plotted into line graphs to obtain a horizontal axis projection line graph and a vertical axis projection line graph; The defect detection module is used to perform defect detection according to the texture projection line graph, specifically: Select a projection line graph of a defect-free diamond tool image as a standard graph; Compare the deviation between the projection value of the standard image and the projection value of the image of the diamond tool to be tested; If the deviation exceeds a preset deviation threshold, it is determined that the image of the diamond tool to be inspected has defects.

6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute a diamond tool surface defect visual quality inspection method as described in any one of claims 1-4.

7. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, a diamond tool surface defect visual quality inspection method as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Bamboo piece defect detection method and bamboo piece defect detection system

    CN106651831A