Defect detection method and device, electronic equipment and storage medium
By using irradiation and imaging technology with low transmittance light sources and preset incident angles in the light-transmitting sheet detection, the problem of difficulty in detecting multiple defect types in the prior art is solved, and a higher accuracy and wider range of defect detection is achieved.
Patent Information
- Application Number
- CN202510163924.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to accurately detect various defect types in light-transmitting sheets, especially the inability to distinguish between impurities and black spots.
Defect detection is performed using a low-transmitting light source. By acquiring the sheet image of the sheet to be detected, irradiating and imaging is performed using a preset incident angle, the grayscale characteristics of the image are used to achieve accurate detection of multiple types of defects.
The accuracy and range of defect detection of light-transmitting sheets is improved, and multiple defect types can be more accurately identified and distinguished.
Smart Images

Figure CN119985544A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of defect detection technology, and in particular to a defect detection method, device, electronic equipment and storage medium. Background Art
[0002] At present, the defect detection of translucent sheets is usually based on direct line light sources. The direct line light source can vertically transmit the sheet to be detected. By collecting the image of the sheet to be detected under vertical transmission, the defect type is detected based on the grayscale value of the pixels in the sheet image. The defects of translucent sheets are usually divided into types such as crystal points, black spots, impurities and scratches. However, the types of defects that can be detected based on the sheet imaging under direct line light sources are limited. Usually, only black spots and impurities can be detected, and impurities and black spots cannot be distinguished. Summary of the invention
[0003] The present invention provides a defect detection method, device, electronic device and storage medium to solve the problem of difficulty in detecting defect types of translucent sheets. Based on the imaging differences of defects under low-transmittance light sources, accurate detection of multiple types of defects is achieved, which is beneficial to improving the defect detection accuracy of translucent sheets and expanding the defect type detection range.
[0004] According to one aspect of the present invention, a defect detection method is provided, the method comprising:
[0005] Acquire a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an image of a light band area presented on the second side of the sheet to be detected by an imaging device when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle;
[0006] Determine the defect detection result of the sheet to be detected according to the sheet image.
[0007] According to another aspect of the present invention, there is provided a defect detection device, the device comprising:
[0008] An image acquisition module is used to acquire a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an image of a light band area presented by an imaging device on a second side of the sheet to be detected when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle;
[0009] The detection result determination module is used to determine the defect detection result of the sheet to be detected according to the sheet image.
[0010] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0011] At least one processor; and a memory connected to the at least one processor; wherein the imaging device communicates with the processor, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the defect detection method described in any embodiment of the present invention.
[0012] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the defect detection method described in any embodiment of the present invention when executed.
[0013] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the defect detection method according to any embodiment of the present invention is implemented.
[0014] The technical solution of the embodiment of the present invention is to obtain a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an image of a light band area presented on the second side of the sheet to be detected by an imaging device when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle; and the defect detection result of the sheet to be detected is determined based on the sheet image. This technical solution solves the problem of difficulty in detecting defect types of light-transmitting sheets, and based on the imaging differences of defects under low-transmittance line light sources, it realizes accurate detection of multiple types of defects, which is conducive to improving the defect detection accuracy of light-transmitting sheets and expanding the defect type detection range.
[0015] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 is a flow chart of a defect detection method provided according to Embodiment 1 of the present invention;
[0018] Figure 2 is a flow chart of a defect detection method provided according to Embodiment 2 of the present invention;
[0019] Figure 3is a schematic diagram of a configuration method of a defect detection system provided according to Embodiment 2 of the present invention;
[0020] Figure 4 is a bottom-up schematic diagram of the positional relationship between the sheet to be detected and the linear light source provided in the second embodiment of the present invention;
[0021] Figure 5 is a schematic diagram of defect type imaging provided according to an embodiment of the present invention;
[0022] Figure 6 is a flow chart of a defect detection method provided according to Embodiment 3 of the present invention;
[0023] Figure 7 is a schematic diagram of a configuration method of a defect detection system provided according to Embodiment 3 of the present invention;
[0024] Figure 8 is a bottom-up schematic diagram of the positional relationship between the sheet to be detected and the linear light source provided in the third embodiment of the present invention;
[0025] Fig. 9 is a structural schematic diagram of a defect detection device provided according to a fourth embodiment of the present invention;
[0026] Fig.10 It is a schematic diagram of the structure of an electronic device for implementing the defect detection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0029] Embodiment 1
[0030] Figure 1 A flowchart of a defect detection method is provided for the first embodiment of the present invention. This embodiment is applicable to defect detection scenarios of transparent original films and other light-transmitting sheets, especially the detection of multiple types of defects. The method can be executed by a defect detection device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0031] S110, obtaining a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an imaging of a light band area presented on the second side of the sheet to be detected by an imaging device when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle.
[0032] This solution can be executed by a defect detection system, which may include a line light source, an imaging device, and a control device for performing defect detection on a light-transmitting sheet. The line light source is arranged on the first side of the sheet to be detected, and is used to irradiate the first side of the sheet to be detected at a preset incident angle. Therefore, the center normal of the line light source intersects with the plane where the sheet to be detected is located, and the angle between the center normal of the line light source and the plane where the sheet to be detected is located is a first preset acute angle. The line light source is extended along a first direction, and the sheet to be detected is extended along a second direction. The second direction may be perpendicular to the first direction, or may be at a preset angle to the first direction.
[0033] It is understandable that, since the sheet to be detected is a light-transmitting sheet with light transmittance, when the line light source irradiates the first side of the sheet to be detected at a preset incident angle, the second side of the sheet to be detected will present a light band area. The imaging device is arranged on the second side of the sheet to be detected, and is used to image the light band area presented on the second side of the sheet to be detected. The central normal of the imaging device intersects with the plane where the sheet to be detected is located, and the intersection area of the light emitted by the line light source and the plane where the sheet to be detected is located is arranged in the field of view of the imaging device, so that the imaging device can completely image the light band area. The control device can communicate with the imaging device to receive the sheet image of the sheet to be detected sent by the imaging device. The control device can also communicate with the line light source to control the line light source to emit light. Specifically, the control device can control parameters such as the time, angle and intensity of the light emitted by the line light source.
[0034] It is easy to understand that defects in translucent sheets usually cause uneven areas such as bumps and pits on the surface. When the light emitted by the line light source enters the sheet to be detected at an acute angle, the uneven areas are prone to refraction and scattering, which results in more reflected light in the uneven areas than in the flat areas. The increase in reflected light makes the uneven areas appear as higher grayscale values in the sheet image, thereby enhancing the image contrast between defective areas and non-defective areas. Compared with a straight line light source, defects can be detected and identified more accurately. Incident at a smaller angle can make it easier for light to penetrate translucent materials and achieve a more obvious imaging effect. Therefore, the preset incident angle can usually be less than 45°.
[0035] It can be understood that the smaller the incident angle, the closer the incident light is to the normal line, so the sheet image is closer to the straight-through effect, and the defect feature distinction is worse. Therefore, the incident angle is usually greater than 20° to achieve a low-angle transmission effect. The larger the incident angle, the closer the incident light is to the plane of the sheet to be detected, and the lower the transmittance. However, when the incident angle is below 40°, the rate of decrease in transmittance is small. When the incident angle is greater than 40°, the rate of decrease in transmittance increases significantly as the incident angle increases. When the incident angle is greater than 60°, the transmittance decreases sharply. Therefore, the preferred angle range of the preset incident angle can be set to (20°, 40°).
[0036] Optionally, the center normal of the imaging device can be perpendicular to the plane of the sheet to be detected, so that the imaging device can perform orthophoto imaging on the light band area. Compared with oblique imaging, the sheet image of orthophoto imaging can have a higher resolution and clearer defect details. At the same time, compared with oblique imaging, the orthophoto imaging of the imaging device can have a larger image acquisition field of view, thereby improving the efficiency of defect detection.
[0037] In this embodiment, the line light source may extend along a first direction, and the first direction may be parallel to the plane where the sheet to be detected is located. It is understandable that different optical path distances cause differences in light intensity when the light reaches the sheet to be detected, and the light intensity difference causes grayscale errors in the light band area during the imaging process, which can easily affect the accuracy of defect detection. Therefore, keeping the extension direction of the line light source parallel to the plane where the sheet to be detected is located can ensure that the distance from the light emitted by the line light source to the sheet to be detected is the same, avoiding grayscale errors in the sheet image, and improving the reliability of defect detection.
[0038] In a feasible solution, the center normal of the line light source and the center normal of the imaging device intersect at the same point of the plane where the sheet to be detected is located. The center normal of the line light source and the center normal of the imaging device intersect at the same point of the plane where the sheet to be detected is located, so that the light band area is located in the center of the field of view of the imaging device, ensuring clear imaging of the light band area.
[0039] In a preferred solution, the line light source extends along a first direction, and a light diffuser is provided in the line light source for diffusing the light emitted by the line light source along the first direction so that the light distribution in the first direction is uniform. The light diffuser may be an optical device with a tiny concave-convex structure, such as a diffusion film. The light diffuser may be used to evenly scatter light, reduce light spots and uneven brightness, and thus improve the uniformity of the displayed image. The light diffuser is provided in the line light source so as to diffuse the light emitted by the line light source along the extension direction of the line light source, thereby avoiding imaging errors caused by uneven light distribution in the extension direction of the light source and ensuring the reliability of imaging in the light band area.
[0040] In a feasible solution, the step of obtaining a sheet image of the sheet to be detected includes:
[0041] If a detection signal of a sheet to be detected is received, the line light source is controlled to emit light to illuminate the first side of the sheet to be detected at a preset incident angle, and the imaging device is controlled to image the light band area presented on the second side of the sheet to be detected to obtain a sheet image of the sheet to be detected.
[0042] After receiving the detection signal of the sheet to be detected, the control device can control the line light source to emit light to illuminate the first side of the sheet to be detected at a preset incident angle, and at the same time, control the imaging device to image the light band area presented on the second side of the sheet to be detected, so as to obtain the sheet image of the sheet to be detected. The detection signal can be an in-position signal of the sheet to be detected, or a start signal of defect detection. In a specific example, the sheet to be detected can be a light-transmitting coil, and the detection signal can be a defect detection line start signal of the light-transmitting coil.
[0043] S120: Determine a defect detection result of the sheet to be detected according to the sheet image.
[0044] Since the sheet image generated under low-angle transmission conditions can enhance the contrast between the defect area and the non-defect area, the detection probability and detection accuracy of the defect type of the light-transmitting sheet can be achieved based on the sheet image. Specifically, the control device can perform defect detection on the sheet image according to a preset defect detection algorithm to obtain a defect detection result of the sheet to be detected. The defect detection result may include information such as the number of defects, defect identification, defect location, and defect type.
[0045] In a feasible solution, determining the defect detection result of the sheet to be detected according to the sheet image includes:
[0046] The defect detection result of the sheet to be detected is determined according to the grayscale characteristics of the sheet image.
[0047] The control device can identify defects in the sheet to be detected according to the grayscale features of the defects presented in the sheet image, and obtain the defect detection results of the sheet to be detected. The grayscale features may include a defect grayscale value interval, and the defect grayscale value interval can be used to represent the grayscale value range of the defect presented in the sheet image. The defect grayscale value interval may be one or more, and the grayscale value interval of the defect may include grayscale value intervals matching each defect type, and the defect type may include types such as crystal points, black spots, impurities, and scratches. The control device can sequentially match the grayscale value of each pixel in the sheet image with the grayscale value interval of the defect, filter out pixels whose grayscale values belong to the defect grayscale value interval, and then determine the defect detection results according to the distribution of pixels whose grayscale values belong to the defect grayscale value interval in the sheet image.
[0048] In another feasible solution, the control device may pre-acquire a sheet material sample data set, wherein the sheet material sample data set may include multiple groups of sheet material samples, each group of sheet material samples including a sheet material sample image and a defect detection result matched with the sheet material sample image. The control device may pre-build a defect detection network based on a convolutional neural network, take the sheet material sample image as input, take the defect detection result matched with the sheet material sample image as supervision, and train the defect detection network to obtain a defect detection model that meets the detection requirements. The control device may input the sheet material image of the sheet material to be detected into the pre-trained defect detection model to obtain the defect detection result of the sheet material to be detected.
[0049] The technical solution of the embodiment of the present invention is to obtain a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an image of a light band area presented on the second side of the sheet to be detected by an imaging device when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle; and the defect detection result of the sheet to be detected is determined based on the sheet image. This technical solution solves the problem of difficulty in detecting defect types of light-transmitting sheets, and based on the imaging differences of defects under low-transmittance line light sources, it realizes accurate detection of multiple types of defects, which is conducive to improving the defect detection accuracy of light-transmitting sheets and expanding the defect type detection range.
[0050] Embodiment 2
[0051] Figure 2 This is a flow chart of a defect detection method provided in the second embodiment of the present invention. This embodiment is based on the above embodiment and is refined. Figure 2 As shown, the method includes:
[0052] S210, obtaining a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an imaging of a light band area presented on the second side of the sheet to be detected by an imaging device when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle.
[0053] Figure 3 is a schematic diagram of a configuration method of a defect detection system provided according to Embodiment 2 of the present invention, Figure 4 FIG. 1 is a bottom view schematic diagram of the positional relationship between the sheet to be detected and the line light source according to the second embodiment of the present invention. In a specific example, the configuration of the line light source, the sheet to be detected and the imaging device can be as follows: Figure 3 As shown, the position relationship between the sheet to be detected and the line light source can be as follows: Figure 4 As shown. A line light source is arranged on the first side of the sheet to be detected, and the center normal of the line light source intersects with the plane where the sheet to be detected is located; an imaging device is arranged on the second side of the sheet to be detected, and the center normal of the imaging device is perpendicular to the plane where the sheet to be detected is located; the angle between the center normal of the line light source and the center normal of the imaging device is an acute angle a; the center normal of the line light source and the center normal of the imaging device intersect at the same point on the plane where the sheet to be detected is located; the line light source extends along a first direction, and the sheet to be detected extends along a second direction, and the second direction is perpendicular to the first direction.
[0054] S220, extracting distribution areas of each defect from the sheet image according to the grayscale value of each pixel in the sheet image and a preset reference grayscale interval; the reference grayscale interval is a grayscale value interval of pixels in a non-defective sheet image.
[0055] In order to improve the efficiency of defect detection, the control device can locate the defect position according to the grayscale value of each pixel in the sheet image and the preset reference grayscale interval, and extract the distribution area of each defect from the sheet image. Among them, the reference grayscale interval is the grayscale value interval of the pixels in the defect-free sheet image. The control device can also obtain a defect detection model in advance. The defect detection model can be obtained by training target detection models such as yolo, Faster R-CNN and SSD using sheet sample images marked with defect distribution areas. The control device identifies the distribution area of the defect from the sheet image based on the defect detection model. Specifically, the distribution area of the defect can be represented by a detection box of a regular shape such as a rectangle or a circle, or it can be represented by an irregular border according to the outline of the defect boundary.
[0056] S230, taking each defect as a target defect in turn, and taking a distribution area of the target defects as a target area.
[0057] After identifying each defect in the sheet image, the controller may sequentially take each defect in the sheet image as a target defect, take the distribution area of the target defect as a target area, and then determine the defect type of the target defect based on the image features in the target area.
[0058] S240. Determine a first grayscale feature determination result based on a comparison result between the grayscale value of each pixel in the target area and a first grayscale threshold; the first grayscale feature determination result is used to characterize whether the target defect presents an optical feature of light absorption in the sheet image.
[0059] In this solution, the defect detection results include defect types of each defect; the defect types include crystal points, black spots and impurities. Figure 5 is a schematic diagram of defect type imaging provided according to an embodiment of the present invention. Defects such as crystal points and black spots are three-dimensional defects. Crystal point defects have a nodular feel. Crystal points do not absorb light. Light is easily refracted and scattered in the crystal point defect area. Therefore, Figure 5 As shown in the figure, the crystal point defect area is easy to be brightened. Compared with the non-defective area, the grayscale value of the pixel in the crystal point defect area is higher, and it usually appears white in the sheet image. The black point defect area usually includes the black point and the transparent area around the black point. The black point is opaque and absorbs the light irradiated to the black point. The transparent area around the black point is prone to refraction and scattering. Figure 5 As shown in the figure, compared with the defect-free area, the grayscale value of the pixel at the black spot is lower and appears black in the sheet image, while the grayscale value of the pixel in the transparent area around the black spot is higher and usually appears white in the sheet image. Figure 5As shown, the black spot defect area has both black area and white area. The impurity defect area absorbs light, and compared with the non-defective area, the gray value of the pixel in the impurity defect area is lower, and it appears black in the sheet image.
[0060] Based on the grayscale features of crystal points, black spots and impurity defects in the sheet image, the control device can pre-set a first grayscale threshold value to indicate the upper limit of the grayscale value of pixels that appear visually black in the sheet image. The control device can compare the grayscale value of each pixel in the target area with the first grayscale threshold value to determine whether there is a pixel in the target area whose grayscale value is less than the first grayscale threshold value. If so, it is determined that the target area has the first grayscale feature. If not, it is determined that the target area does not have the first grayscale feature.
[0061] Due to the interference of the external environment on imaging, a small number of interfering pixels are likely to appear in the sheet image. In order to more reliably determine whether the target area has the first grayscale feature, the control device can count the number of pixels whose grayscale values are less than the first grayscale threshold according to the comparison result of the grayscale value of each pixel in the target area with the first grayscale threshold. If the number of pixels reaches the preset number threshold, it is determined that the target area has the first grayscale feature. If the number of pixels does not reach the preset number threshold, it is determined that the target area does not have the first grayscale feature. The pixels whose grayscale values are less than the first grayscale threshold are interfering pixels caused by environmental factors.
[0062] S250, determining a second grayscale feature determination result based on a comparison result between the grayscale value of each pixel in the target area and a second grayscale threshold; the second grayscale feature determination result is used to characterize whether the target defect presents an optical feature of non-light absorption in the sheet image.
[0063] Similar to S240, the control device may pre-set a second grayscale threshold value, which is used to indicate the lower limit of the grayscale value of pixels that appear visually white in the sheet image. The control device may compare the grayscale value of each pixel in the target area with the second grayscale threshold value, and determine whether there is a pixel in the target area whose grayscale value is greater than the second grayscale threshold value. If so, it is determined that the target area has the second grayscale feature, and if not, it is determined that the target area does not have the second grayscale feature.
[0064] Due to the interference of the external environment on imaging, a small number of interfering pixels are likely to appear in the sheet image. In order to more reliably determine whether the target area has a second grayscale feature, the control device can compare the grayscale value of each pixel in the target area with the second grayscale threshold, and count the number of pixels whose grayscale value is greater than the second grayscale threshold. If the number of pixels reaches the preset number threshold, it is determined that the target area has a second grayscale feature. If the number of pixels does not reach the preset number threshold, it is determined that the target area does not have a second grayscale feature, and the pixels whose grayscale value is greater than the second grayscale threshold are interfering pixels caused by environmental factors.
[0065] S260: Determine the defect type of the target defect according to the first grayscale feature determination result and the second grayscale feature determination result.
[0066] It can be understood that the first grayscale feature determination result can be whether the first grayscale feature exists in the target area, and the second grayscale feature determination result can be whether the second grayscale feature exists in the target area. The control device can determine the defect type of the target defect based on whether the first grayscale feature exists in the target area and whether the second grayscale feature exists.
[0067] On the basis of the above solution, determining the defect type of the target defect according to the first grayscale feature determination result and the second grayscale feature determination result includes:
[0068] If the target region has the first grayscale feature and does not have the second grayscale feature, determining that the defect type of the target defect is impurity;
[0069] If the target area has the first grayscale feature and the second grayscale feature, determining that the defect type of the target defect is a black spot;
[0070] If the target area does not have the first grayscale feature, but has the second grayscale feature, it is determined that the defect type of the target defect is a crystal point.
[0071] Specifically, if the target region has the first grayscale feature and does not have the second grayscale feature, the target defect is determined to be an impurity defect, which is manifested as black but not white in the target region. If the target region has the first grayscale feature and the second grayscale feature, the target defect is determined to be a black spot defect, which is manifested as black and white in the target region. If the target region does not have the first grayscale feature and has the second grayscale feature, the target defect is determined to be a crystal point defect, which is manifested as white but not black in the target region.
[0072] This embodiment can distinguish defect types based on the grayscale features of the defect imaging under low-angle transmission conditions. The defect detection method is simple and fast, which is conducive to accurate defect classification and ensures the reliability and accuracy of translucent sheet defect detection.
[0073] Embodiment 3
[0074] Figure 6 This is a flow chart of a defect detection method provided in the second embodiment of the present invention. This embodiment refines the light source setting based on the above embodiment. Figure 6 As shown, the method includes:
[0075] S310, obtaining a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an imaging of a light band area presented on the second side of the sheet to be detected by an imaging device when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle.
[0076] Since the scratch defect is a defect generated during the movement of the sheet to be detected, the light perpendicular to the movement direction is easily deflected. Therefore, it can be presented in the sheet image as follows: Figure 5 The white linear defect shown. The linear light source is usually provided with a diffusion film in its extension direction to diffuse the light in the first direction so that the light distribution of the linear light source in the first direction is uniform. However, since the scratch defect is usually narrow and fine, and the light distribution of the linear light source in its extension direction is uniform, the image of the scratch defect in the sheet image is not obviously different from the defect-free area, making it difficult to identify.
[0077] Figure 7 is a schematic diagram of a configuration method of a defect detection system provided according to Embodiment 3 of the present invention, Figure 8 FIG. 1 is a bottom view schematic diagram of the positional relationship between the sheet to be detected and the line light source according to the third embodiment of the present invention. In this solution, the configuration of the line light source, the sheet to be detected and the imaging device can be as follows: Figure 7 As shown, the position relationship between the sheet to be detected and the line light source can be as follows: Figure 8 As shown. A line light source is arranged on the first side of the sheet to be detected, and the center normal of the line light source intersects with the plane where the sheet to be detected is located; an imaging device is arranged on the second side of the sheet to be detected, and the center normal of the imaging device is perpendicular to the plane where the sheet to be detected is located; the angle between the center normal of the line light source and the center normal of the imaging device is an acute angle a; the line light source extends along a first direction, and the sheet to be detected extends along a second direction, and the angle between the second direction and the first direction is a preset acute angle.
[0078] This solution allows the extension direction of the line light source to form a preset acute angle with the extension direction of the sheet to be inspected, so that the light in the direction perpendicular to the extension direction of the line light source can participate in the irradiation of the scratch defect, that is, providing more light to irradiate the scratch defect, making the light refraction characteristics of the scratch defect more obvious, thereby expanding the difference between the scratch defect and the defect-free area.
[0079] In a preferred solution, the preset acute angle between the first direction and the second direction has a value range of (30°, 60°). It can be understood that the angle range (30°, 60°) is the middle value range of the acute angle value range (0°, 90°). The angle range (30°, 60°) can ensure that more light in the direction perpendicular to the extension direction of the line light source participates in the irradiation of the sheet to be inspected, thereby highlighting the light refraction characteristics of the scratch defect.
[0080] S320: Determine a defect detection result of the sheet to be detected according to the grayscale features of the sheet image.
[0081] In this solution, the defect detection result includes the defect type of each defect; the defect type includes crystal point, black point, impurity and scratch.
[0082] In a feasible solution, determining the defect detection result of the sheet to be detected according to the grayscale feature of the sheet image includes:
[0083] The distribution area of each defect is extracted from the sheet image according to the grayscale value of each pixel in the sheet image and a preset reference grayscale interval; the reference grayscale interval is the grayscale value interval of pixels in the defect-free sheet image.
[0084] Taking each defect as a target defect in turn, and taking a distribution area of the target defect as a target area;
[0085] Determine a first grayscale feature determination result according to a comparison result between the grayscale value of each pixel in the target area and the first grayscale threshold; the first grayscale feature determination result is used to characterize whether the target defect presents an optical feature of light absorption in the sheet image;
[0086] Determine a second grayscale feature determination result according to a comparison result between the grayscale value of each pixel in the target area and the second grayscale threshold; the second grayscale feature determination result is used to characterize whether the target defect presents an optical feature of non-absorption of light in the sheet material image;
[0087] The defect type of the target defect is determined according to the first grayscale feature determination result and the second grayscale feature determination result.
[0088] In order to improve the efficiency of defect detection, the control device can locate the defect position according to the grayscale value of each pixel in the sheet image and the preset reference grayscale interval, and extract the distribution area of each defect from the sheet image. Among them, the reference grayscale interval is the grayscale value interval of the pixels in the defect-free sheet image. The control device can also obtain a defect detection model in advance. The defect detection model can be obtained by training target detection models such as yolo, Faster R-CNN and SSD using sheet sample images marked with defect distribution areas. The control device identifies the distribution area of the defect from the sheet image based on the defect detection model. Specifically, the distribution area of the defect can be represented by a detection box of a regular shape such as a rectangle or a circle, or it can be represented by an irregular border according to the outline of the defect boundary.
[0089] After identifying each defect in the sheet image, the control device can sequentially take each defect in the sheet image as a target defect, take the distribution area of the target defect as the target area, and then determine the defect type of the target defect based on the image features in the target area. The control device can pre-set a first grayscale threshold value to represent the upper limit of the grayscale value of pixels that appear visually black in the sheet image. The control device can compare the grayscale value of each pixel in the target area with the first grayscale threshold value to determine whether there is a pixel in the target area whose grayscale value is less than the first grayscale threshold value. If so, it is determined that the target area has the first grayscale feature. If not, it is determined that the target area does not have the first grayscale feature.
[0090] Due to the interference of the external environment on imaging, a small number of interfering pixels are likely to appear in the sheet image. In order to more reliably determine whether the target area has the first grayscale feature, the control device can count the number of pixels whose grayscale values are less than the first grayscale threshold according to the comparison result of the grayscale value of each pixel in the target area with the first grayscale threshold. If the number of pixels reaches the preset number threshold, it is determined that the target area has the first grayscale feature. If the number of pixels does not reach the preset number threshold, it is determined that the target area does not have the first grayscale feature. The pixels whose grayscale values are less than the first grayscale threshold are interfering pixels caused by environmental factors.
[0091] The control device may pre-set a second grayscale threshold value, which is used to indicate the lower limit of the grayscale value of pixels that appear visually white in the sheet image. The control device may compare the grayscale value of each pixel in the target area with the second grayscale threshold value, and determine whether there is a pixel in the target area whose grayscale value is greater than the second grayscale threshold value. If so, it is determined that the target area has the second grayscale feature, and if not, it is determined that the target area does not have the second grayscale feature.
[0092] Due to the interference of the external environment on imaging, a small number of interfering pixels are prone to appear in the sheet image. In order to more reliably determine whether the target area has a second grayscale feature, the control device can compare the grayscale value of each pixel in the target area with the second grayscale threshold, and count the number of pixels whose grayscale value is greater than the second grayscale threshold. If the number of pixels reaches the preset number threshold, it is determined that the target area has a second grayscale feature. If the number of pixels does not reach the preset number threshold, it is determined that the target area does not have the second grayscale feature, and the pixels with grayscale values greater than the second grayscale threshold are interfering pixels caused by environmental factors. It can be understood that the first grayscale feature determination result can be whether the first grayscale feature exists in the target area, and the second grayscale feature determination result can be whether the second grayscale feature exists in the target area. The control device can determine the defect type of the target defect based on whether the first grayscale feature exists in the target area and whether the second grayscale feature exists.
[0093] On the basis of the above solution, determining the defect type of the target defect according to the first grayscale feature determination result and the second grayscale feature determination result includes:
[0094] If the target region has the first grayscale feature and does not have the second grayscale feature, determining that the defect type of the target defect is impurity;
[0095] If the target area has the first grayscale feature and the second grayscale feature, determining that the defect type of the target defect is a black spot;
[0096] If the target area does not have the first grayscale feature, but has the second grayscale feature, it is determined that the defect type of the target defect is a crystal point or a scratch.
[0097] Specifically, if the target area has the first grayscale feature and does not have the second grayscale feature, the target defect is determined to be an impurity defect, which is manifested as black but not white in the target area. If the target area has the first grayscale feature and the second grayscale feature, the target defect is determined to be a black dot defect, which is manifested as black and white in the target area. If the target area does not have the first grayscale feature and has the second grayscale feature, the target defect is determined to be a crystal point defect or a scratch defect, which is manifested as white but not black in the target area.
[0098] S330, judging whether the defect type of the target defect in the sheet to be inspected is not unique according to the defect detection result.
[0099] It is understandable that since both the crystal point defect and the scratch defect are manifested as the second grayscale feature, it is difficult to distinguish the types of crystal point defects and scratch defects based only on the grayscale features of the defect distribution area. The control device can determine whether the defect type of the target defect in the sheet to be detected is not unique, for example, the defect type of the target defect is a crystal point or a scratch, based on the defect type of each defect in the defect detection result. If the defect type of the target defect is not unique, execute S340; if the defect type of the target defect is not unique, execute S350.
[0100] S340. According to the shape feature of the target area, the defect type of the target defect is corrected to make the defect type of the target defect unique; the target area is a distribution area of the target defect.
[0101] If the defect type of the target defect is not unique, the control device can obtain the description information of the target area, according to the shape characteristics of the target area. The description information of the target area may include information such as the center position, boundary position and distance from the center to the boundary of the target area; the shape characteristics of the target area may include characteristics such as the length, width, area and aspect ratio of the target area.
[0102] The control device can identify the target defect whose defect type is not unique according to the shape characteristics of the target area, so as to correct the defect type of the target defect and make the defect type of the target defect unique. For example, the control device can further determine the defect type of the target defect whose defect type is a crystal point or a scratch according to the length of the target area. If the length of the target area is greater than or equal to the preset length threshold, the defect type of the target defect is determined to be a scratch; if the length of the target area is less than the preset length threshold, the defect type of the target defect is determined to be a crystal point.
[0103] In a feasible solution, the shape feature includes the aspect ratio of the target area;
[0104] The step of correcting the defect type of the target defect according to the shape feature of the target area includes:
[0105] If the defect type of the target defect is a crystal point or a scratch, determining the aspect ratio of the target area;
[0106] If the aspect ratio of the target area is greater than or equal to a preset ratio threshold, determining that the defect type of the target defect is a scratch;
[0107] If the aspect ratio of the target area is less than a preset ratio threshold, it is determined that the defect type of the target defect is a crystal point.
[0108] The above scheme further judges the target defects whose defect types are not unique based on the aspect ratio of the target area. The aspect ratio can characterize the differences in defect distribution areas, which is conducive to the accurate classification of defect types and ensures the reliability of defect classification.
[0109] S350, outputting the defect detection result of the sheet to be detected.
[0110] This embodiment can highlight the light refraction characteristics of scratch defects by making the extension direction of the line light source form a preset acute angle with the extension direction of the sheet to be detected. When the uniqueness of the defect type cannot be determined based on the grayscale feature, the shape characteristics of the defect distribution area are used to achieve accurate classification of defects, thereby improving the defect detection accuracy of the light-transmitting sheet and expanding the defect type detection range.
[0111] Embodiment 4
[0112] Fig. 9 This is a schematic diagram of the structure of a defect detection device provided by Embodiment 4 of the present invention. Fig. 9 As shown, the device comprises:
[0113] The image acquisition module 410 is used to acquire a sheet image of the sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an image of a light band area presented by an imaging device on the second side of the sheet to be detected when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle;
[0114] The detection result determination module 420 is used to determine the defect detection result of the sheet to be detected according to the sheet image.
[0115] In this solution, the image acquisition module 410 is specifically used for:
[0116] If a detection signal of a sheet to be detected is received, the line light source is controlled to emit light to illuminate the first side of the sheet to be detected at a preset incident angle, and the imaging device is controlled to image the light band area presented on the second side of the sheet to be detected to obtain a sheet image of the sheet to be detected.
[0117] In a feasible solution, the defect detection result includes the defect type of each defect; the defect type includes crystal point, black point and impurity; the detection result determination module 420 is specifically used to:
[0118] The defect detection result of the sheet to be detected is determined according to the grayscale characteristics of the sheet image.
[0119] Based on the above solution, the detection result determination module 420 is specifically used to:
[0120] Extracting the distribution area of each defect from the sheet image according to the grayscale value of each pixel in the sheet image and a preset reference grayscale interval; the reference grayscale interval is the grayscale value interval of the pixels in the defect-free sheet image;
[0121] Taking each defect as a target defect in turn, and taking a distribution area of the target defect as a target area;
[0122] Determine a first grayscale feature determination result according to a comparison result between the grayscale value of each pixel in the target area and the first grayscale threshold; the first grayscale feature determination result is used to characterize whether the target defect presents an optical feature of light absorption in the sheet image;
[0123] Determine a second grayscale feature determination result according to a comparison result between the grayscale value of each pixel in the target area and the second grayscale threshold; the second grayscale feature determination result is used to characterize whether the target defect presents an optical feature of non-absorption of light in the sheet material image;
[0124] The defect type of the target defect is determined according to the first grayscale feature determination result and the second grayscale feature determination result.
[0125] Optionally, the detection result determination module 420 is specifically configured to:
[0126] If the target region has the first grayscale feature and does not have the second grayscale feature, determining that the defect type of the target defect is impurity;
[0127] If the target area has the first grayscale feature and the second grayscale feature, determining that the defect type of the target defect is a black spot;
[0128] If the target area does not have the first grayscale feature, but has the second grayscale feature, it is determined that the defect type of the target defect is a crystal point.
[0129] In another feasible solution, the line light source extends along a first direction, the sheet to be detected extends along a second direction, and the angle between the second direction and the first direction is a preset acute angle;
[0130] The defect detection result includes the defect type of each defect; the defect type includes crystal point, black point, impurity and scratch.
[0131] Based on the above solution, the detection result determination module 420 is specifically used to:
[0132] Determining a defect detection result of the sheet to be detected according to the grayscale characteristics of the sheet image;
[0133] If it is determined according to the defect detection result that the defect type of the target defect in the sheet to be detected is not unique, the defect type of the target defect is corrected according to the shape characteristics of the target area to make the defect type of the target defect unique; the target area is the distribution area of the target defect.
[0134] The defect detection device provided in the embodiment of the present invention can execute the defect detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0135] Embodiment 5
[0136] Fig.10 A schematic diagram of an electronic device 510 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0137] like Fig.10 As shown, the electronic device 510 includes at least one processor 511, and a memory connected to the at least one processor 511 in communication, such as a read-only memory (ROM) 512, a random access memory (RAM) 513, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 511 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 512 or the computer program loaded from the storage unit 518 to the random access memory (RAM) 513. In the RAM 513, various programs and data required for the operation of the electronic device 510 can also be stored. The processor 511, the ROM 512, and the RAM 513 are connected to each other via a bus 514. An input / output (I / O) interface 515 is also connected to the bus 514.
[0138] A number of components in the electronic device 510 are connected to the I / O interface 515, including: an input unit 516, such as a keyboard, a mouse, etc.; an output unit 517, such as various types of displays, speakers, etc.; a storage unit 518, such as a disk, an optical disk, etc.; and a communication unit 519, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 519 allows the electronic device 510 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0139] The processor 511 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 511 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 511 performs the various methods and processes described above, such as a defect detection method.
[0140] In some embodiments, the defect detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 518. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 510 via the ROM 512 and / or the communication unit 519. When the computer program is loaded into the RAM 513 and executed by the processor 511, one or more steps of the defect detection method described above may be performed. Alternatively, in other embodiments, the processor 511 may be configured to perform the defect detection method in any other appropriate manner (e.g., by means of firmware).
[0141] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0142] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable defect detection device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0143] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. 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.
[0144] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0145] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by 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), a blockchain network, and the Internet.
[0146] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0147] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0148] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A defect detection method, characterized in that: The method comprises: Acquire a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an image of a light band area presented on the second side of the sheet to be detected by an imaging device when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle; Determine the defect detection result of the sheet to be detected according to the sheet image.
2. The method according to claim 1, characterized in that The step of obtaining a sheet image of the sheet to be detected includes: If a detection signal of a sheet to be detected is received, the line light source is controlled to emit light to illuminate the first side of the sheet to be detected at a preset incident angle, and the imaging device is controlled to image the light band area presented on the second side of the sheet to be detected to obtain a sheet image of the sheet to be detected.
3. The method according to claim 1, characterized in that The defect detection result includes the defect type of each defect; the defect type includes crystal point, black point and impurity; The step of determining the defect detection result of the sheet to be detected according to the sheet image comprises: The defect detection result of the sheet to be detected is determined according to the grayscale characteristics of the sheet image.
4. The method according to claim 3, characterized in that: The step of determining the defect detection result of the sheet to be detected according to the grayscale feature of the sheet image comprises: Extracting the distribution area of each defect from the sheet image according to the grayscale value of each pixel in the sheet image and a preset reference grayscale interval; the reference grayscale interval is the grayscale value interval of the pixels in the defect-free sheet image; Taking each defect as a target defect in turn, and taking a distribution area of the target defect as a target area; Determine a first grayscale feature determination result according to a comparison result between the grayscale value of each pixel in the target area and the first grayscale threshold; the first grayscale feature determination result is used to characterize whether the target defect presents an optical feature of light absorption in the sheet image; Determine a second grayscale feature determination result according to a comparison result between the grayscale value of each pixel in the target area and the second grayscale threshold; the second grayscale feature determination result is used to characterize whether the target defect presents an optical feature of non-absorption of light in the sheet material image; The defect type of the target defect is determined according to the first grayscale feature determination result and the second grayscale feature determination result.
5. The method according to claim 4, characterized in that The step of determining the defect type of the target defect according to the first grayscale feature determination result and the second grayscale feature determination result includes: If the target region has the first grayscale feature and does not have the second grayscale feature, determining that the defect type of the target defect is impurity; If the target area has the first grayscale feature and the second grayscale feature, determining that the defect type of the target defect is a black spot; If the target area does not have the first grayscale feature, but has the second grayscale feature, it is determined that the defect type of the target defect is a crystal point.
6. The method according to claim 1, characterized in that The line light source extends along a first direction, the sheet to be detected extends along a second direction, and the angle between the second direction and the first direction is a preset acute angle; The defect detection result includes the defect type of each defect; the defect type includes crystal point, black point, impurity and scratch.
7. The method according to claim 6, characterized in that The step of determining the defect detection result of the sheet to be detected according to the sheet image comprises: Determining a defect detection result of the sheet to be detected according to the grayscale characteristics of the sheet image; If it is determined according to the defect detection result that the defect type of the target defect in the sheet to be detected is not unique, the defect type of the target defect is corrected according to the shape characteristics of the target area to make the defect type of the target defect unique; the target area is the distribution area of the target defect.
8. A defect detection device, characterized in that: The device comprises: An image acquisition module is used to acquire a sheet image of a sheet to be detected; the sheet to be detected is a light-transmitting sheet; the sheet image is an image of a light band area presented by an imaging device on a second side of the sheet to be detected when a linear light source irradiates the first side of the sheet to be detected at a preset incident angle; the preset incident angle is an acute angle; The detection result determination module is used to determine the defect detection result of the sheet to be detected according to the sheet image.
9. An electronic device, characterized in that: The electronic device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the imaging device communicates with the processor, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the defect detection method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the defect detection method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Image roughness-based defect detection method, apparatus, medium, and program
CN120746988A
Online marking method and device for TAC film surface microdefects and storage medium
CN121640470A
Method and device for detecting defects in transparent film material layer and production system
CN122361440A