Workpiece surface defect detection method and system

Through the multi-axis adjustable support structure and reflective imaging module, the arc edge detection problems and imaging interference problems in the prior art are solved, and efficient and accurate defect detection on the surface of the workpiece is achieved.

CN119534482AActive Publication Date: 2025-02-28ZHONGKE HUIYUAN VISUAL TECHNOLOGY (LUOYANG) CO LTD +2

Patent Information

Application Number
CN202411725897.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-28
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The existing workpiece surface defect detection technology is difficult to take into account all kinds of glass covers when detecting arc edge areas, and the reverse support structure interferes with imaging, resulting in low detection efficiency and low accuracy.

Method used

The plane and arc surface detection of the workpiece is realized by setting up a multi-axis adjustable support structure and image acquisition module. The reflective imaging module is used to avoid imaging interference from the lower surface of the workpiece and the support module, and separate the imaging process to improve accuracy.

Benefits of technology

It realizes efficient defect detection of the arc edges and plane areas of the workpiece, improves detection accuracy and efficiency, reduces detection costs, and is suitable for a variety of workpiece shapes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to a workpiece surface defect detection method and system. The workpiece surface defect detection method comprises the steps that under the condition that a first supporting structure is located at a first preset point position, when the imaging condition of a first collection part of a to-be-detected workpiece in an image collection module meets a first imaging condition, a first current point position of a second supporting structure is determined; calculating a planar motion path according to the first current point location; under the condition that the first supporting structure is located at a second preset point position, determining a second current point position of a second supporting structure when the imaging condition of a second acquisition part of the to-be-detected workpiece in the image acquisition module meets a second imaging condition; calculating an arc edge motion path according to the second current point location; and controlling the image acquisition module to shoot to obtain a plurality of plane images and a plurality of arc edge images so as to carry out defect detection on the surface of the to-be-detected workpiece and generate a target detection result. The method provided by the invention improves the precision of workpiece surface defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision detection technology, and in particular to a method and system for detecting defects on the surface of a workpiece. Background Art

[0002] With the rapid development of the smart wearable industry, defect detection of various workpieces involved in smart wearable devices is particularly important. For smart watches, the watch cover is an important component of the watch, and its factory quality directly affects the user experience. Compared with traditional mobile phone covers, although the watch cover is smaller in size, the arc edge area accounts for a larger proportion, the defect detection items are difficult and the inspection requirements are more stringent, which is very unfavorable for manual inspection.

[0003] At present, automatic inspection equipment based on machine vision has the advantages of high efficiency, accuracy, and low cost, which can meet the needs of watch cover defect detection to a certain extent. For glass cover plates, each glass manufacturer often adds a special appearance defect inspection process before coating the white glass watch cover plate to ensure the normal operation of the coating process. In the existing conventional imaging technology, the arc edge of the watch cover plate basically occupies a separate station for inspection, but the arc edges of various glass cover plates vary greatly. Setting up a single station cannot take into account all kinds of glass cover plates. Therefore, arc edge detection will take up a lot of equipment space and time, affecting the detection efficiency. Summary of the invention

[0004] In order to solve the above technical problems, an embodiment of the present application provides a method and system for detecting defects on the surface of a workpiece.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting defects on a workpiece surface, comprising:

[0006] When the first support structure is at a first preset point position, it is determined that the imaging condition of the first acquisition part of the workpiece to be detected in the image acquisition module meets the first imaging condition, the first current point position of the second support structure; wherein the workpiece to be detected is fixed on the first support structure, and the image acquisition module is fixed on the second support structure; the first imaging condition refers to the planar imaging condition of the workpiece;

[0007] Calculating a planar motion path for the workpiece to be inspected according to the first current point, and determining a plurality of first shooting points on the planar motion path;

[0008] When the first support structure is at the second preset point position, it is determined that the imaging condition of the second acquisition part of the workpiece to be detected in the image acquisition module meets the second imaging condition, the second current point position of the second support structure; wherein the second imaging condition refers to the arc surface imaging condition of the workpiece;

[0009] Calculating an arc edge motion path for the workpiece to be inspected according to the second current point, and determining a plurality of second shooting points on the arc edge motion path;

[0010] The image acquisition module is controlled to capture multiple plane images when the second supporting structure is at each first shooting point, and the image acquisition module is controlled to capture multiple arc edge images when the second supporting structure is at each second shooting point; defect detection is performed on the surface of the workpiece to be inspected according to the multiple plane images and the multiple arc edge images to generate a target detection result.

[0011] In a second aspect, an embodiment of the present application provides a defect detection system for a workpiece surface, the defect detection system comprising an image acquisition module, a support module and a control module, wherein:

[0012] The image acquisition module is used to acquire the image of the surface of the workpiece to be inspected;

[0013] The support module is used to support the image acquisition module and the workpiece to be detected, wherein the support module includes a first support structure and a second support structure, the workpiece to be detected is fixed on the first support structure, and the image acquisition module is fixed on the second support structure;

[0014] The control module is used to execute the method of the first aspect mentioned above.

[0015] In a third aspect, a defect detection device for a workpiece surface includes an image acquisition module, a support module and a control module, wherein the support module includes a first support structure supporting the image acquisition module and a second support structure supporting the workpiece to be detected, so that the image acquisition module is placed above the workpiece to be detected, wherein:

[0016] The image acquisition module is used to acquire the surface image of the workpiece to be inspected in a plane posture and an arc edge posture;

[0017] The control module is used to execute the method of the first aspect mentioned above.

[0018] In a fourth aspect, a device for detecting defects on a workpiece surface is provided, the device comprising:

[0019] A first determining unit is used to determine, when the first supporting structure is at a first preset position, a first current position of the second supporting structure when an imaging condition of a first acquisition part of the workpiece to be detected in the image acquisition module meets a first imaging condition; wherein the workpiece to be detected is fixed on the first supporting structure, and the image acquisition module is fixed on the second supporting structure; and the first imaging condition refers to a planar imaging condition of the workpiece;

[0020] A first path planning unit, used for calculating a planar motion path for the workpiece to be inspected according to a first current point, and determining a plurality of first shooting points on the planar motion path;

[0021] A second determining unit is used to determine, when the first supporting structure is at a second preset point position, a second current point position of the second supporting structure when an imaging condition of a second acquisition part of the workpiece to be detected in the image acquisition module meets a second imaging condition; wherein the second imaging condition refers to an imaging condition of a curved surface of the workpiece;

[0022] A second path planning unit, used for calculating an arc edge motion path for the workpiece to be inspected according to a second current point, and determining a plurality of second shooting points on the arc edge motion path;

[0023] A shooting unit, used to control the image acquisition module to capture a plurality of plane images when the second supporting structure is at each first shooting point, and to control the image acquisition module to capture a plurality of arc edge images when the second supporting structure is at each second shooting point;

[0024] The detection unit is used to perform defect detection on the surface of the workpiece to be detected based on multiple plane images and multiple arc edge images, and generate target detection results.

[0025] The defect detection method for the surface of a workpiece provided by the present application includes: when the first supporting structure is at a first preset point position, determining that the imaging condition of the first acquisition part of the workpiece to be detected in the image acquisition module meets the first imaging condition, the first current point position of the second supporting structure; wherein the workpiece to be detected is fixed on the first supporting structure, and the image acquisition module is fixed on the second supporting structure; the first imaging condition refers to the planar imaging condition of the workpiece; according to the first current point position, a planar motion path for the workpiece to be detected is calculated, and a plurality of first shooting points are determined on the planar motion path; when the first supporting structure is at a second preset point position, the second acquisition point position of the workpiece to be detected is determined. When the imaging condition of the collected part in the image acquisition module meets the second imaging condition, the second current point position of the second support structure; wherein the second imaging condition refers to the arc surface imaging condition of the workpiece; the arc edge motion path for the workpiece to be detected is calculated according to the second current point position, and multiple second shooting points are determined on the arc edge motion path; the image acquisition module is controlled to obtain multiple plane images when the second support structure is at each first shooting point position, and the image acquisition module is controlled to obtain multiple arc edge images when the second support structure is at each second shooting point position; defect detection is performed on the surface of the workpiece to be detected according to the multiple plane images and the multiple arc edge images, and a target detection result is generated. The present application realizes the plane and arc surface detection of the workpiece by adjusting the point position of the support structure, solves the problems of difficult arc edge detection, high complexity and large imaging interference in the existing workpiece appearance detection technology, and effectively improves the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0028] Figure 1 A schematic diagram of the structure of a defect detection system for a workpiece surface provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of a process flow of a method for detecting defects on a workpiece surface provided in an embodiment of the present application;

[0030] Figure 3 A schematic diagram of a workpiece posture provided in an embodiment of the present application;

[0031] Figure 4 for Figure 2 A detailed flow chart of S201 in a method for detecting defects on a workpiece surface is shown;

[0032] Figure 5 for Figure 2 A detailed flow chart of S205 in a method for detecting defects on a workpiece surface is shown;

[0033] Figure 6 A schematic diagram of a workpiece acquisition triggering process provided in an embodiment of the present application;

[0034] Figure 7 A schematic structural diagram of a device for detecting defects on a workpiece surface provided in an embodiment of the present application;

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

[0036] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0037] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.

[0038] At present, when inspecting the cover of smart devices, in addition to the fact that arc edge detection cannot take into account all kinds of glass cover plates, the existing reverse support structure will inevitably interfere with the imaging, causing a large number of inspection equipment to fail to inspect, affecting the inspection efficiency and failing to reflect the advantages of automated equipment.

[0039] In view of the technical problems in the above-mentioned workpiece white glass appearance inspection technology, such as the difficulty in detecting arc edges, high complexity of the inspection system, large imaging interference, and interference from the workpiece back support structure, the embodiment of the present application provides a method for detecting defects on the workpiece surface, wherein the image acquisition module is a reflective imaging module composed of a camera and at least two light sources, which effectively avoids imaging interference from the lower surface of the workpiece and the support module, and based on the multi-axis control of the support module and the image acquisition module, the shooting points can be customized according to the appearance shapes of different workpieces, which is compatible with the inspection requirements of most workpiece upper surfaces and improves the inspection efficiency. This is described in detail through one or more of the following embodiments.

[0040] The defect detection method for the workpiece surface provided in the embodiment of the present application can be applied to the defect detection scenario of the workpiece surface. The method can be performed by a defect detection device / system for the workpiece surface, which can be implemented by software and / or hardware, and the device can be integrated in an electronic device. Among them, the electronic device can include but is not limited to mobile terminals such as smart phones, laptops, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA), tablet computers (Tablet Personal Computer, Tablet PC), PMP (portable multimedia player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable devices, etc., and fixed terminals such as digital televisions, desktop computers, smart home devices, etc.

[0041] Figure 1 This is a schematic diagram of the structure of a defect detection system for a workpiece surface provided in an embodiment of the present application. The defect detection system includes an image acquisition module 1, a support module 2 and a control module 3, wherein:

[0042] The image acquisition module 1 is used to acquire images of the surfaces of the workpieces 1-6 to be inspected;

[0043] The support module 2 is used to support the image acquisition module 1 and the workpiece 1-6 to be detected, wherein the support module 2 includes a first support structure 2-2 and a second support structure 2-1, the workpiece 1-6 to be detected is fixed on the first support structure 2-2, and the image acquisition module 1 is fixed on the second support structure 2-1;

[0044] The control module 3 is used to execute a defect detection method for the workpiece surface, specifically: controlling the support module 2 and the image acquisition module 1, wherein the control module 3 includes a driving module and a processing module, the driving module is used to control the first support structure 2-2 to run to a preset point and a shooting point, and the processing module is used to calculate a motion path for the workpiece 1-6 to be inspected and to perform defect detection on the surface of the workpiece 1-6 to be inspected according to the image to generate a target detection result; wherein the shooting point is determined on the motion path.

[0045] The image acquisition module 1 includes a camera 1-1, a lens 1-2 and a filter 1-3. The camera 1-1 and the lens 1-2 are connected for image acquisition. The filter 1-3 is connected to the rear end of the lens 1-2 for filtering out ambient stray light.

[0046] It is understandable that the camera 1-1 is connected to the lens 1-2 for image acquisition, and the filter 1-3 is connected to the rear end of the lens 1-2 for filtering out other ambient stray light. The camera 1-1 may be an industrial camera.

[0047] Among them, the image acquisition module 1 also includes multiple lighting devices configured with different light source types, and the multiple lighting devices include a first lighting device 1-4 configured with a planar light source and a second lighting device 1-5 configured with a strip light source, wherein the light-emitting panel of the first lighting device 1-4 is composed of a plurality of first light-emitting unit patches of a first set frequency, and the front end of the first lighting device 1-4 is configured with quartz glass, and the light-emitting panel of the second lighting device 1-5 is composed of a plurality of second light-emitting unit patches of a second set frequency, and the front end of the second lighting device 1-5 is configured with a cylindrical mirror.

[0048] Optionally, the first lighting device is used to light up at least part of the multiple first light-emitting units to evenly diverge the emitted first light beam through the quartz glass to the first surface area of ​​the workpiece to be inspected; wherein the first light beam is used to form non-uniform bright field illumination on the surface of the workpiece to be inspected; the second lighting device is used to light up at least part of the multiple second light-emitting units to shrink and converge the emitted second light beam through a cylindrical mirror to the second surface area of ​​the workpiece to be inspected; wherein the second light beam is used to form dark field illumination on the surface of the workpiece to be inspected.

[0049] It is understandable that the light-emitting board of the first lighting device 1-4 is composed of a plurality of specific frequency LED light-emitting units (first light-emitting units) patches, and the specific frequency refers to a pre-set first set frequency. By selecting LEDs of different wavelengths, the desired spectral characteristics can be achieved. Among them, the first light-emitting patch can be an LED light-emitting unit patch, and the layout of the plurality of LED light-emitting unit patches corresponds to the size of the light-emitting board, and also corresponds to the different lengths and widths of the workpieces to be tested. Among them, the front end of the first lighting device 1-4 is configured with quartz glass, and the quartz glass can make the light source evenly diverge. After lighting, the first light beam emitted by at least part of the first light-emitting unit is evenly diverged to the first surface area of ​​the workpiece through the quartz glass. The workpiece 1-6 reflects the light, and forms non-uniform bright field illumination in the first surface area, which can highlight the semi-bright field defects of the workpiece. The semi-bright field generally detects protrusions, depressions, dirt, etc. The light-emitting panel of the second lighting device 1-5 is composed of a plurality of LED light-emitting units (second light-emitting units) patches of a specific frequency, wherein the specific frequency refers to a pre-set second set frequency, wherein the first set frequency and the second set frequency may be the same or different, and may be determined according to the test requirements of the workpiece. The front end of the second lighting device 1-5 is provided with a cylindrical mirror, which may cause the light beam to be contracted and converged in the front, and at least part of the second light beam emitted by the second light-emitting unit is contracted and converged to the second surface area of ​​the workpiece through the cylindrical mirror, and is reflected by the workpiece 1-6 to be tested, thereby forming dark field lighting in the second surface area, which may highlight dark field defects of some workpieces, and dark field generally indicates fine scratches, etc.

[0050] It is understandable that the number of the first lighting devices 1 - 4 and the second lighting devices 1 - 5 is not limited and can be determined according to the inspection requirements of the workpiece.

[0051] It can be understood that the second support structure 2-1 fixes the image acquisition modules 1-1 to 1-5 respectively. The first support structure 2-2 fixes the workpiece 1-6 to be tested.

[0052] Optionally, the first support structure is provided with a first adjustment axis adjustable in the direction of 0 to 360 degrees, and the first adjustment axis includes an α-axis and a β-axis, wherein the α-axis and the β-axis are used to adjust the tilt posture of the workpiece to be detected relative to the image acquisition module.

[0053] It is understandable that the workpiece is fixed on the first support structure 2-2, for example, Figure 1 As shown, the lower surface of the workpiece is adsorbed on the first support structure 2-2. The first support structure 2-2 is provided with a first adjustment axis that can be adjusted in the direction of 0 to 360 degrees. The first adjustment axis includes an α-axis and a β-axis, that is, the first support structure 2-2 can be adjusted in the direction of the α-axis and the β-axis, and the adjustment range of the α-axis and the β-axis can reach 0 to 360°. Among them, the α-axis and the β-axis are used to adjust the tilt posture of the workpiece relative to the image acquisition module, that is, the angle posture of the workpiece can be adjusted by adjusting the α-axis and the β-axis.

[0054] Optionally, the second support structure is provided with a second adjustment axis that can be adjusted in multiple degrees of freedom, and the second adjustment axis includes an x-axis, a y-axis and a z-axis, wherein the x-axis and the y-axis are used to adjust the field of view position of the image acquisition module, and the z-axis is used to adjust the vertical distance between the image acquisition module and the workpiece to be detected, and the vertical distance reflects the focus of the image.

[0055] It is understandable that the image acquisition module 1 is fixed on the second support structure 2-1, and the second support structure 2-1 is provided with a second adjustment axis that can be adjusted in multiple degrees of freedom, wherein the second adjustment axis includes an x-axis, a y-axis and a z-axis, and the adjustment of the three degrees of freedom of the x-axis, y-axis and z-axis can be realized through the control module. The adjustment in the x-axis and y-axis directions can change the field of view position of the camera in the image acquisition module, so that all workpieces can be scanned and imaged. The adjustment in the z-axis direction can change the vertical distance between the camera and the workpiece, and the vertical distance reflects the focus of the captured image, that is, the focus of the captured image can be ensured through the z-axis adjustment.

[0056] Optionally, the control module includes a driving module and a motion controller, the driving module is used to control the movement of the supporting module and to provide real-time feedback of the movement position to the motion controller, and the motion controller is used to output a high-level signal for controlling the strobing of multiple lighting devices when receiving the feedback of the movement position.

[0057] It can be understood that the control module 3 is used to control the light source triggering of the camera 1-1, the first lighting device 1-4 and the second lighting device 1-5 in the image acquisition module 1 and the posture adjustment of the support module 2. The control module 3 is used to execute the following workpiece surface defect detection method. For specific description, please refer to the following embodiment.

[0058] It is understandable that the control module 3 is programmed with a host computer program, and the plane motion path and arc edge motion path of the first support structure 2-1 and the second support structure 2-2 are set in sequence. After the driving module in the control module 3 receives the spatial coordinates of the support module sent by the motion controller, it controls the support structure to run to the shooting point by adjusting the x-axis, y-axis and z-axis as well as the α-axis and the β-axis, and feeds back the motion position of the support structure to the motion controller in real time. After receiving the feedback motion position, the motion controller determines whether it is a shooting point. When the shooting point is determined, the circuit is triggered to output a high-level signal that can control the strobing of multiple lighting devices, so as to realize the strobing of the first lighting device 1-4 and the second lighting device 1-5, and then the camera 1-1 takes pictures, that is, controls the light source and the camera, and completes a pulse cycle. At the next moment, the next pulse response is completed when the shooting point is reached, until the plane motion path and the arc edge motion path of the workpiece are completed, and the photography storage of all points is realized.

[0059] Based on the above embodiments, Figure 2 A schematic flow chart of a method for detecting defects on a workpiece surface provided in an embodiment of the present application is applied to a defect detection system or control module on the workpiece surface, specifically including the following steps: Figure 2 The following steps are shown:

[0060] S201, when the first supporting structure is at a first preset position, when it is determined that the imaging condition of the first acquisition part of the workpiece to be detected in the image acquisition module meets the first imaging condition, the first current position of the second supporting structure.

[0061] The workpiece to be inspected is fixed on the first supporting structure, and the image acquisition module is fixed on the second supporting structure; the first imaging condition refers to the planar imaging condition of the workpiece.

[0062] It is understandable that the image is captured on the plane area of ​​the workpiece to be inspected (hereinafter referred to as the workpiece), and the workpiece can be a watch cover. Specifically, the first support structure is set to a first preset position, and the workpiece is fixed on the first support structure. This setting of the first support structure can keep the workpiece in a horizontal posture. Then, the position of the second support structure is adjusted so that the imaging condition of the first acquisition part of the workpiece in the image acquisition module meets the first imaging condition, and the first current position of the second support structure in this case is determined. Among them, the first imaging condition refers to the plane imaging condition of the workpiece when the image is captured in the plane area, and the plane imaging condition can be set according to the detection requirements of the workpiece.

[0063] It can be understood that the first preset point position means that both the α axis and the β axis are 0 degrees, so that the workpiece is always in a horizontal posture when performing planar area image acquisition (picture collection).

[0064] For example, see Figure 3 , Figure 3 A schematic diagram of a workpiece posture provided in an embodiment of the present application, such as Figure 3 As shown in FIG. 1 , when the α-axis and the β-axis of the first support structure are both 0 degrees, the workpiece is in a horizontal posture / planar posture, in which case a planar image of the workpiece can be captured. When at least one of the α-axis and the β-axis of the first support structure is not 0 degrees, the workpiece is in an inclined posture / arc edge posture, as shown in FIG. Figure 3 As shown, the workpiece has an arc angle of α in the β-axis direction. In this case, the arc edge image of the workpiece can be collected.

[0065] S202: Calculate a planar motion path for the workpiece to be inspected according to the first current point, and determine a plurality of first shooting points on the planar motion path.

[0066] It can be understood that, based on the above S201, the plane motion path is calculated according to the first current point position of the second support structure in the horizontal posture of the workpiece, and the plane motion path refers to the motion path of the second support structure, so as to ensure that the image acquisition module can capture the complete plane information of the workpiece. After planning the plane motion path of the second support structure, multiple first shooting points are determined on the plane motion path, and the shooting points refer to the motion points / planning points of the second support structure. The subsequent image acquisition module will capture images at the shooting points.

[0067] The first current point includes a first initial point and a first end point.

[0068] Optionally, in the above S202, the planar motion path for the workpiece to be inspected is calculated according to the first current point, and a plurality of first shooting points are determined on the planar motion path, which can be specifically implemented by the following steps:

[0069] Based on the first initial point and the first end point, a straight line fitting is performed to determine a planar motion path for the workpiece to be detected, wherein the length of the planar motion path is greater than the length of the workpiece to be detected; and multiple first shooting points are determined on the planar motion path according to a set step size.

[0070] It is understandable that the first current point position involves the position data and direction signal of each axis in the x-axis, y-axis and z-axis, wherein the first current point position includes the first initial point position and the first end point position, wherein the first initial point position refers to the specific point position at which image acquisition is started, and the first end point position refers to the specific point position at which image acquisition is ended. Based on the first initial point position and the first end point position, a straight line fitting is performed to obtain a plane motion path, that is, the path of the plane image acquisition is a fitting straight line between two points, wherein the path length of the plane motion path is greater than the length of the workpiece, or the path length of the plane motion path is greater than the length of the area to be detected of the workpiece, for example, only the middle area of ​​the workpiece is detected, and the path length is greater than the length of the middle area. Subsequently, the first shooting points are evenly distributed under the plane motion path, and the image acquisition module shoots when the second support structure moves to the shooting point position, wherein a set step length can be spaced between the two first shooting points, and the set step lengths between each adjacent first shooting point position can be the same or different, and can be set according to the acquisition requirements.

[0071] S203: when the first supporting structure is at a second preset position, determining that an imaging condition of a second acquisition part of the workpiece to be detected in the image acquisition module meets a second imaging condition, a second current position of the second supporting structure.

[0072] Among them, the second imaging condition refers to the arc surface imaging condition of the workpiece, the second preset point refers to the β axis being at least one of 0 degrees, 90 degrees, 180 degrees and 280 degrees, and the α axis is determined based on the current arc of the β axis and the imaging condition.

[0073] It can be understood that, based on the above S202, the image of the arc edge area of ​​the workpiece is collected. Specifically, the first support structure is set at the second preset point, and the second preset point refers to the curvature setting for the β axis and the α axis, wherein the β axis is at least one of 0 degrees, 90 degrees, 180 degrees and 280 degrees, and the α axis can be determined according to the current curvature of the β axis and the imaging situation. The specific determination method is not limited. For example, the β axis is set to 0 degrees, 90 degrees, 180 degrees and 280 degrees in sequence, that is, the subsequent collection of 4 arc edges is required. In a possible situation, taking the workpiece as a rectangle as an example, the second collection position is a corner of the workpiece, and the corner refers to the corner formed between the short side and the adjacent long side. The β value corresponds to a certain arc edge, such as the short side is 0 degrees, the adjacent long side is 90 degrees, and the α value is determined by the curvature of the arc edge of the workpiece, such as approximately 30 degrees, and the α value is also 30 degrees, so that the arc edge imaging approaches a plane, with a better imaging effect.

[0074] S204, calculating an arc edge motion path for the workpiece to be inspected according to the second current point, and determining a plurality of second shooting points on the arc edge motion path.

[0075] It is understandable that, based on the above S203, the calculation method of the arc edge motion path is the same as the calculation method of the plane motion path in the above S203, and no further description is given here. Among them, the arc edge motion path mainly refers to the motion path for capturing images of the arc edge of the workpiece. Under the arc edge motion path, the first support structure fixes the workpiece in an inclined posture to capture the arc edge area of ​​the workpiece. It is understandable that the acquisition order of the arc edge image and the plane image is not limited.

[0076] The second current point includes a second initial point and a second end point.

[0077] Optionally, the above-mentioned calculation of the arc edge motion path for the workpiece to be detected according to the second current point position, and determination of multiple second shooting points on the arc edge motion path, can be specifically implemented through the following steps:

[0078] Based on the second initial point and the second end point, a straight line fitting is performed to determine the arc edge motion path for the workpiece to be detected, wherein the length of the arc edge motion path is greater than the length of the workpiece to be detected; and multiple second shooting points are determined on the arc edge motion path according to the set step size.

[0079] It can be understood that the second acquisition component includes a first corner and a second corner, the first corner can be understood as a specific corner for starting arc edge image acquisition, and the second corner can be understood as a specific corner for ending arc edge image acquisition. The specific method for determining the multiple second shooting points refers to the specific method for determining the multiple first shooting points mentioned above, which will not be repeated here.

[0080] S205, controlling the image acquisition module to capture multiple plane images when the second supporting structure is at each first shooting point, and controlling the image acquisition module to capture multiple arc edge images when the second supporting structure is at each second shooting point.

[0081] It is understandable that, based on the above S204, when the second support structure moves to each first shooting point, the image acquisition module is controlled to shoot the plane area of ​​the workpiece to obtain multiple plane images, and the multiple plane images contain the complete workpiece surface. The complete workpiece surface refers to the complete area of ​​the workpiece that needs to be detected, excluding the remaining areas that do not need to be detected. Subsequently, when the second support structure moves to each second shooting point, the image acquisition module is controlled to shoot the arc edge area of ​​the workpiece to obtain multiple arc edge images, and the multiple arc edge images contain the complete arc surface of the workpiece. It is understandable that there is no limitation on the image acquisition control order of the plane area and the arc edge area. In order to reduce the acquisition time, the plane area can be acquired first and then the arc edge area, that is, the plane of the workpiece is acquired first and then the arc edge.

[0082] Optionally, the plane running path refers to the path running along the x-axis or y-axis direction when the workpiece to be inspected is placed horizontally; the arc edge motion path refers to the path running along the arc edge direction when the workpiece to be inspected is placed at an angle; wherein the z-axis refers to the coordinate axis in the same direction of the workpiece to be inspected and the image acquisition device.

[0083] Understandable, such as Figure 3 The coordinate axes shown in the figure, the workpiece is in a plane posture, the horizontal direction refers to the xy axis, and the z axis refers to the coordinate axis in the same direction (vertical direction) as the image acquisition device and the workpiece, that is, the image acquisition device is located above the workpiece. One possible acquisition method is to acquire along the x axis, that is, from front to back, and another possible acquisition direction is to acquire along the y axis, that is, from left to right, that is, to control the image acquisition module to move on the xy plane. Figure 3 As shown in the figure, when the workpiece is in an arc edge posture, the arc edge is tilted, and the complete arc edge image can be collected along the arc edge direction, such as Figure 3 For a scene, the image is collected along the x-axis direction. At this time, the x-axis direction represents the arc edge direction. If the image is rotated to the adjacent arc edge, the image is collected along the y-axis direction. At this time, the y-axis direction represents the arc edge direction.

[0084] S206 , performing defect detection on the surface of the workpiece to be inspected according to the multiple plane images and the multiple arc edge images, and generating a target detection result.

[0085] It is understandable that, based on the above S205, the plane image and arc edge image collected under the illumination of the above illumination device may highlight the semi-bright field defects and / or dark field defects, based on which most defects or even all defects on the surface of the workpiece can be identified and the target detection result can be generated. It is understandable that after the plane image and arc edge image are captured, the images are stored in real time or periodically for subsequent processing and analysis.

[0086] Optionally, in the above S206, defect detection is performed on the surface of the workpiece to be inspected according to the multiple plane images and the multiple arc edge images to generate a target detection result, which can be specifically implemented by the following steps:

[0087] The areas to be inspected are respectively intercepted from multiple plane images and multiple arc edge images; the defects on the surface of the workpiece to be inspected are identified through the gray value difference of the areas to be inspected, and the target inspection result is obtained.

[0088] It is understandable that the defects of the workpiece surface in semi-bright field and dark field are highlighted in the arc edge image and the plane image. Therefore, in order to improve the recognition accuracy and reduce the amount of image processing, the area containing the above defects in the image can be directly cut out and stored as the region of interest. The region of interest is the area to be detected. The number of areas to be detected is not limited. There is a situation where a certain plane image includes multiple areas to be detected, that is, it includes both bright field areas and dark field areas, and there may be situations where only bright field areas or only dark field areas are included; in addition, there may be partial overlapping areas between multiple areas to be detected. After determining the area to be detected, the gray value difference of the area to be detected is calculated, the defects on the upper surface of the workpiece are identified, and the target detection result is obtained, wherein the target detection result includes the position of each defect on the upper surface of the workpiece.

[0089] The area to be detected includes a bright field area and / or a dark field area.

[0090] Optionally, the above-mentioned identification of defects on the surface of the workpiece to be inspected by the gray value difference of the area to be inspected to obtain the target detection result can be specifically achieved through the following steps:

[0091] The bright field area and the dark field area are spliced ​​separately to form a bright field image and a dark field image; the grayscale values ​​in the bright field image and the dark field image are extracted respectively, and the defects on the surface of the workpiece to be inspected are screened out by comparing the background grayscale value difference, and the corresponding position of each defect is determined; wherein, the defect grayscale value of the bright field image is lower than the background grayscale value; the defect grayscale value of the dark field image is higher than the background grayscale value.

[0092] It can be understood that the intercepted bright field area and dark field area are stitched together to obtain the bright field image and dark field image of the workpiece. Specifically, there is an overlap between the bright field area and the dark field area intercepted from adjacent images, and the stitching can be completed based on the overlap. Other possible stitching methods are not described here. Subsequently, the grayscale values ​​in the bright field image and the dark field image are extracted respectively, and the grayscale value extracted from the bright field image is recorded as the first grayscale value, and the grayscale value extracted from the dark field is recorded as the second grayscale value. The difference between the extracted grayscale value and the background grayscale value is compared to screen out defects, defect corresponding areas, and defect corresponding positions. Among them, for the bright field image, after the first lighting device lights up the light-emitting unit, the light beam emitted by the light-emitting unit passes through the quartz glass at the front end of the first lighting device and then diverges uniformly. Due to the spectral projection properties of the quartz glass, the illumination light beam basically does not pass through the upper surface of the glass. The light beam will form non-uniform bright field illumination on the upper surface of the workpiece, which will correspondingly highlight the semi-bright field defects. The grayscale value of this type of defect is slightly lower than the background grayscale value. Therefore, the area where the first defect grayscale value is less than the background grayscale value in the first grayscale value can be determined as the first defect area where the semi-bright field defect exists. For the dark field image, after the second lighting device lights up the light-emitting unit, the light beam emitted by it passes through the hemispherical cylindrical lens to make the light beam shrink and converge in front. The light beam is almost completely reflected by the workpiece to the camera, forming dark field illumination, which is used to highlight the dark field defects. The grayscale value of this type of defect is slightly higher than the background grayscale value. Therefore, the area where the second defect grayscale value is greater than the background grayscale value in the second grayscale value can be determined as the second defect area where the semi-bright field defect exists. Other methods of identifying surface defects of workpieces through bright field images and dark field images are not limited.

[0093] The embodiment of the present application provides a method for detecting defects on the surface of a workpiece. It is not necessary to set up separate detection stations for the arc edge area and the plane area of ​​the workpiece. By controlling the image acquisition module and the support module, the defect detection of the arc edge area and the plane area can be realized, which improves the detection efficiency, and only images the upper surface of the workpiece, separating the interference of the back of the workpiece and the support structure, and ensuring the imaging accuracy. Accordingly, by controlling multiple axes such as the x-axis, y-axis, z-axis, α-axis and β-axis, the workpiece is switched to the corresponding detection posture, which meets the detection requirements of the workpiece for planes, arc edges, etc., which is not only highly feasible, but also further reduces the detection cost and has a good user experience.

[0094] Based on the above embodiments, Figure 4 for Figure 2 FIG. 1 is a schematic diagram of a detailed flow chart of S201 in a method for detecting defects on a workpiece surface. When it is determined in S201 that the imaging condition of the first acquisition part of the workpiece to be detected in the image acquisition module meets the first imaging condition, the first current point position of the second support structure can be specifically determined as follows: Figure 4 The following steps are shown:

[0095] S401. For the second supporting structure, the first adjustment in the x-axis, y-axis and z-axis directions refers to adjusting the x-axis and y-axis so that the first initial position is at the center of the field of view of the image acquisition module, adjusting the z-axis so that the planar imaging of the first initial position in the image acquisition module is clearly focused, and determining the x-axis, y-axis and z-axis after the first adjustment as the first initial point position.

[0096] The first acquisition part is the target edge of the workpiece to be inspected.

[0097] It can be understood that the first adjustment is made to the x-axis, y-axis and z-axis of the second support structure, and the first adjustment can be understood as an adjustment to the actual acquisition starting point. Specifically, the first adjustment includes: adjusting the x-axis and y-axis to the first initial position of the workpiece to be in the center of the camera field of view, and adjusting the z-axis to the plane imaging focus is clear. Taking the workpiece as a rectangle as an example, the first acquisition position can be at least one target edge of the workpiece, and the target edge can be a complete edge or a section of one edge. Further, the first acquisition position includes a first initial position and a first end position, the first initial position is the first short side of the workpiece, and the first end position is another short side of the workpiece, which is recorded as the second short side, that is, when performing plane area acquisition, it moves from one short side of the workpiece to another short side. After the first adjustment of the x-axis, y-axis and z-axis makes the imaging condition of the camera meet the imaging conditions that the first short side is in the center of the camera field of view and the plane imaging is in focus, the x-axis, y-axis and z-axis at this time are determined as the first initial point position.

[0098] S402, performing a second adjustment on the second supporting structure in the x-axis direction so that the first end position is located at the center of the field of view of the image acquisition module, and updating the first initial point position according to the second adjusted x-axis to obtain the first end point position.

[0099] It is understandable that, based on S401, after determining the initial point of the acquisition, the x-axis is adjusted for the second time, and the second adjustment refers to an adjustment to determine the end point of the acquisition. Specifically, the second adjustment includes: adjusting the x-axis to the end point, at which time the first end part of the workpiece is within the camera field of view, for example, the second short side is within the camera field of view. It is understandable that when determining the first initial point, the x-axis, y-axis and z-axis all need to be adjusted. When determining the first end point later, only the x-axis needs to be adjusted, that is, the plane image is collected on the same horizontal plane (the y-axis and z-axis are the same). The initial point and end point of the plane acquisition are determined accordingly.

[0100] Optionally, when it is determined that the imaging condition of the second acquisition part of the workpiece to be detected in the image acquisition module meets the second imaging condition, the second current point position of the second support structure can be specifically achieved through the following steps:

[0101] A third adjustment is made to the second supporting structure in the x-axis, y-axis and z-axis directions so that the second initial part is located at the center of the field of view of the image acquisition module, and the arc edge imaging of the second initial part in the image acquisition module is clearly focused, and the x-axis, y-axis and z-axis after the third adjustment are determined as the second initial point position; a fourth adjustment is made to the x-axis so that the second end part is located at the center of the field of view of the image acquisition module, and the second initial point position is updated according to the x-axis after the fourth adjustment to obtain the second end point position; wherein the second acquisition part is the target corner, and the target corner is the corner formed by two connected edges of the workpiece to be detected.

[0102] It is understandable that the arc edge area of ​​the workpiece is imaged in the same way as the plane area. Specifically, when the second support structure is at the second initial point, the x-axis and y-axis are adjusted to the second initial position at the center of the camera's field of view, and the z-axis is adjusted to the arc edge image with clear focus. Based on the above example, the second initial position is the first corner, the first corner refers to the corner formed by the first short side and the first long side, and the second end position is the second corner, the second corner refers to another corner formed by the second short side and the second long side. A possible implementation scenario is to adjust the x-axis and y-axis so that the first corner is at the center of the camera's field of view, and adjust the z-axis so that the arc edge image is in clear focus, that is, when the first corner is at the center of the camera's field of view, the workpiece arc edge can be imaged in the camera. Then adjust the x-axis to the end point, at which time the camera field of view is the second corner of the workpiece, that is, the first corner is the starting point of the arc edge image, and the second corner is the end point of the arc edge image. The arc edge area and the plane area determine the initial point and the end point in the same way, which will not be repeated here.

[0103] It is understandable that after each determination of the second preset point of the first support structure, it is necessary to calculate the second current point of the second support structure under the second preset point. The second preset point (α axis and β axis) adjusts the tilt posture of the workpiece. For example, the β axis in the second preset point is 90 degrees. In this case, it is necessary to adjust the x-axis, y-axis and z-axis of the second support structure in the above manner to determine the second current point (including the second initial point and the second end point). When the β axis is 180 degrees, it is also necessary to calculate the second current point of the second support structure. By analogy, the point adjustment of the four arc edges is completed, that is, each tilt posture of the workpiece needs to calculate the second current point of the second support structure under the tilt posture.

[0104] The embodiment of the present application provides a method for detecting defects on the surface of a workpiece. For the acquisition of a plane area, the α-axis and β-axis of the first support structure are set to 0, so that the workpiece is always in a horizontal posture, and then the x-axis, y-axis and z-axis are flexibly adjusted to acquire a complete and clear plane image; for the acquisition of a plane area, the β-axis of the first support structure is set to 0 degrees, 90 degrees, 180 degrees and 280 degrees, and then the α-axis is adjusted according to the β-axis, so that the workpiece maintains a variety of tilted postures, and then the x-axis, y-axis and z-axis are flexibly adjusted to acquire a complete and clear arc edge image. This multi-axis adjustment method reduces the limitations of the workpiece itself and the acquisition equipment, and can be applied to the plane acquisition and arc surface acquisition of different workpieces.

[0105] Based on the above embodiments, Figure 5 for Figure 2 FIG. 1 is a schematic diagram of a detailed flow chart of S205 in a method for detecting defects on a workpiece surface, wherein the image acquisition module is controlled in S205 to obtain a plurality of plane images when the second support structure is at each first shooting point, specifically including the following steps: Figure 5 The following steps are shown:

[0106] It is understandable that the image acquisition module includes a camera device and multiple lighting devices, the multiple lighting devices include a first lighting device configured with a planar light source and a second lighting device configured with a strip light source, and other lighting devices configured with other types of light sources are not described here, and the number of the first lighting device and the second lighting device is not limited. In addition, the layout of each lighting device on the second support structure is not limited and can be adjusted according to the inspection requirements of the workpiece. For example, Figure 1 As shown, a first lighting device and a second lighting device can be deployed under the camera respectively.

[0107] S501, controlling a plurality of first light-emitting units included in a first lighting device to light up at least partially, so as to emit a first light beam to a first surface area of ​​a workpiece to be inspected.

[0108] The first light beam is used to form non-uniform bright field illumination on the surface of the workpiece to be inspected.

[0109] It is understandable that the detection requirements of the workpiece are obtained, and the detection requirements include parameter information of the workpiece, etc. Based on the detection requirements and the configuration information of the image acquisition module, the number of light-emitting units to be lit in each lighting device and the position of the light-emitting units to be lit can be determined, that is, the lighting device can be configured according to the detection requirements of the workpiece. For example, if the size of the workpiece is relatively small, some of the lighting units can be configured to light up. If the size of the workpiece is relatively large, all of the lighting units can be configured to light up. Other ways of configuring the lighting device according to the detection requirements of the workpiece are not limited. The following embodiment is described in detail by lighting up all the light-emitting units as an example.

[0110] In one possible scenario, multiple first light-emitting units are controlled to light up simultaneously, and light beams are evenly diverged to a first surface area of ​​the workpiece. The first surface area refers to an area that can be illuminated by the first lighting device. Under the illumination of multiple first light-emitting units, the first surface area and / or the first surface area and adjacent areas will form non-uniform bright field illumination to highlight semi-bright field defects.

[0111] S502: Control a plurality of second light-emitting units included in the second lighting device to at least partially light up, and emit a second light beam to a second surface area of ​​the workpiece to be inspected.

[0112] The second light beam is used to form dark field illumination on the surface of the workpiece to be inspected.

[0113] It is understandable that, based on the above S501, multiple second light-emitting units are controlled to light up simultaneously, and the light beams are shrunk and converged to the second surface area of ​​the workpiece. The second surface area refers to an area that can be illuminated by the second lighting device. Under the illumination of multiple second light-emitting units, the adjacent areas of the second surface area will form dark field illumination to highlight the dark field defects. Among them, the first surface area and the second surface area are different. In addition, there is no limitation on the control order of the first lighting device and the second lighting device.

[0114] S503: Control the camera device to photograph the surface of the workpiece to be inspected when the second supporting structure is at each first photographing point to obtain a plurality of planar images.

[0115] It can be understood that, based on the above S502, after controlling the first lighting device and the second lighting device to illuminate their respective corresponding surface areas, the second support structure is controlled to move according to the first shooting points allocated from the plane motion path, and the camera device is controlled to shoot the surface of the workpiece when it moves to each first shooting point to obtain a plane image. That is, the workpiece always maintains a horizontal posture and does not move, and the second support structure carries the image acquisition module from the first initial point to the first end point according to the first shooting point to complete the acquisition of the complete plane area of ​​the workpiece. This implementation scenario is that at least two lighting devices measure at the same time and illuminate different surface areas of the workpiece, and then perform image acquisition, that is, a scene in which at least two lighting devices are lit at the same time and then perform image acquisition.

[0116] Another method of controlling the image acquisition module to acquire multiple plane images, that is, when the image acquisition is provided with two lighting devices with different power supply types, can be specifically implemented by the following steps:

[0117] At least some of the multiple first light-emitting units are controlled to light up, so that the first light beams emitted by at least some of the first light-emitting units are uniformly diverged to the first surface area of ​​the workpiece to be inspected through the quartz glass; the non-uniform bright field illumination formed by the first light beam on the surface of the workpiece to be inspected is photographed by a camera device to obtain a first type of plane image reflecting the semi-bright field defect; and / or at least some of the multiple second light-emitting units are controlled to light up, so that the second light beams emitted by at least some of the second light-emitting units are contracted and converged to the second surface area of ​​the workpiece to be inspected through a cylindrical mirror; the dark field illumination formed by the second light beam on the surface of the workpiece to be inspected is photographed by a camera device to obtain a second type of plane image reflecting the dark field defect; wherein the multiple plane images include the first type of plane image and / or the second type of plane image.

[0118] It is understandable that another possible scenario is to perform image acquisition after the lighting device is lit alone, wherein multiple lighting devices can be lit in sequence, sequentially or periodically. For example, after controlling the multiple first light-emitting units included in the first lighting device to light up at the same time, the camera device is controlled to shoot the surface of the workpiece to be inspected when the second supporting structure is at each shooting point, and multiple first-type plane images are obtained, and the first-type plane images reflect the semi-bright field defects. After completing the control of the first lighting device, after controlling the multiple second light-emitting units included in the second lighting device to light up at the same time, the camera device is controlled to shoot the surface of the workpiece to be inspected when the second supporting structure is at each shooting point, and multiple second-type plane images are obtained. The second-type plane images reflect the dark field defects, wherein the multiple plane images include the first-type plane images and the second-type plane images. For example, only the first lighting device is controlled and the first-type plane images are obtained. For example, only the second lighting device is controlled and the second-type plane images are obtained. Other possible control scenarios are not limited.

[0119] Optionally, when the second supporting structure is at each second shooting point, the control process of controlling the image acquisition module to capture multiple arc edge images is the same as the control process of capturing multiple plane images, which will not be described in detail here.

[0120] Another method of controlling the image acquisition module to acquire multiple plane images, that is, when the image acquisition is provided with an illumination device, can be specifically implemented by the following steps:

[0121] The first lighting device comprises a plurality of first light-emitting units which are controlled to be at least partially lit to emit a first light beam to a first surface area of ​​the workpiece to be inspected; wherein the first light beam forms non-uniform bright field illumination or dark field illumination in the first surface area; and the camera device is controlled to photograph the surface of the workpiece to be inspected when the second supporting structure is at each first photographing point to obtain a plurality of planar images.

[0122] It is understandable that this scenario means that only one lighting device is set, such as the first lighting device, and the type of light source configured for the first lighting device can form semi-bright field lighting or dark field lighting, that is, a lighting device can be set according to the detection requirements. In addition, the lighting field that can be formed by the first lighting device can be switched by setting the light-emitting unit, for example, the first lighting device is switched from dark field lighting to bright field lighting, etc. Other possible lighting device combinations are not limited and can be determined according to user needs.

[0123] The defect detection method for the workpiece surface provided in the present application is provided with a plurality of lighting devices with different light sources in the image acquisition module. By controlling the lighting of the plurality of lighting devices, defects on the workpiece surface can be detected in dark field, bright field and semi-bright field, thereby meeting different detection requirements.

[0124] Based on the above embodiments, Figure 6 A schematic diagram of a workpiece collection triggering process provided in an embodiment of the present application, the specific implementation scenario is as follows:

[0125] by Figure 1 Taking the system shown as an example, the control module 3 is programmed with a host computer program, and the plane motion path (plane path) and arc motion path (arc path) of the first support structure 2-1 and the second support structure 2-2 are set in sequence. After receiving the position value and direction signal sent by the motion controller, the servo drive system (servo controller) in the control module 3 controls the support structure to run to the planned point (shooting point / photographing point) by adjusting the x-axis, y-axis and z-axis as well as the α-axis and the β-axis, and feeds back the motion position of the support structure in real time, wherein the motion controller is configured on the support structure to control the motion of the support structure. After receiving the feedback motion position, the motion controller determines whether it is a shooting point. When the shooting point is determined, the circuit is triggered to output a high-level signal to realize the strobing of the first lighting device 1-4 and the second lighting device 1-5, and the camera 1-1 takes pictures, that is, the light source and the camera are controlled to complete a pulse cycle. At the next moment, the shooting point is reached to complete the next pulse response, until the plane motion path and the arc motion path of the workpiece are completed, and all points are photographed and stored. The captured images are then re-stitched according to the above-mentioned bright field and dark field areas to form bright field and dark field images of workpieces 1-6 respectively. The processing unit extracts the grayscale value in the image, and by comparing the background grayscale value difference, the defects and their locations are screened out to generate the detection results.

[0126] Figure 7 The schematic diagram of the structure of a device for detecting defects on the surface of a workpiece provided in an embodiment of the present application. The device provided in an embodiment of the present application can execute the processing flow provided in an embodiment of a method for detecting defects on the surface of a workpiece, such as Figure 7As shown, the device 700 includes a first determination unit 701, a first path planning unit 702, a second determination unit 703, a second path planning unit 704, a shooting unit 705 and a detection unit 706, wherein:

[0127] The first determining unit 701 is used to determine the first current position of the second supporting structure when the imaging condition of the first acquisition part of the workpiece to be detected in the image acquisition module meets the first imaging condition when the first supporting structure is at the first preset position; wherein the workpiece to be detected is fixed on the first supporting structure, and the image acquisition module is fixed on the second supporting structure; the first imaging condition refers to the planar imaging condition of the workpiece;

[0128] A first path planning unit 702, configured to calculate a planar motion path for the workpiece to be inspected according to a first current point, and determine a plurality of first shooting points on the planar motion path;

[0129] The second determining unit 703 is used to determine the second current point position of the second supporting structure when the imaging condition of the second acquisition part of the workpiece to be detected in the image acquisition module meets the second imaging condition when the first supporting structure is at the second preset point position; wherein the second imaging condition refers to the arc surface imaging condition of the workpiece;

[0130] The second path planning unit 704 is used to calculate the arc edge motion path for the workpiece to be inspected according to the second current point position, and determine a plurality of second shooting points on the arc edge motion path;

[0131] The shooting unit 705 is used to control the image acquisition module to capture multiple plane images when the second supporting structure is at each first shooting point, and to control the image acquisition module to capture multiple arc edge images when the second supporting structure is at each second shooting point;

[0132] The detection unit 706 is used to perform defect detection on the surface of the workpiece to be detected according to the multiple plane images and the multiple arc edge images, and generate a target detection result.

[0133] The first preset point position refers to that both the α axis and the β axis are 0 degrees, so that the workpiece to be inspected is in a horizontal posture;

[0134] The second preset point position refers to the β axis being at least one of an arc of 0 degree, 90 degrees, 180 degrees and 280 degrees, and the α axis is determined according to the current arc of the β axis and the imaging condition.

[0135] The first acquisition part includes a first initial part and a first end part, and the first current point includes a first initial point and a first end point.

[0136] Optionally, the first determining unit 701 is configured to:

[0137] Performing a first adjustment on the second support structure in the x-axis, y-axis and z-axis directions, wherein the first adjustment refers to adjusting the x-axis and y-axis so that the first initial position is at the center of the field of view of the image acquisition module, adjusting the z-axis so that the plane imaging of the first initial position in the image acquisition module is in clear focus, and determining the x-axis, y-axis and z-axis after the first adjustment as the first initial point position;

[0138] The second support structure is adjusted for the second time in the x-axis direction so that the first end position is at the center of the field of view of the image acquisition module, and the first initial point position is updated according to the second adjusted x-axis to obtain the first end point position; wherein the first acquisition position is the target edge of the workpiece to be detected.

[0139] Optionally, the first determining unit 701 is configured to:

[0140] Performing straight line fitting based on the first initial point and the first end point to determine a planar motion path for the workpiece to be detected, wherein the length of the planar motion path is greater than the length of the workpiece to be detected;

[0141] A plurality of first shooting points are determined on the planar motion path according to the set step length.

[0142] Wherein, the image acquisition module includes a first lighting device and a camera device.

[0143] Optionally, the photographing unit 705 is used for:

[0144] The first lighting device includes a plurality of first light-emitting units which are at least partially lit to emit a first light beam to a first surface area of ​​the workpiece to be inspected; wherein the first light beam forms non-uniform bright field illumination or dark field illumination in the first surface area;

[0145] The camera device is controlled to photograph the surface of the workpiece to be inspected when the second supporting structure is at each first photographing point to obtain a plurality of plane images.

[0146] The image acquisition module includes a first lighting device, a second lighting device and a camera device.

[0147] Optionally, the photographing unit 705 is used for:

[0148] Controlling the plurality of first light-emitting units included in the first lighting device to at least partially light up, and emitting a first light beam to a first surface area of ​​the workpiece to be inspected; wherein the first light beam forms non-uniform bright field illumination in the first surface area;

[0149] Controlling the plurality of second light-emitting units included in the second lighting device to at least partially light up, and emitting a second light beam to a second surface area of ​​the workpiece to be inspected; wherein the second light beam forms dark field illumination in the second surface area;

[0150] The camera device is controlled to photograph the surface of the workpiece to be inspected when the second supporting structure is at each first shooting point to obtain a plurality of plane images, wherein the plurality of plane images include a first type of plane image reflecting semi-bright field defects and a second type of plane image reflecting dark field defects.

[0151] The second collection site includes a second initial site and a second end site.

[0152] Optionally, the second determining unit 704 is configured to:

[0153] Performing a third adjustment on the second support structure in the x-axis, y-axis and z-axis directions, so that the second initial position is at the center of the field of view of the image acquisition module, and the arc edge imaging of the second initial position in the image acquisition module is clearly focused, and determining the x-axis, y-axis and z-axis after the third adjustment as the second initial point position;

[0154] Performing a fourth adjustment on the second support structure in the x-axis direction so that the second end position is located at the center of the field of view of the image acquisition module, and updating the second initial point position according to the x-axis after the fourth adjustment to obtain the second end point position;

[0155] The second acquisition position is a target corner, which is a corner formed by two connected edges of the workpiece to be detected.

[0156] Optionally, the detection unit 706 is used to:

[0157] respectively intercepting the regions to be detected from the multiple plane images and the multiple arc edge images;

[0158] Through the gray value difference of the area to be inspected, the defects on the surface of the workpiece to be inspected are identified and the target inspection result is obtained.

[0159] The area to be detected includes a bright field area and / or a dark field area.

[0160] Optionally, the detection unit 706 is used to:

[0161] The bright field area and the dark field area are stitched together to form a bright field image and a dark field image;

[0162] The grayscale values ​​in the bright field image and the dark field image are extracted respectively, and the defects on the surface of the workpiece to be inspected are screened out by comparing the background grayscale value difference, and the corresponding position of each defect is determined; among which, the defect grayscale value of the bright field image is lower than the background grayscale value; the defect grayscale value of the dark field image is higher than the background grayscale value.

[0163] Figure 7 The defect detection device for the workpiece surface of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.

[0164] Based on the above embodiments, the present application provides a device for detecting defects on the surface of a workpiece, such as Figure 2 As shown, the device includes an image acquisition module, a support module and a control module, the support module includes a first support structure supporting the image acquisition module and a second support structure supporting the workpiece to be detected, so that the image acquisition module is placed above the workpiece to be detected, wherein:

[0165] The image acquisition module is used to acquire the surface image of the workpiece to be inspected in a plane posture and an arc edge posture; the control module is used to execute the defect detection method of the workpiece surface of any one of claims 1-10 above.

[0166] The image acquisition module includes a camera device, which includes a camera, a lens and a filter. The camera and the lens are connected for image acquisition, and the filter is connected to the rear end of the lens for filtering out ambient stray light.

[0167] Among them, the image acquisition module also includes multiple lighting devices configured with different light source types, and the multiple lighting devices include a first lighting device configured with a planar light source and a second lighting device configured with a strip light source, wherein the light-emitting panel of the first lighting device is composed of a plurality of first light-emitting unit patches of a first set frequency, and the front end of the first lighting device is configured with quartz glass, and the light-emitting panel of the second lighting device is composed of a plurality of second light-emitting unit patches of a second set frequency, and the front end of the second lighting device is configured with a cylindrical mirror.

[0168] The first support structure is provided with a first adjustment axis which can be adjusted in the direction of 0 to 360 degrees, and the first adjustment axis includes an α-axis and a β-axis, wherein the α-axis and the β-axis are used to adjust the tilt posture of the workpiece to be detected relative to the image acquisition module;

[0169] The second support structure is provided with a second adjustment axis that can be adjusted in multiple degrees of freedom directions, and the second adjustment axis includes an x-axis, a y-axis and a z-axis, wherein the x-axis and the y-axis are used to adjust the field of view position of the image acquisition module, and the z-axis is used to adjust the vertical distance between the image acquisition module and the workpiece to be detected, and the vertical distance reflects the focus condition of the image.

[0170] It is understandable that the specific description of the various components included in the workpiece surface defect detection equipment can be found in the above embodiments and will not be repeated here.

[0171] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 8, which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present application. The electronic device 800 in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0172] like Figure 8 As shown, the electronic device 800 may include a processing device 801 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803 to implement a defect detection method for a workpiece surface as in an embodiment of the present application. In RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0173] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0174] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby realizing the defect detection method of the workpiece surface as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0175] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0176] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0177] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0178] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0179] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0180] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0181] The units involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of a unit does not, in some cases, constitute a limitation on the unit itself.

[0182] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0183] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0184] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or gateway that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or gateway. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or gateway that includes the elements.

[0185] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting defects on a workpiece surface, characterized in that: The method comprises: When the first support structure is at a first preset position, it is determined that the imaging condition of the first acquisition part of the workpiece to be detected in the image acquisition module meets the first imaging condition, the first current position of the second support structure; wherein the workpiece to be detected is fixed on the first support structure, and the image acquisition module is fixed on the second support structure; the first imaging condition refers to the planar imaging condition of the workpiece; Calculating a planar motion path for the workpiece to be inspected according to the first current point, and determining a plurality of first shooting points on the planar motion path; When the first supporting structure is at a second preset position, it is determined that the imaging condition of the second acquisition part of the workpiece to be detected in the image acquisition module meets the second imaging condition, the second current position of the second supporting structure; wherein the second imaging condition refers to the arc surface imaging condition of the workpiece; Calculating an arc edge motion path for the workpiece to be inspected according to the second current point position, and determining a plurality of second shooting points on the arc edge motion path; Controlling the image acquisition module to capture multiple plane images when the second supporting structure is at each first shooting point, and controlling the image acquisition module to capture multiple arc edge images when the second supporting structure is at each second shooting point; Defect detection is performed on the surface of the workpiece to be detected according to the multiple plane images and the multiple arc edge images to generate a target detection result.

2. The method according to claim 1, characterized in that: The first acquisition part includes a first initial part and a first end part, the first current point position includes a first initial point position and a first end point position, and when the imaging condition of the first acquisition part of the workpiece to be detected in the image acquisition module meets the first imaging condition, the first current point position of the second support structure includes: Performing a first adjustment on the second supporting structure in the x-axis, y-axis and z-axis directions, wherein the first adjustment refers to adjusting the x-axis and the y-axis so that the first initial position is at the center of the field of view of the image acquisition module, adjusting the z-axis so that the plane imaging of the first initial position in the image acquisition module is clearly focused, and determining the x-axis, y-axis and z-axis after the first adjustment as the first initial point position; The second support structure is subjected to a second adjustment in the x-axis direction so that the first end position is located at the center of the field of view of the image acquisition module, and the first initial point position is updated according to the x-axis after the second adjustment to obtain the first end point position; wherein the first acquisition position is the target edge of the workpiece to be inspected.

3. The method according to claim 2, characterized in that The step of calculating a planar motion path for the workpiece to be inspected according to the first current point, and determining a plurality of first shooting points on the planar motion path, includes: Performing straight line fitting based on the first initial point and the first end point to determine a planar motion path for the workpiece to be detected, wherein the length of the planar motion path is greater than the length of the workpiece to be detected; A plurality of first shooting points are determined on the planar motion path according to a set step length.

4. The method according to claim 1, characterized in that The image acquisition module includes a first lighting device and a camera device, and the image acquisition module is controlled to capture a plurality of plane images when the second supporting structure is at each first shooting point, including: Controlling the plurality of first light-emitting units included in the first lighting device to at least partially light up, and emitting a first light beam to a first surface area of ​​the workpiece to be inspected; wherein the first light beam forms non-uniform bright field illumination or dark field illumination in the first surface area; The camera device is controlled to photograph the surface of the workpiece to be inspected when the second supporting structure is at each first photographing point to obtain a plurality of planar images.

5. The method according to claim 1, characterized in that The image acquisition module includes a first lighting device, a second lighting device and a camera device, and the image acquisition module is controlled to capture a plurality of plane images when the second supporting structure is at each first shooting point, including: Controlling the plurality of first light-emitting units included in the first lighting device to at least partially light up, emitting a first light beam to a first surface area of ​​the workpiece to be inspected; wherein the first light beam forms non-uniform bright field illumination in the first surface area; and / or, Controlling the plurality of second light-emitting units included in the second lighting device to at least partially light up, and emitting a second light beam to a second surface area of ​​the workpiece to be inspected; wherein the second light beam forms dark field illumination on the second surface area; The camera device is controlled to photograph the surface of the workpiece to be inspected when the second supporting structure is at each first shooting point to obtain a plurality of plane images, wherein the plurality of plane images include a first type of plane image reflecting semi-bright field defects and a second type of plane image reflecting dark field defects.

6. The method according to claim 1, characterized in that The second acquisition part includes a second initial part and a second end part, the second current point position includes a second initial point position and a second end point position, and when the imaging condition of the second acquisition part of the workpiece to be detected in the image acquisition module meets the second imaging condition, the second current point position of the second support structure includes: Performing a third adjustment on the second support structure in the x-axis, y-axis and z-axis directions, so that the second initial position is located at the center of the field of view of the image acquisition module, and the arc edge imaging of the second initial position in the image acquisition module is clearly focused, and determining the x-axis, y-axis and z-axis after the third adjustment as the second initial point position; Performing a fourth adjustment on the second support structure in the x-axis direction so that the second end position is located at the center of the field of view of the image acquisition module, and updating the second initial point position according to the x-axis after the fourth adjustment to obtain the second end point position; Wherein, the second acquisition position is a target corner, and the target corner is a corner formed by two connected edges of the workpiece to be detected.

7. The method according to claim 1, characterized in that The step of performing defect detection on the surface of the workpiece to be detected according to the multiple plane images and the multiple arc edge images to generate a target detection result includes: respectively intercepting areas to be detected from the plurality of plane images and the plurality of arc edge images; By using the gray value difference of the area to be detected, the defects on the surface of the workpiece to be detected are identified to obtain the target detection result.

8. The method according to claim 7, characterized in that The area to be detected includes a bright field area and / or a dark field area, and the defects on the surface of the workpiece to be detected are identified by the gray value difference of the area to be detected to obtain the target detection result, including: The bright field area and the dark field area are spliced ​​respectively to form a bright field image and a dark field image; The grayscale values ​​in the bright field image and the dark field image are extracted respectively, and the defects on the surface of the workpiece to be inspected are screened out by comparing the background grayscale value difference, and the corresponding position of each defect is determined; wherein the defect grayscale value of the bright field image is lower than the background grayscale value; and the defect grayscale value of the dark field image is higher than the background grayscale value.

9. The method according to claim 1, characterized in that: The first preset point position means that the first support structure is at 0 degrees in both the α-axis and β-axis directions, so that the workpiece to be inspected is in a horizontal posture; The second preset point position refers to that the first support structure is at least one of an arc of 0 degrees, 90 degrees, 180 degrees and 280 degrees in the β-axis direction, and a target arc in the α-axis direction, wherein the target arc is determined based on the current arc of the β-axis and the imaging condition.

10. A defect detection system for a workpiece surface, characterized in that: The defect detection system includes an image acquisition module, a support module and a control module, wherein: The image acquisition module is used to acquire an image of the surface of the workpiece to be inspected; The support module is used to support the image acquisition module and the workpiece to be detected, wherein the support module includes a first support structure and a second support structure, the workpiece to be detected is fixed on the first support structure, and the image acquisition module is fixed on the second support structure; The control module is used to control the support module and the image acquisition module to execute the workpiece surface defect detection method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Online detecting equipment for magnetic shoes based on machine vision

    CN103743752A

  • Arc-shaped glass panel defect detecting method used for curved surface electronic display screen

    CN106705897A

  • Method and system for rapidly detecting appearance defects of curved screen

    CN110018167A

  • Method for collecting appearance image of 3D glass cover plate

    CN113884510A

  • Mobile phone glass cover plate 3D arc edge defect detection method

    CN113989240A

Cited By

  • Dislocation imaging joint calculation detection method and detection system

    CN120430954A

  • Defect detection method, device, system and equipment and storage medium

    CN120927663A