Plate processing drilling defect identification method and system based on machine vision

Through the machine vision-based drilling defect recognition method of plate processing, dynamically adjusting the size of the Gaussian core to optimize edge detection, solving the problem of drilling edge defects in plate processing, achieving more accurate defect recognition and higher production efficiency.

CN119444731AActive Publication Date: 2025-02-14NANXING MACHINERY CO LTD

Patent Information

Application Number
CN202411644615.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-14
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

During the drilling process of sheet materials, external factors such as drill bit wear and machine tool instability lead to defects in the drilling edge, affecting product quality and production efficiency.

Method used

Using machine vision-based board drilling defect identification method, the plate processing and canny edge detection are obtained, and the size of the Gaussian core is dynamically adjusted to optimize edge detection and tiny defects at the edge of the hole are identified. .

Benefits of technology

It realizes more accurate identification of hole position defects, timely discover and correct problems, and improves the quality and efficiency of plate processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444731A_ABST
    Figure CN119444731A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, and relates to a machine vision-based plate processing drilling defect identification method and system, and the method comprises the steps: obtaining a gray-scale map of a plate containing hole sites; carrying out binarization processing on the grey-scale image to obtain a binary image, and carrying out hole site defect detection on the binary image according to a Canny edge detection algorithm to obtain a defect identification result; wherein the texture width of each connected domain in the binary image is calculated, and the size of a Gaussian kernel in the Canny edge detection algorithm is adjusted based on the distance between the connected domains and the texture width. According to the method, the size of the Gaussian kernel is dynamically adjusted to optimize the edge detection algorithm, so that the edge detection algorithm is more suitable for the specific characteristics of the hole site on the plate, the tiny defects of the edge of the hole site can be identified more accurately, the problems can be found and corrected in time in the production process, and the plate processing quality and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing and to a method and system for identifying drilling defects in plate processing based on machine vision. Background Art

[0002] With the development of the manufacturing industry, sheet metal processing is one of the important links in the manufacturing process, and its technological progress has a profound impact on the quality and efficiency of the entire manufacturing industry. Sheet metal processing involves many aspects, including cutting, forming, drilling, etc., among which drilling is an indispensable step in the connection and assembly process. In order to improve production efficiency and reduce human errors, the demand for automated and intelligent drilling systems continues to increase.

[0003] At present, a patent application document with publication number CN117483838A discloses a plate drilling method and device based on artificial intelligence, the method comprising: controlling a preset lathe device to perform drilling operations on a plate to be processed through multiple target drilling paths, collecting real-time image data of the plate to be processed during the drilling operation and performing drilling parameter analysis; performing drilling deviation analysis on the plate to be processed based on the drilling depth data and drilling position data obtained from the parameter analysis to obtain drilling deviation data; and performing control parameter analysis on the lathe based on the drilling deviation data to obtain target control parameters, and controlling the lathe to perform drilling control on the plate to be processed based on the target control parameters.

[0004] Although the above operation solves the problem of difficulty in timely discovering and correcting deviations in the drilling process, there may still be some external factors in the process of drilling parameter analysis, such as drill wear, machine tool instability, etc., which may lead to defects on the edge of the drill hole, thereby affecting the quality and efficiency of plate processing. Summary of the invention

[0005] In order to solve the technical problem that during the plate processing and drilling process, external factors cause defects in the edge of the drilling hole, affecting product quality and production efficiency, the present invention provides solutions in the following aspects.

[0006] In a first aspect, a plate processing drilling defect recognition method based on machine vision includes: Get the grayscale image of the plate containing the holes; Binarize the grayscale image to obtain a binary image, and perform hole defect detection on the binary image according to the Canny edge detection algorithm to obtain a defect recognition result; The texture width of each connected domain in the binary image is calculated, and the size of the Gaussian kernel in the Canny edge detection algorithm is adjusted based on the distance between the connected domains and the texture width; When the average texture width of all connected domains is less than or equal to the average distance between all connected domains, the size of the Gaussian kernel is: ; Conversely, the size of the Gaussian kernel is: ; is the size of the Gaussian kernel, In the binary image The texture width of the connected domain, For the The connected domain and The distance between adjacent connected domains of a connected domain, is the number of connected domains in the binary graph, is an odd conversion function, is the minimum function.

[0007] The present invention first obtains a grayscale image of a plate containing holes and performs binarization processing, and then applies the Canny algorithm to perform edge detection on the binary image, wherein by analyzing the characteristics of the plate holes, such as texture width and the distance between connected domains, the size of the Gaussian kernel is dynamically adjusted, and the edge detection algorithm is optimized to make it more suitable for the specific characteristics of the holes on the plate, which helps to more accurately identify tiny defects at the edges of the holes, thereby timely discovering and correcting these problems in the production process, and improving the quality and efficiency of plate processing.

[0008] Preferably, the step of binarizing the grayscale image to obtain a binary image further includes: Calculate the possibility of hole position existence of each row of pixels and each column of pixels in the grayscale image respectively; The hole existence possibility of the pixel points calculated in the grayscale image is mapped to the relative position of the binary image.

[0009] By more accurately locating the holes, false detections (misidentifying non-hole areas as holes) and missed detections (failing to identify true holes) can be reduced.

[0010] Preferably, after calculating the texture width of each connected domain in the binary image, the method further comprises: Correct the initial texture width to get the optimal texture width.

[0011] By correcting the initial texture width, misjudgment caused by inaccurate texture width measurement can be reduced, such as misidentifying a normal hole as a defective hole.

[0012] Preferably, the optimal texture width satisfies the relationship: ; In the formula, In the binary image The optimal texture width of connected domains, is the minimum function, For the The height of the circumscribed rectangle of a connected domain, For the The width of the circumscribed rectangle of a connected region, is the correction factor, It is an exponential function with the natural constant e as its base.

[0013] Preferably, the correction factor is expressed as: ; In the formula, is the minimum function, For the The average value of the hole existence probability of the ordinates of all pixels in a connected domain, For the The average value of the hole existence probability of the horizontal coordinates of all pixels in a connected domain.

[0014] By introducing a correction factor in the form of an exponential function, the influence of image noise or measurement error on the texture width measurement result can be reduced. Since the holes may have different shapes and sizes, this correction method based on the minimum circumscribed rectangle and the possibility of hole existence can provide more flexible size adjustment.

[0015] Preferably, the expression for the possibility of hole positions in each row of pixels in the grayscale image is: ; In the formula, In the grayscale image There is a possibility that the hole position of the row pixel point exists. For the The sum of the grayscale values ​​of all pixels in the row, is the minimum value of the sum of the grayscale values ​​of pixels in all rows of the grayscale image. is the number of rows of the grayscale image, It is an exponential function with the natural constant e as its base.

[0016] Preferably, the expression for the possibility of hole position existence of each column of pixels in the grayscale image is: ; In the formula, In the grayscale image There is a possibility that the hole position of the column pixel points exists. For the The sum of the grayscale values ​​of all pixels in the column, is the minimum value of the sum of the grayscale values ​​of the pixels in all columns of the grayscale image. is the number of columns of the grayscale image, It is an exponential function with the natural constant e as its base.

[0017] Calculating the probability of hole existence in each row and column provides additional spatial information for the image and helps to understand the distribution pattern of hole positions in the image.

[0018] Preferably, the optimal texture width satisfies the relationship: ; In the formula, In the binary image The optimal texture width of connected domains, is the minimum function, For the The height of the circumscribed rectangle of a connected domain, For the The width of the circumscribed rectangle of a connected region, is the correction factor.

[0019] In a second aspect, a plate processing drilling defect recognition system based on machine vision includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned plate processing drilling defect recognition method based on machine vision is implemented.

[0020] Beneficial effect: The present invention maps the hole existence possibility of pixel points calculated in the grayscale image to the relative position of the binary image, enhances the characteristics of the defective area in the binary image, and dynamically adjusts the algorithm parameters according to the actual drilling characteristics of the plate by calculating the texture width of each connected domain in the binary image, ensuring that defects can be effectively detected under different conditions, thereby more accurately detecting hole defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 It is a method flow chart of step S1 to step S2 in the plate processing drilling defect recognition method based on machine vision in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0023] In the production process of panel furniture, holes are drilled in the panels, and the panels are fixed to each other through the matching of the holes and connectors to form a cabinet structure. During the drilling process, burrs often appear on the edges of the holes due to external factors such as drill wear and machine tool instability, affecting the quality and efficiency of panel processing. Therefore, the present invention adopts Canny edge detection to extract the edges of the images of the panel holes, and detects whether there are burrs on the holes through the extracted hole edges.

[0024] The embodiment of the present invention discloses a method for identifying drilling defects in plate processing based on machine vision, referring to Figure 1 , including steps S1-S2, which are as follows: S1: Obtain a grayscale image of the plate containing the holes.

[0025] In an embodiment of the present invention, an industrial camera or a camera is used to capture an image of a plate containing holes, and the captured plate image is preprocessed, including denoising, contrast enhancement and other operations, and then the plate image is converted into a grayscale image.

[0026] S2: Binarize the grayscale image to obtain a binary image, and perform hole defect detection on the binary image according to the Canny edge detection algorithm to obtain a defect recognition result.

[0027] Since the plate has texture and the texture of the plate may be mistaken for the edge, when using the Canny edge detection algorithm, especially when using the Gaussian filter to smooth the image, it may cause the texture details to be lost or the edge information to be over-smoothed, which may lead to false detection or missed detection of the hole edge.

[0028] After the grayscale image is obtained in the above step S1, since the hole position in the grayscale image has a lower grayscale value, the sum of the grayscale values ​​of a row of pixels and a column of pixels corresponding to the hole position is significantly lower than the sum of the grayscale values ​​of the pixels corresponding to other positions. Therefore, the rows and columns of the grayscale image can be traversed, and the possibility of the existence of the hole position in each row or column can be obtained by calculating the difference between the sum of the pixels in each row or column and the minimum sum of the pixels in each row or column, and performing normalization processing. The smaller the difference, the more likely the row or column is to contain the hole position.

[0029] For example, for the grayscale image The probability of hole position existence is calculated as:

[0030] In the formula, In the grayscale image There is a possibility that the hole position of the row pixel point exists. For the The sum of the grayscale values ​​of all pixels in the row, is the minimum value of the sum of the grayscale values ​​of pixels in all rows of the grayscale image. is the number of rows in the grayscale image, It is an exponential function with the natural constant e as its base.

[0031] For the grayscale image The probability of hole position existence is calculated as:

[0032] In the formula, In the grayscale image There is a possibility that the hole position of the column pixel point exists. For the The sum of the grayscale values ​​of all pixels in the column, is the minimum value of the sum of the grayscale values ​​of the pixels in all columns of the grayscale image. is the number of columns of the grayscale image, It is an exponential function with the natural constant e as its base.

[0033] In which, by dividing or The purpose of normalization is to limit the calculation results to a reasonable range to facilitate comparison and calculation.

[0034] Specifically, an adaptive threshold binarization operation is performed on the grayscale image of the plate to obtain a binary image. In the binary image, the texture and other features may form a connected area, that is, a group of adjacent pixels share the same pixel value; through connected domain analysis, the texture width of each connected domain is calculated (the initial estimate of the texture width usually depends on the height and width of the circumscribed rectangle of the connected area), and the texture features in the image are extracted and analyzed.

[0035] It should be noted that different styles of plates have different textures, and these textures may differ in length, which appears as different states in the grayscale image. At the same time, the existence of holes may affect the judgment of the plate texture width, so the calculated texture width (i.e., the initial texture width) can be corrected to obtain the optimal texture width to reduce this effect.

[0036] Specifically, the calculated hole existence probability in the grayscale image is mapped to the corresponding position in the binary image, which means that if the hole existence probability of a row or column in the grayscale image is higher, then the pixels in the corresponding row or column in the binary image may be assigned different values ​​or attributes to indicate that they are more likely to be holes.

[0037] For each connected region, the average value of the ordinates (i.e., row numbers) of all pixels in the region is calculated. For example, if the abscissas (i.e., column numbers) of the pixels in a connected region are between 100 and 110, then the average value of the probability of the existence of holes in these 11 columns of pixels is calculated. Similarly, the average value of the abscissas of all pixels in each connected region is calculated to determine the approximate lateral position of the holes. By analyzing the coordinates of the pixels in these connected regions, the influence of the holes on the texture width judgment is further reduced, because by calculating the average coordinates of the connected regions, the influence of individual holes can be ignored to a certain extent.

[0038] Exemplarily, the optimal texture width is:

[0039] In the formula, In the binary image The optimal texture width of connected domains, is the minimum function, For the The height of the circumscribed rectangle of a connected domain, For the The width of the circumscribed rectangle of a connected region, is the correction factor, It is an exponential function with the natural constant e as its base.

[0040] Among them, the correction factor The relationship is as follows:

[0041] In the formula, is the minimum function, For the The average value of the hole existence probability of the ordinates of all pixels in a connected domain, For the The average value of the hole existence probability of the horizontal coordinates of all pixels in a connected domain.

[0042] Among them, when When it is larger, it indicates that the connected area is more likely to be formed by pores. Smaller, yes The degree of correction is relatively large, which effectively reduces the problem of excessive texture width caused by the hole position; when When it is smaller, it indicates that the connected area is more likely to be a real texture area. Close to 1, yes The degree of correction is smaller.

[0043] In another embodiment, the optimal texture width also satisfies the relationship:

[0044] In the formula, In the binary image The optimal texture width of connected domains, is the minimum function, For the The height of the circumscribed rectangle of a connected domain, For the The width of the circumscribed rectangle of a connected region, is the correction factor.

[0045] Similarly, according to the above calculation The optimal texture width of each connected domain can be calculated by using the method of the optimal texture width of each connected domain.

[0046] After the texture width is calculated, the size of the Gaussian kernel in the Canny edge detection algorithm is adjusted based on the distance between connected domains and the texture width.

[0047] Specifically, when the average value of the texture width of all connected domains is less than or equal to the average value of the distance between all connected domains, a smaller Gaussian kernel is needed to avoid missed burrs caused by over-smoothing. The size of the Gaussian kernel satisfies the relationship: ; On the contrary, a larger Gaussian kernel is needed to better smooth the texture and reduce the false detection of burrs. The size of the Gaussian kernel satisfies the relationship: ; In the formula, is the size of the Gaussian kernel, In the binary image The texture width of the connected domain, For the The connected domain and The distance between adjacent connected domains of a connected domain, is the number of connected domains in the binary graph, is an odd conversion function, is the minimum function.

[0048] Among them, the odd conversion function ensures that the size of the Gaussian kernel is an odd number, which helps to maintain the symmetry of the convolution operation, making edge detection more accurate.

[0049] After dynamically adjusting the size of the Gaussian kernel in the Canny edge detection algorithm, the Canny edge detection algorithm is applied to the plate image to detect hole defects, thereby accurately identifying burr defects. Subsequent staff can perform corresponding processing operations.

[0050] An embodiment of the present invention also discloses a plate processing drilling defect recognition system based on machine vision, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a plate processing drilling defect recognition method based on machine vision according to the present invention is implemented.

[0051] The system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.

[0052] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0053] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0054] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A plate processing drilling defect recognition method based on machine vision, characterized in that: include: Get the grayscale image of the plate containing the holes; Binarize the grayscale image to obtain a binary image, and perform hole defect detection on the binary image according to the Canny edge detection algorithm to obtain a defect recognition result; The texture width of each connected domain in the binary image is calculated, and the size of the Gaussian kernel in the Canny edge detection algorithm is adjusted based on the distance between the connected domains and the texture width; When the average texture width of all connected domains is less than or equal to the average distance between all connected domains, the size of the Gaussian kernel is: ; Conversely, the size of the Gaussian kernel is: ; is the size of the Gaussian kernel, In the binary image The texture width of the connected domain, For the The connected domain and The distance between adjacent connected domains of a connected domain, is the number of connected domains in the binary graph, is an odd conversion function, is the minimum function.

2. The plate processing drilling defect recognition method based on machine vision according to claim 1 is characterized in that: The step of binarizing the grayscale image to obtain a binary image further includes: Calculate the possibility of hole position existence of each row of pixels and each column of pixels in the grayscale image respectively; The hole existence possibility of the pixel points calculated in the grayscale image is mapped to the relative position of the binary image.

3. The plate processing drilling defect recognition method based on machine vision according to claim 2 is characterized in that: After calculating the texture width of each connected domain in the binary image, the method further includes: Correct the initial texture width to get the optimal texture width.

4. The method for identifying drilling defects in plate processing based on machine vision according to claim 3 is characterized in that: The optimal texture width satisfies the relationship: ; In the formula, In the binary image The optimal texture width of connected domains, is the minimum function, For the The height of the circumscribed rectangle of a connected domain, For the The width of the circumscribed rectangle of a connected region, is the correction factor, It is an exponential function with the natural constant e as its base.

5. The method for identifying drilling defects in plate processing based on machine vision according to claim 4, characterized in that: The expression of the correction factor is: ; In the formula, is the minimum function, For the The average value of the hole existence probability of the ordinates of all pixels in a connected domain, For the The average value of the hole existence probability of the horizontal coordinates of all pixels in a connected domain.

6. The method for identifying drilling defects in plate processing based on machine vision according to claim 5, characterized in that: The expression for the possibility of hole position existence of each row of pixels in the grayscale image is: ; In the formula, In the grayscale image There is a possibility that the hole position of the row pixel point exists. For the The sum of the grayscale values ​​of all pixels in the row, is the minimum value of the sum of the grayscale values ​​of pixels in all rows of the grayscale image. is the number of rows of the grayscale image, It is an exponential function with the natural constant e as its base.

7. The method for identifying drilling defects in plate processing based on machine vision according to claim 6, characterized in that: The expression for the possibility of hole position existence of each column of pixels in the grayscale image is: ; In the formula, In the grayscale image There is a possibility that the hole position of the column pixel points exists. For the The sum of the grayscale values ​​of all pixels in the column, is the minimum value of the sum of the grayscale values ​​of the pixels in all columns of the grayscale image. is the number of columns of the grayscale image, It is an exponential function with the natural constant e as its base.

8. The method for identifying drilling defects in plate processing based on machine vision according to claim 3, characterized in that: The optimal texture width satisfies the relationship: ; In the formula, In the binary image The optimal texture width of connected domains, is the minimum function, For the The height of the circumscribed rectangle of a connected domain, For the The width of the circumscribed rectangle of a connected region, is the correction factor.

9. The plate processing drilling defect recognition system based on machine vision is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the plate processing drilling defect recognition method based on machine vision according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Plate drilling method and device based on artificial intelligence

    CN117483838A

  • Industrial image detection method based on improved canny algorithm

    CN114549525A

Cited By

  • Valve body tapping calibration method and system based on machine vision

    CN119658035A

  • Drilling defect detection method and equipment based on image detection

    CN122453805A